1

我可以使用以下命令通过 sqoop 从 oracle 11g 导入数据

import"
                , "-fs",  "file:///"
                , "-jt", "local"
                , "-libjars", "/tmp/HELLO/tej01/EMP.jar"
                , "--connect", "jdbc:oracle:thin:@192.168.1.111:1522:test"
                , "--username", "SCOTT", "--password", "password"
                ,"--table","EMP"
                ,"--inline-lob-limit","0"
                , "-m", "1"
                ,"--target-dir","/tmp/HELLO/tej01"
                ,"--fields-terminated-by", "^"
                , "--enclosed-by", enclosedBY

现在我正在尝试使用 sqoop 导入 sybase-ase 的数据。为此,我使用了以下命令 -

sqoop import --verbose --connect jdbc:sybase:Tds:[host]:5000?ServiceName=master --username sa --password password --query  "select * from City where \$CONDITIONS" --target-dir /tmp/HELLO/tej01 --driver "com.sybase.jdbc4.jdbc.SybDriver" -m 1

但我收到以下错误 -

    ERROR tool.ImportTool: Encountered IOException running import job: java.io.FileNotFoundException: File does not exist: hdfs://[host]:54310/usr/lib/sqoop/lib/parquet-format-2.0.0.jar
at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1122)
at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1114)
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1114)
at org.apache.hadoop.mapreduce.filecache.ClientDistributedCacheManager.getFileStatus(ClientDistributedCacheManager.java:288)
at org.apache.hadoop.mapreduce.filecache.ClientDistributedCacheManager.getFileStatus(ClientDistributedCacheManager.java:224)
at org.apache.hadoop.mapreduce.filecache.ClientDistributedCacheManager.determineTimestamps(ClientDistributedCacheManager.java:93)
at org.apache.hadoop.mapreduce.filecache.ClientDistributedCacheManager.determineTimestampsAndCacheVisibilities(ClientDistributedCacheManager.java:57)
at org.apache.hadoop.mapreduce.JobSubmitter.copyAndConfigureFiles(JobSubmitter.java:269)
at org.apache.hadoop.mapreduce.JobSubmitter.copyAndConfigureFiles(JobSubmitter.java:390)
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:483)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1296)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1293)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1293)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1314)
at org.apache.sqoop.mapreduce.ImportJobBase.doSubmitJob(ImportJobBase.java:196)
at org.apache.sqoop.mapreduce.ImportJobBase.runJob(ImportJobBase.java:169)
at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:266)
at org.apache.sqoop.manager.SqlManager.importQuery(SqlManager.java:729)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:499)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

这个jar文件已经在sqoop的lib文件夹中了。请帮我。我在用

Hadoop版本:2.6.0

Sqoop 版本:1.4.6

4

1 回答 1

0

问题通过以下命令解决

sqoop import --verbose --connect jdbc:sybase:Tds:192.168.1.102:5000?ServiceName=master --username sa --password password --table Class --driver com.sybase.jdbc4.jdbc.SybDriver -m 1 --target-dir file:////tmp/HELLO/tej01
于 2016-01-20T13:05:53.553 回答