【发布时间】:2019-05-29 10:35:47
【问题描述】:
Sqoop 导入操作在作为 oozie 作业运行时出错。
我正在使用伪分布式 hadoop 集群。 我已按照以下步骤操作。
1.启动oozie服务器
2.编辑job.properties和workflow.xml文件
3.将workflow.xml复制到hdfs中
4.运行 oozie 作业
我的 job.properties 文件
nameNode=hdfs://localhost:8020
jobTracker=localhost:8021
queueName=default
examplesRoot=examples
oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/user/hduser/${examplesRoot}/apps/sqoop
workflow.xml 文件
<action name="sqoop-node">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<prepare>
<delete path="${nameNode}/user/hduser/${examplesRoot}/output-data/sqoop"/>
<!--<mkdir path="${nameNode}/user/hduser/${examplesRoot}/output-data"/>-->
</prepare>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<command>import --connect "jdbc:mysql://localhost/db" --username user --password pass --table "table" --where "Conditions" --driver com.mysql.jdbc.Driver --target-dir ${nameNode}/user/hduser/${examplesRoot}/output-data/sqoop -m 1</command>
<!--<file>db.hsqldb.properties#db.hsqldb.properties</file>
<file>db.hsqldb.script#db.hsqldb.script</file>-->
</sqoop>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Sqoop failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
我原以为作业将运行而不会出现任何错误。但是作业被杀死了,它给出了以下错误。
UnsupportedOperationException: 不允许访问本地文件系统。
我不明白我错在哪里以及为什么不允许完成工作? 谁能帮我解决这个问题。
【问题讨论】: