oozie作业配置应用程序目录

prdp8dxp  于 2021-06-03  发布在  Hadoop
关注(0)|答案(3)|浏览(300)

我在linux上安装了cloudera的伪分布式版本,并成功地运行了一些简单的mapreduce示例。但是,我正在尝试让oozie工作,并且在尝试执行简单的作业工作流时收到的错误使我完全困惑:

tim@phocion:~$ oozie version
Oozie client build version: 3.1.3-cdh4.0.1

将预打包的示例复制到hdfs并按照文档执行:

tim@phocion:~$ oozie job -oozie http://phocion:11000/oozie -config /user/tim/examples/apps/map-reduce/job.properties -run
Error: E0504 : E0504: App directory [hdfs://phocion:8020/user/tim/examples/apps/map-reduce] does not exist

检查文件是否存在:

tim@phocion:~$ hdfs dfs -ls /user/tim/examples/apps/map-reduce
Found 3 items
-rwxr-xr-x   1 tim tim        995 2012-10-03 14:47 /user/tim/examples/apps/map-reduce/job.properties
drwxrwxr-x   - tim tim       4096 2012-10-03 14:47 /user/tim/examples/apps/map-reduce/lib
-rwxr-xr-x   1 tim tim       2559 2012-10-03 14:47 /user/tim/examples/apps/map-reduce/workflow.xml

是的。我能接电话吗phocion:8020?

tim@phocion:~$ telnet phocion 8020
Trying 127.0.1.1...
Connected to phocion.
Escape character is '^]'.

我可以。所以,基本上,我完全不知道这个错误想告诉我什么-文件夹确实存在。我假设这个错误太模糊了,无法完全说明问题所在,但我发现几乎没有任何东西可以为我指明正确的方向。
我也可以复制这个错误与其他第三方教程。
花了很多时间浏览配置文件,以至于不想再看一次电脑。也许我在考虑这个问题,但任何帮助都将不胜感激。
编辑:添加完整job.properties(与默认值相差不大):

nameNode=hdfs://phocion:8020
jobTracker=phocion:8021
queueName=default
examplesRoot=examples
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/map-reduce
outputDir=map-reduce

更多编辑:当文件夹不存在时,在我将if放回hdfs之后,我会得到相同的错误。最后,chmod777认为这是一个权限问题,但仍然会出现相同的错误。在命令行上传递完整的hdfs路径并不能解决此问题。在oozie甚至根帐户下运行都不起作用:

tim@phocion:~$ oozie job -oozie http://phocion:11000/oozie -run -config /home/tim/examples/apps/map-reduce/job.properties -Doozie.wf.application.path=hdfs://phocion:8020/user/tim/examples/apps/map-reduce
Error: E0504 : E0504: App directory [hdfs://phocion:8020/user/tim/examples/apps/map-reduce] does not exist
tim@phocion:~$ hdfs dfs -put examples/ /user/tim/
12/10/04 13:26:43 INFO util.NativeCodeLoader: Loaded the native-hadoop library
tim@phocion:~$ oozie job -oozie http://phocion:11000/oozie -run -config /home/tim/examples/apps/map-reduce/job.properties -Doozie.wf.application.path=hdfs://phocion:8020/user/tim/examples/apps/map-reduce
Error: E0504 : E0504: App directory [hdfs://phocion:8020/user/tim/examples/apps/map-reduce] does not exist
tim@phocion:~$ hdfs dfs -chmod -R 777 /user/tim/examples/
12/10/04 13:28:16 INFO util.NativeCodeLoader: Loaded the native-hadoop library
tim@phocion:~$ oozie job -oozie http://phocion:11000/oozie -run -config /home/tim/examples/apps/map-reduce/job.properties -Doozie.wf.application.path=hdfs://phocion:8020/user/tim/examples/apps/map-reduce
Error: E0504 : E0504: App directory [hdfs://phocion:8020/user/tim/examples/apps/map-reduce] does not exist
tim@phocion:~$ sudo -u oozie oozie job -oozie http://phocion:11000/oozie -run -config /home/tim/examples/apps/map-reduce/job.properties -Doozie.wf.application.path=hdfs://phocion:8020/user/tim/examples/apps/map-reduce
[sudo] password for tim: 
Error: E0504 : E0504: App directory [hdfs://phocion:8020/user/tim/examples/apps/map-reduce] does not exist
tim@phocion:~$ sudo -u root oozie job -oozie http://phocion:11000/oozie -run -config /home/tim/examples/apps/map-reduce/job.properties -Doozie.wf.application.path=hdfs://phocion:8020/user/tim/examples/apps/map-reduce
Error: E0504 : E0504: App directory [hdfs://phocion:8020/user/tim/examples/apps/map-reduce] does not exist

这个命令理论上可行吗?

tim@phocion:~$ hdfs dfs -ls hdfs://phocion:8020/user/tim/examples/apps/map-reduce
ls: `hdfs://phocion:8020/user/tim/examples/apps/map-reduce': No such file or directory

在执行oozie命令后,这将显示在hadoop hdfs日志中:

2012-10-04 13:50:00,152 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Starting log segment at 113297
2012-10-04 13:50:00,874 INFO org.apache.hadoop.hdfs.server.namenode.TransferFsImage: Opening connection to http://localhost.localdomain:50090/getimage?getimage=1&txid=113296&storageInfo=-40:2092007576:0:cluster8
2012-10-04 13:50:00,875 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:hdfs (auth:SIMPLE) cause:java.net.ConnectException: Connection refused
2012-10-04 13:50:00,876 WARN org.mortbay.log: /getimage: java.io.IOException: GetImage failed. java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at java.net.Socket.connect(Socket.java:478)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:234)
        at sun.net.www.http.HttpClient.New(HttpClient.java:307)
        at sun.net.www.http.HttpClient.New(HttpClient.java:324)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
62lalag4

62lalag41#

你需要做的是 -copyFromLocal 将examples文件夹添加到jobs配置中指定的位置。

uklbhaso

uklbhaso2#

除了harshj的评论外,请查看您的错误消息:

Error: E0504 : E0504: App directory [hdfs://phocion:8020/user/tim/examples/apps/demo] does not exist

以及您提供的hadoop fs-ls清单:

/user/tim/examples/apps/map-reduce/

找出其中的区别:

/user/tim/examples/apps/demo
/user/tim/examples/apps/map-reduce/

尝试如下配置:

oozie.wf.application.path=/user/tim/examples/apps/map-reduce
6uxekuva

6uxekuva3#

我有一个相同的问题,并得到了它通过导出正确的oozie网址修复。
要导出,应使用以下命令

export OOZIE_URL=http://someip:11000/oozie

要获得这个oozie url,需要使用hue连接集群并导航到工作流,在那里可以找到一个名为 oozie . 在这里面,你应该看到许多属性将被列出的 Jmeter 。查找属性oozie.servers。

相关问题