2-10 就业课(2.0)-oozie:9、oozie与hue的整合,以及整合后执行MR任务
5、hue整合oozie
第一步:停止oozie與hue的進程
通過命令停止oozie與hue的進程,準備修改oozie與hue的配置文件
第二步:修改oozie的配置文件(老版本的bug,新版本已經不需要了)這一步我們都不需要做了
修改oozie的配置文件oozie-site.xml
<property>??? <name>oozie.service.WorkflowAppService.system.libpath</name>
??????? <value>/user/oozie/share/lib</value>
??? </property>
??? ?<property>
??????? <name>oozie.use.system.libpath</name>
??????? <value>true</value>
??? </property>
?
重新上傳所有的jar包到hdfs的/user/oozie/share/lib路徑下去
cd /export/servers/oozie-4.1.0-cdh5.14.0
bin/oozie-setup.sh? sharelib create -fs hdfs://node01:8020 -locallib oozie-sharelib-4.1.0-cdh5.14.0-yarn.tar.gz
?
?
?
?
第三步:修改hue的配置文件
修改hue的配置文件hue.ini
?
[liboozie]
? # The URL where the Oozie service runs on. This is required in order for
? # users to submit jobs. Empty value disables the config check.
? oozie_url=http://node03.hadoop.com:11000/oozie
?
? # Requires FQDN in oozie_url if enabled
? ## security_enabled=false
?
? # Location on HDFS where the workflows/coordinator are deployed when submitted.
? remote_deployement_dir=/user/root/oozie_works
?
修改oozie的配置文件大概在1151行左右的樣子
[oozie]
? # Location on local FS where the examples are stored.
? # local_data_dir=/export/servers/oozie-4.1.0-cdh5.14.0/examples/apps
?
? # Location on local FS where the data for the examples is stored.
? # sample_data_dir=/export/servers/oozie-4.1.0-cdh5.14.0/examples/input-data
?
? # Location on HDFS where the oozie examples and workflows are stored.
? # Parameters are $TIME and $USER, e.g. /user/$USER/hue/workspaces/workflow-$TIME
? # remote_data_dir=/user/root/oozie_works/examples/apps
?
? # Maximum of Oozie workflows or coodinators to retrieve in one API call.
? oozie_jobs_count=100
?
? # Use Cron format for defining the frequency of a Coordinator instead of the old frequency number/unit.
? enable_cron_scheduling=true
?
? # Flag to enable the saved Editor queries to be dragged and dropped into a workflow.
? enable_document_action=true
?
? # Flag to enable Oozie backend filtering instead of doing it at the page level in Javascript. Requires Oozie 4.3+.
? enable_oozie_backend_filtering=true
?
? # Flag to enable the Impala action.
? enable_impala_action=true
?
[filebrowser]
? # Location on local filesystem where the uploaded archives are temporary stored.
? archive_upload_tempdir=/tmp
?
? # Show Download Button for HDFS file browser.
? show_download_button=true
?
? # Show Upload Button for HDFS file browser.
? show_upload_button=true
?
? # Flag to enable the extraction of a uploaded archive in HDFS.
? enable_extract_uploaded_archive=true
?
?
?
第四步:啟動hue與oozie的進程
啟動hue進程
cd /export/servers/hue-3.9.0-cdh5.14.0
build/env/bin/supervisor
啟動oozie進程
cd /export/servers/oozie-4.1.0-cdh5.14.0
bin/oozied.sh start
?
頁面訪問hue
http://node03.hadoop.com:8888/
?
?
6、oozie使用過程當中可能遇到的問題
1) Mysql權限配置
授權所有主機可以使用root用戶操作所有數據庫和數據表
| mysql> grant all on *.* to root@'%' identified by '123456' with grant option; mysql> flush privileges; mysql> exit; |
2) workflow.xml配置的時候不要忽略file屬性
3) jps查看進程時,注意有沒有bootstrap
4) 關閉oozie
如果bin/oozied.sh stop無法關閉,則可以使用kill -9 [pid],之后oozie根目錄下的oozie-server/temp/xxx.pid文件一定要刪除。
5) Oozie重新打包時,一定要注意先關閉進程,刪除對應文件夾下面的pid文件。(可以參考第4條目)
6) 配置文件一定要生效
起始標簽和結束標簽無對應則不生效,配置文件的屬性寫錯了,那么則執行默認的屬性。
7) libext下邊的jar存放于某個文件夾中,導致share/lib創建不成功。
9) 修改Hadoop配置文件,需要重啟集群。一定要記得scp到其他節點。
10) JobHistoryServer必須開啟,集群要重啟的。
11) Mysql配置如果沒有生效的話,默認使用derby數據庫。
12) 在本地修改完成的job配置,必須重新上傳到HDFS。
13) 將HDFS中上傳的oozie配置文件下載下來查看是否有錯誤。
14) Linux用戶名和Hadoop的用戶名不一致。
15)sharelib找不到,包括重新初始化oozie
如果部署oozie出錯,修復執行,初始化oozie:
1、停止oozie(要通過jps檢查bootstrap進程是否已經不存在)
2、刪除oozie-server/temp/*
3、刪除HDFS上的sharelib文件夾
4、刪除oozie.sql文件,刪除Mysql中刪除oozie庫,重新創建
5、重新按照順序執行文檔中oozie的安裝重新再來一遍
轉載于:https://www.cnblogs.com/mediocreWorld/p/11173683.html
總結
以上是生活随笔為你收集整理的2-10 就业课(2.0)-oozie:9、oozie与hue的整合,以及整合后执行MR任务的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: laravel命令
- 下一篇: 流畅的Python(Fluent Pyt