Java程序是实现sqoop把数据从mysql数据库中导入hdfs中,但是报错了!

可爱的ZLZLZL 发布于 2012/11/20 16:22
阅读 5K+
收藏 0

Java程序是实现sqoop把数据从mysql数据库中导入hdfs中,但是报错了!

12/11/20 16:18:18 WARN mapreduce.JobBase: SQOOP_HOME is unset. May not be able to find all job dependencies.
java.lang.NoSuchMethodError: org.apache.hadoop.ipc.RPC.getProxy(Ljava/lang/Class;JLjava/net/InetSocketAddress;Lorg/apache/hadoop/security/UserGroupInformation;Lorg/apache/hadoop/conf/Configuration;Ljavax/net/SocketFactory;)Ljava/lang/Object;
    at org.apache.hadoop.mapred.JobClient.createRPCProxy(JobClient.java:520)
    at org.apache.hadoop.mapred.JobClient.init(JobClient.java:505)
    at org.apache.hadoop.mapred.JobClient.<init>(JobClient.java:476)
    at org.apache.hadoop.mapreduce.Job$1.run(Job.java:544)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Unknown Source)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1115)
    at org.apache.hadoop.mapreduce.Job.connect(Job.java:542)
    at org.apache.hadoop.mapreduce.Job.submit(Job.java:530)
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:561)
    at com.cloudera.sqoop.mapreduce.ImportJobBase.runJob(ImportJobBase.java:107)
    at com.cloudera.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:166)
    at com.cloudera.sqoop.manager.SqlManager.importTable(SqlManager.java:386)
    at com.cloudera.sqoop.manager.MySQLManager.importTable(MySQLManager.java:125)
    at com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:350)
    at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:423)
    at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
    at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
    at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:218)
    at com.cloudera.sqoop.Sqoop.main(Sqoop.java:228)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
    at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
    at com.neusoft.iotic.collector.rmdb.RmdbJobExecutor.saveToHdfs(RmdbJobExecutor.java:110)
    at com.neusoft.iotic.collector.rmdb.RmdbJobExecutor.main(RmdbJobExecutor.java:126)

怎么回事呢?要怎么解决?

加载中
0
s
suiyuan123
是不是应该要配置下 SQOOP_HOME的环境变量
可爱的ZLZLZL
可爱的ZLZLZL
好像是jar包冲突了,已经换别的办法了!
0
lishengang
lishengang
您好,我现在也在研究写java程序来实现sqoop将mysql数据导入到hadoop中,请教下你是怎么用java来实现的,可以给我个实例吗?非常感谢! 方便的话加我qq:1360906873
0
f
free9277
你好,我现在也遇到了你这个问题,能不能帮我解决一下。方便的话加我qq:253880499.谢谢!
0
Sam_min
Sam_min
 sqoop提供了api接口么? 可以用java连接么
返回顶部
顶部