2013年8月1日星期四

oozie + sqoop ClassNotFound

Want to run a sqoop of action oozie
wrote a workflow is as follows

<workflow-app xmlns='uri:oozie:workflow:0.4' name='sqoop-workflow'>
<start to='testSqoop'/>
<action name='testSqoop'>
<sqoop xmlns='uri:oozie:sqoop-action:0.2'>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<arg>import</arg>
<arg>--connect</arg>
<arg>jdbc:mysql://127.0.0.1/snaplb_query</arg>
<arg>--table</arg>
<arg>test_table</arg>
<arg>--username</arg>
<arg>root</arg>
<arg>--password</arg>
<arg>XXOO</arg>
<arg>--hive-import</arg>
<arg>--hive-partition-key</arg>
<arg>dt</arg>
<arg>--hive-partition-value</arg>
<arg>2013-05-22</arg>
</sqoop>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name='fail'>
<message>Sqoop copy shell action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name='end'/>
</workflow-app>



Runtime Error Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SqoopMain], main () threw exception, org / apache / sqoop / Sqoop
java.lang.NoClassDefFoundError: org / apache / sqoop / Sqoop
at org.apache.oozie.action.hadoop.SqoopMain.runSqoopJob (SqoopMain.java: 205)
at org.apache.oozie.action.hadoop.SqoopMain.run (SqoopMain.java: 174)
at org.apache.oozie.action.hadoop.LauncherMain.run (LauncherMain.java: 37)
at org.apache.oozie.action.hadoop.SqoopMain.main (SqoopMain.java: 47)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java: 39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java: 25)
at java.lang.reflect.Method.invoke (Method.java: 597)
at org.apache.oozie.action.hadoop.LauncherMapper.map (LauncherMapper.java: 491)
at org.apache.hadoop.mapred.MapRunner.run (MapRunner.java: 50)
at org.apache.hadoop.mapred.MapTask.runOldMapper (MapTask.java: 418)
at org.apache.hadoop.mapred.MapTask.run (MapTask.java: 333)
at org.apache.hadoop.mapred.Child $ 4.run (Child.java: 268)
at java.security.AccessController.doPrivileged (Native Method)
at javax.security.auth.Subject.doAs (Subject.java: 396)
at org.apache.hadoop.security.UserGroupInformation.doAs (UserGroupInformation.java: 1408)
at org.apache.hadoop.mapred.Child.main (Child.java: 262)
Caused by: java.lang.ClassNotFoundException: org.apache.sqoop.Sqoop
at java.net.URLClassLoader $ 1.run (URLClassLoader.java: 202)
at java.security.AccessController.doPrivileged (Native Method)
at java.net.URLClassLoader.findClass (URLClassLoader.java: 190)
at java.lang.ClassLoader.loadClass (ClassLoader.java: 306)
at sun.misc.Launcher $ AppClassLoader.loadClass (Launcher.java: 301)
at java.lang.ClassLoader.loadClass (ClassLoader.java: 247)
... 17 more
sqoop jar package properly in sqoop the path, I even tried to copy it to the lib under mapreduce, oozie mapreduce task jar package loaded loaded with all mapreduce the jar package, simply put sqoop of package throws go, I guess where should change the configuration can get, ask everyone who understand to finger Ming Lu, thank you

------ Solution ------------------------------------ --------
Hello, what is your hadoop with sqoop, oozie what version is it? Just wrote a workflow with the job configuration? jar package like it? Specifically, the following procedure can do? I reported errors are found sqoop label
------ Solution ------------------------------ --------------
I never played oozie, oozie you have your own lib directory
If so, put into a jar sqoop to try
or join in the CLASSPATH sqoop package
------ For reference only -------------------------- -------------
is not sharelib problem?
------ For reference only -------------------------------------- -

oozie has its own lib directory, I have tried, no
hadoop or mapred do not know where the CLASSPATH configuration, headache
------ For reference only ---------------------- -----------------

hadoop version Hadoop 2.0.0-cdh4.2.0
oozie version 3.3.0-cdh4.2.0
sqoop version 1.4.2-cdh4.2.0
all cdh4.2.0 integrated
I just wrote a workflow, simply just ran a sqoop command, do not need to do jar package
------ For reference only ------------- --------------------------

What is this problem? How to change?
------ For reference only -------------------------------------- -
your package LIB missing SQOOP reference, the need to carefully check the LZ
There is a possibility that your LIB library environment dirty
This is due to some kind of LIB library JAR, there are different versions, different versions of the JAR added repeatedly can cause this problem


------ For reference only ---------------------------------- -----
get, simply put the jar package into workflow sqoop path where the lib under
------ For reference only ------------ ---------------------------
Hello, may I ask mahout integration with oozie did use it? If you do not oozie with java program it? And the java program is executed a mahout command line algorithm

没有评论:

发表评论