sqoop-classname(与表名相同)找不到错误

ffvjumwh  于 2021-07-13  发布在  Hadoop
关注(0)|答案(0)|浏览(154)

我正在尝试运行sqoop\u import(sqoop版本1.4.7)作为在线自学培训课程的一部分,但工作失败了。失败消息告诉我找不到类部门(我尝试导入的表的名称)。现在,上面的内容让我感到奇怪,因为bin文件夹中没有libjars目录:ln-s/tmp/hadoop-patricio2626/mapred/local/job\u local1734747532\u 0001\u 07f4bd36-8816-4442-b89c-8a4b3249827a/libjars/opt/hadoop-3.3.0/sqoop/bin/libjars/*事实上,文件系统中没有libjars文件夹。我甚至在bin(current dir)下创建了一个libjars文件夹,并将所有的/lib.jar文件放在其中。还是一样的失败。我还在当前目录中看到departments.class和departments.jar文件。因为我在sqoop中没有看到任何logs文件夹,所以我不确定如何解决这个问题。
思想?

Warning: /opt/hadoop-3.3.0/sqoop/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /opt/hadoop-3.3.0/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /opt/hadoop-3.3.0/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Warning: /opt/hadoop-3.3.0/sqoop/../zookeeper does not exist! Accumulo imports will fail.
Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
2021-03-01 17:17:08,691 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
2021-03-01 17:17:08,926 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
2021-03-01 17:17:09,018 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.
2021-03-01 17:17:09,035 INFO manager.SqlManager: Using default fetchSize of 1000
2021-03-01 17:17:09,035 INFO tool.CodeGenTool: Beginning code generation
2021-03-01 17:17:09,556 INFO manager.OracleManager: Time zone has been set to GMT
2021-03-01 17:17:09,612 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM DEPARTMENTS t WHERE 1=0
2021-03-01 17:17:09,672 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /opt/hadoop-3.3.0
Note: ./DEPARTMENTS.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2021-03-01 17:17:11,849 INFO orm.CompilationManager: Writing jar file: ./DEPARTMENTS.jar
2021-03-01 17:17:11,893 INFO manager.OracleManager: Time zone has been set to GMT
2021-03-01 17:17:11,946 INFO manager.OracleManager: Time zone has been set to GMT
2021-03-01 17:17:11,970 INFO mapreduce.ImportJobBase: Beginning import of DEPARTMENTS
2021-03-01 17:17:11,972 INFO Configuration.deprecation: mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
2021-03-01 17:17:12,153 INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar
2021-03-01 17:17:12,158 INFO manager.OracleManager: Time zone has been set to GMT
2021-03-01 17:17:12,680 INFO Configuration.deprecation: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps
2021-03-01 17:17:12,786 INFO impl.MetricsConfig: Loaded properties from hadoop-metrics2.properties
2021-03-01 17:17:12,814 INFO impl.MetricsSystemImpl: Scheduled Metric snapshot period at 10 second(s).
2021-03-01 17:17:12,814 INFO impl.MetricsSystemImpl: JobTracker metrics system started
2021-03-01 17:17:13,072 INFO db.DBInputFormat: Using read commited transaction isolation
2021-03-01 17:17:13,086 INFO mapreduce.JobSubmitter: number of splits:1
2021-03-01 17:17:13,478 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_local1734747532_0001
2021-03-01 17:17:13,478 INFO mapreduce.JobSubmitter: Executing with tokens: []
2021-03-01 17:17:13,799 INFO mapred.LocalDistributedCacheManager: Creating symlink: /tmp/hadoop-patricio2626/mapred/local/job_local1734747532_0001_07f4bd36-8816-4442-b89c-8a4b3249827a/libjars <- /opt/hadoop-3.3.0/sqoop/bin/libjars/*
2021-03-01 17:17:13,804 WARN fs.FileUtil: Command 'ln -s /tmp/hadoop-patricio2626/mapred/local/job_local1734747532_0001_07f4bd36-8816-4442-b89c-8a4b3249827a/libjars /opt/hadoop-3.3.0/sqoop/bin/libjars/*' failed 1 with: ln: fallo al crear el enlace simbólico '/opt/hadoop-3.3.0/sqoop/bin/libjars/*': No existe el fichero o el directorio
2021-03-01 17:17:13,804 WARN mapred.LocalDistributedCacheManager: Failed to create symlink: /tmp/hadoop-patricio2626/mapred/local/job_local1734747532_0001_07f4bd36-8816-4442-b89c-8a4b3249827a/libjars <- /opt/hadoop-3.3.0/sqoop/bin/libjars/*

**

2021-03-01 17:17:13,804 INFO mapred.LocalDistributedCacheManager: Localized file:/tmp/hadoop/mapred/staging/patricio26261734747532/.staging/job_local1734747532_0001/libjars as file:/tmp/hadoop-patricio2626/mapred/local/job_local1734747532_0001_07f4bd36-8816-4442-b89c-8a4b3249827a/libjars
2021-03-01 17:17:14,099 INFO mapreduce.Job: The url to track the job: http://localhost:8080/
2021-03-01 17:17:14,100 INFO mapreduce.Job: Running job: job_local1734747532_0001
2021-03-01 17:17:14,108 INFO mapred.LocalJobRunner: OutputCommitter set in config null
2021-03-01 17:17:14,114 INFO output.FileOutputCommitter: File Output Committer Algorithm version is 2
2021-03-01 17:17:14,114 INFO output.FileOutputCommitter: FileOutputCommitter skip cleanup _temporary folders under output directory:false, ignore cleanup failures: false
2021-03-01 17:17:14,139 INFO mapred.LocalJobRunner: OutputCommitter is org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter
2021-03-01 17:17:14,283 INFO mapred.LocalJobRunner: Waiting for map tasks
2021-03-01 17:17:14,285 INFO mapred.LocalJobRunner: Starting task: attempt_local1734747532_0001_m_000000_0
2021-03-01 17:17:14,309 INFO output.FileOutputCommitter: File Output Committer Algorithm version is 2
2021-03-01 17:17:14,309 INFO output.FileOutputCommitter: FileOutputCommitter skip cleanup _temporary folders under output directory:false, ignore cleanup failures: false
2021-03-01 17:17:14,338 INFO mapred.Task:  Using ResourceCalculatorProcessTree : [ ]
2021-03-01 17:17:14,380 INFO db.DBInputFormat: Using read commited transaction isolation
2021-03-01 17:17:14,383 INFO mapred.MapTask: Processing split: 1=1 AND 1=1
2021-03-01 17:17:14,396 INFO mapred.LocalJobRunner: map task executor complete.
2021-03-01 17:17:14,420 WARN mapred.LocalJobRunner: job_local1734747532_0001
java.lang.Exception: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class DEPARTMENTS not found
    at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:492)
    at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:552)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class DEPARTMENTS not found
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2665)
    at org.apache.sqoop.mapreduce.db.DBConfiguration.getInputClass(DBConfiguration.java:403)
    at org.apache.sqoop.mapreduce.db.OracleDataDrivenDBInputFormat.createDBRecordReader(OracleDataDrivenDBInputFormat.java:66)
    at org.apache.sqoop.mapreduce.db.DBInputFormat.createRecordReader(DBInputFormat.java:266)
    at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.<init>(MapTask.java:527)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:770)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:347)
    at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:271)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: Class DEPARTMENTS not found
    at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2569)
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2663)
    ... 12 more
2021-03-01 17:17:15,109 INFO mapreduce.Job: Job job_local1734747532_0001 running in uber mode : false
2021-03-01 17:17:15,110 INFO mapreduce.Job:  map 0% reduce 0%
2021-03-01 17:17:15,112 INFO mapreduce.Job: Job job_local1734747532_0001 failed with state FAILED due to: NA
2021-03-01 17:17:15,117 INFO mapreduce.Job: Counters: 0
2021-03-01 17:17:15,121 WARN mapreduce.Counters: Group FileSystemCounters is deprecated. Use org.apache.hadoop.mapreduce.FileSystemCounter instead
2021-03-01 17:17:15,123 INFO mapreduce.ImportJobBase: Transferred 0 bytes in 2,4189 seconds (0 bytes/sec)
2021-03-01 17:17:15,123 WARN mapreduce.Counters: Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
2021-03-01 17:17:15,123 INFO mapreduce.ImportJobBase: Retrieved 0 records.
2021-03-01 17:17:15,124 ERROR tool.ImportTool: Import failed: Import job failed!

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题