2016-07-28 138 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