2016-07-28 70 views
0

我創建了一個簡單的pigscript,它在表中加載10條記錄和存儲。在oozie shell動作中運行豬

當我調用使用文件Oozie的殼牌行動這豬(存儲在HDFS),我得到的和錯誤如下:

>>> Invoking Shell command line now >> 
Exit code of the Shell command 5 
<<< Invocation of Shell command completed <<< 
<<< Invocation of Main class completed <<< 
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], exit code [1] 
Oozie Launcher failed, finishing Hadoop job gracefully 

我已經把shell文件在lib文件夾中的工作空間,添加的所有所需的jar文件在同一個lib文件夾中。請幫我解決這個問題。

+0

正常運行PigScript? –

+0

簽入服務器。它工作正常 – Pratik

+0

嘗試檢查日誌類似stderr,stdout可能會有所幫助 –

回答

0

我這解決了這個問題通過以下步驟:

1)Created a workflow in hue placing a pig action to invoke pigscript. 
2)Generated the workflow.xml file by clicking the run button. 
3)Ran the workflow.xml through commandline by adding a shell wrapper class which iterates and gives dates as input parameters. 

JOB.PROPERTIES文件:

oozie.use.system.libpath=True 
security_enabled=False 
dryrun=False 
jobTracker=<jobtracker> 
nameNode=<nameNode> 
oozie.wf.application.path = /user/hue/oozie/workspaces/hue-oozie-1470122057.79/workflow.xml 

shell文件:

for date in 20160101 20160102 20160103 
oozie job -oozie http://<serverip>:11000/oozie -config job.properties run