2016-03-02 141 views
0

我是OOZIE的新手,並試圖使用OOZIE工作流程運行PIG腳本。下面是豬腳本命名爲first.pigOOZIE:PIG作業執行失敗

A = LOAD '/user/jas/pigip' USING PigStorage(','); 
B = FOREACH A GENERATE $0; 
STORE B INTO '/user/jas/pigop'; 

下面是workflow.xml

<workflow-app xmlns="uri:oozie:workflow:0.2" name="PIGACTION"> 
<start to="pig-node"/> 
<action name="pig-node"> 
    <pig> 
     <job-tracker>${jobTracker}</job-tracker> 
     <name-node>${nameNode}</name-node> 
     <script>first.pig</script> 
    </pig> 
    <ok to="end"/> 
    <error to="fail"/> 
</action> 
    <kill name="fail"> 
    <message>Pig Script failed!!!</message> 
    </kill> 
    <end name="end"/> 
</workflow-app> 

下面是job.properties

nameNode=hdfs://localhost:8020 
jobTracker=localhost:8021 
queueName=default 
oozie.libpath=/user/oozie/shared/lib 
oozie.wf.application.path=${nameNode}/user/my/pigact 

對於運行的工作流程:

1)我上傳了first.pigworkflow.xml在位置/user/my/pigact

2)輸入文件(一個簡單的CSV)上傳在路徑/user/jas/pigip

對於運行工作,下面是我所使用的命令:

oozie job -oozie http://localhost:11000/oozie -config job.properties -auth SIMPLE -run

的工作已提交,然後殺死。下面是Job Log

2016-03-02 11:35:01,463 INFO ActionStartXCommand:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]:start:] Start action [[email protected]:start:] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10] 
2016-03-02 11:35:01,463 WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]:start:] [***[email protected]:start:***]Action status=DONE 
2016-03-02 11:35:01,464 WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]:start:] [***[email protected]:start:***]Action updated in DB! 
2016-03-02 11:35:01,524 INFO ActionStartXCommand:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] Start action [[email protected]] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10] 
2016-03-02 11:35:02,411 WARN PigActionExecutor:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] credentials is null for the action 
2016-03-02 11:35:04,170 INFO PigActionExecutor:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] checking action, external ID [job_201603012236_0015] status [RUNNING] 
2016-03-02 11:35:04,293 WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] [***[email protected]***]Action status=RUNNING 
2016-03-02 11:35:04,295 WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] [***[email protected]***]Action updated in DB! 
2016-03-02 11:35:12,210 INFO CallbackServlet:539 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] callback for action [[email protected]] 
2016-03-02 11:35:12,409 INFO PigActionExecutor:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] action completed, external ID [job_201603012236_0015] 
2016-03-02 11:35:12,434 WARN PigActionExecutor:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.PigMain], exit code [2] 
2016-03-02 11:35:12,705 INFO ActionEndXCommand:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] ERROR is considered as FAILED for SLA 
2016-03-02 11:35:12,794 INFO ActionStartXCommand:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] Start action [[email protected]] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10] 
2016-03-02 11:35:12,795 WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] [***[email protected]***]Action status=DONE 
2016-03-02 11:35:12,795 WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[[email protected]] [***[email protected]***]Action updated in DB! 
2016-03-02 11:35:12,904 WARN CoordActionUpdateXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[-] E1100: Command precondition does not hold before execution, [, coord action is null], Error Code: E1100 

請建議什麼地方錯了,我無法識別的問題。

EDIT

捕捉快照:

enter image description here

enter image description here

enter image description here

enter image description here

來自第3張圖像(突出顯示)的控制檯URL顯示第4張圖像。請建議。

這是我得到的日誌:

+0

這可以幫助你http://stackoverflow.com/questions/15336923/problems-with-starting-oozie-workflow –

+0

我之前檢查過這個帖子,但沒用:我可以運行一個'OOZIE'工作流程與'MapReduce',因此啓動'OOZIE'服務器不應該是一個問題。我正面臨着這個問題'PIG'和'HIVE'。請建議。 – user182944

回答

2

看着QueryParserStringStream.java,它擴展了ANTLRStringStream。現在,如果antlr丟失,你應該得到ClassNotFoundError而不是NoSuchFiledError。我能想到的唯一可能的原因是,在運行時在類路徑中存在不同版本的antlr,這導致了此錯誤。

+0

從oozie共享庫(從HDFS)中刪除重複的jar文件並使用正確版本的antlr jar文件爲我解決了這個問題。再次感謝 !!! – user182944

0

在執行腳本的豬出現錯誤。這裏是在日誌中的錯誤:

2016年3月2日11:35:12434 WARN PigActionExecutor:542 - USER [訓練]甲基[ - ] TOKEN [] APP [PIGACTION] JOB [0000009-160301223816814- oozie-oozi-W]動作[0000009-160301223816814-oozie-oozi-W @ pig-node] Launcher ERROR,reason:Main class [org.apache.oozie.action.hadoop.PigMain],exit code [2]

我在您的腳本中看不到任何明顯的問題,您是否可以在MapReduce模式下運行腳本並檢查是否有任何錯誤?

pig -x mapreduce first.pig

+0

我已經做到了,腳本運行良好。 – user182944

+0

是否在您的設置中作爲PIG的默認執行引擎啓用了tez? – rahulbmv

+0

沒有tez尚未啓用。是否需要解決這個問題?要添加更多信息,我正在Cloudera集羣上運行它,並且我也遇到了同樣的HIVE作業錯誤。 – user182944

1

,你所看到的錯誤是Oozie的發射映射器工作,這是揹着你豬腳本來收集資源,實際上在集羣上運行它的失敗結果。它基本上模仿你的命令行grunt功能。

如果您的oozie Web控制檯可用,您可以單擊工作流作業中的殺死操作,這會向您顯示作業URL。作業URL實際上指向您的oozie啓動器映射程序作業,您可以檢查其日誌以瞭解出錯的原因。

+0

當你點擊殺死的工作流程時,你應該能夠看到出錯的實際豬動作。如果你點擊錯誤的豬行爲,你應該能夠看到一個'Console URL',它將打開啓動器作業 – rahulbmv

+0

我無法看到'Console URL'選項卡,我正在使用'cloudera 4.1.1' 。另外,我已經在本地運行了豬腳本,它運行良好,因此豬腳本沒有問題。當我嘗試運行帶有HIVE作業的OOZIE工作流時,出現同樣的錯誤,使用OOZIE工作流程,MapReduce作業正常運行。請建議。 – user182944

+0

你可以發佈殺死作業的截圖嗎?一旦你點擊失敗的行動,你應該能夠看到三個標籤 – rahulbmv