0

I'm a newbie and I am trying initiate an import processing from a linux command line: to import a table from mysql to hdfs using sqoop but I seem to be experiencing some errors and import fails, even though my Java version is 1.8. I have studied the error codes to identify what the problem is but I seem not to understand it . Here is my code and the error I am having

sqoop import --connect jdbc:mysql://localhost/test --username root --password 'root' --table lee --target-dir sqoop/lee2;

Error Code

Warning: /usr/lib/hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
20/07/27 11:03:01 INFO sqoop.Sqoop: Running Sqoop version: 1.4.3-cdh4.7.1
20/07/27 11:03:01 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
20/07/27 11:03:01 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
20/07/27 11:03:01 INFO tool.CodeGenTool: Beginning code generation
20/07/27 11:03:02 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `lee` AS t LIMIT 1
20/07/27 11:03:02 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `lee` AS t LIMIT 1
20/07/27 11:03:02 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/lib/hadoop-mapreduce
Note: /tmp/sqoop-training/compile/705c3feafe814917756c3176da85c34f/lee.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
20/07/27 11:03:03 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-training/compile/705c3feafe814917756c3176da85c34f/lee.jar
20/07/27 11:03:03 WARN manager.MySQLManager: It looks like you are importing from mysql.
20/07/27 11:03:03 WARN manager.MySQLManager: This transfer can be faster! Use the --direct
20/07/27 11:03:03 WARN manager.MySQLManager: option to exercise a MySQL-specific fast path.
20/07/27 11:03:03 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql)
20/07/27 11:03:03 INFO mapreduce.ImportJobBase: Beginning import of lee
20/07/27 11:03:03 WARN conf.Configuration: mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
20/07/27 11:03:04 WARN conf.Configuration: mapred.jar is deprecated. Instead, use mapreduce.job.jar
20/07/27 11:03:04 WARN conf.Configuration: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps
20/07/27 11:03:04 INFO service.AbstractService: Service:org.apache.hadoop.yarn.client.YarnClientImpl is inited.
20/07/27 11:03:04 INFO service.AbstractService: Service:org.apache.hadoop.yarn.client.YarnClientImpl is started.
20/07/27 11:03:06 INFO db.DataDrivenDBInputFormat: BoundingValsQuery: SELECT MIN(`id`), MAX(`id`) FROM `lee`
20/07/27 11:03:06 INFO mapreduce.JobSubmitter: number of splits:3
20/07/27 11:03:06 WARN conf.Configuration: mapred.job.name is deprecated. Instead, use mapreduce.job.name
20/07/27 11:03:06 WARN conf.Configuration: mapred.cache.files.timestamps is deprecated. Instead, use mapreduce.job.cache.files.timestamps
20/07/27 11:03:06 WARN conf.Configuration: mapreduce.map.class is deprecated. Instead, use mapreduce.job.map.class
20/07/27 11:03:06 WARN conf.Configuration: mapreduce.inputformat.class is deprecated. Instead, use mapreduce.job.inputformat.class
20/07/27 11:03:06 WARN conf.Configuration: mapreduce.outputformat.class is deprecated. Instead, use mapreduce.job.outputformat.class
20/07/27 11:03:06 WARN conf.Configuration: mapred.output.value.class is deprecated. Instead, use mapreduce.job.output.value.class
20/07/27 11:03:06 WARN conf.Configuration: mapred.output.dir is deprecated. Instead, use mapreduce.output.fileoutputformat.outputdir
20/07/27 11:03:06 WARN conf.Configuration: mapred.cache.files is deprecated. Instead, use mapreduce.job.cache.files
20/07/27 11:03:06 WARN conf.Configuration: mapred.working.dir is deprecated. Instead, use mapreduce.job.working.dir
20/07/27 11:03:06 WARN conf.Configuration: mapred.job.classpath.files is deprecated. Instead, use mapreduce.job.classpath.files
20/07/27 11:03:06 WARN conf.Configuration: mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces
20/07/27 11:03:06 WARN conf.Configuration: mapred.output.key.class is deprecated. Instead, use mapreduce.job.output.key.class
20/07/27 11:03:06 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1595623626771_0002
20/07/27 11:03:06 INFO client.YarnClientImpl: Submitted application application_1595623626771_0002 to ResourceManager at /0.0.0.0:8032
20/07/27 11:03:06 INFO mapreduce.Job: The url to track the job: http://hadoop:8088/proxy/application_1595623626771_0002/
20/07/27 11:03:06 INFO mapreduce.Job: Running job: job_1595623626771_0002
20/07/27 11:03:14 INFO mapreduce.Job: Job job_1595623626771_0002 running in uber mode : false
20/07/27 11:03:14 INFO mapreduce.Job:  map 0% reduce 0%
20/07/27 11:03:23 INFO mapreduce.Job: Task Id : attempt_1595623626771_0002_m_000001_0, Status : FAILED
Error: lee : Unsupported major.minor version 52.0
20/07/27 11:03:23 INFO mapreduce.Job: Task Id : attempt_1595623626771_0002_m_000002_0, Status : FAILED
Error: lee : Unsupported major.minor version 52.0
20/07/27 11:03:23 INFO mapreduce.Job: Task Id : attempt_1595623626771_0002_m_000000_0, Status : FAILED
Error: lee : Unsupported major.minor version 52.0
20/07/27 11:03:32 INFO mapreduce.Job: Task Id : attempt_1595623626771_0002_m_000000_1, Status : FAILED
Error: lee : Unsupported major.minor version 52.0
20/07/27 11:03:33 INFO mapreduce.Job: Task Id : attempt_1595623626771_0002_m_000002_1, Status : FAILED
Error: lee : Unsupported major.minor version 52.0
20/07/27 11:03:33 INFO mapreduce.Job: Task Id : attempt_1595623626771_0002_m_000001_1, Status : FAILED
Error: lee : Unsupported major.minor version 52.0
20/07/27 11:03:41 INFO mapreduce.Job: Task Id : attempt_1595623626771_0002_m_000000_2, Status : FAILED
Error: lee : Unsupported major.minor version 52.0
20/07/27 11:03:42 INFO mapreduce.Job: Task Id : attempt_1595623626771_0002_m_000001_2, Status : FAILED
Error: lee : Unsupported major.minor version 52.0
20/07/27 11:03:43 INFO mapreduce.Job: Task Id : attempt_1595623626771_0002_m_000002_2, Status : FAILED
Error: lee : Unsupported major.minor version 52.0
20/07/27 11:03:50 INFO mapreduce.Job:  map 33% reduce 0%
20/07/27 11:03:50 INFO mapreduce.Job: Job job_1595623626771_0002 failed with state FAILED due to: Task failed task_1595623626771_0002_m_000000
Job failed as tasks failed. failedMaps:1 failedReduces:0

20/07/27 11:03:51 INFO mapreduce.Job: Counters: 8
    Job Counters 
        Failed map tasks=10
        Launched map tasks=12
        Other local map tasks=12
        Total time spent by all maps in occupied slots (ms)=80903
        Total time spent by all reduces in occupied slots (ms)=0
    Map-Reduce Framework
        CPU time spent (ms)=0
        Physical memory (bytes) snapshot=0
        Virtual memory (bytes) snapshot=0
20/07/27 11:03:51 WARN mapreduce.Counters: Group FileSystemCounters is deprecated. Use org.apache.hadoop.mapreduce.FileSystemCounter instead
20/07/27 11:03:51 INFO mapreduce.ImportJobBase: Transferred 0 bytes in 46.4433 seconds (0 bytes/sec)
20/07/27 11:03:51 INFO mapreduce.ImportJobBase: Retrieved 0 records.
20/07/27 11:03:51 ERROR tool.ImportTool: Error during import: Import job failed!


Abiodun
  • 959
  • 6
  • 17
  • 38
  • You need to use JDK version 1.8. Does this answer your question? [Unsupported major.minor version 52.0](https://stackoverflow.com/questions/22489398/unsupported-major-minor-version-52-0) – mazaneicha Jul 27 '20 at 22:46
  • @mazaneicha java version is 1.8 or what are you referring to please – Abiodun Jul 27 '20 at 23:39
  • 1
    The error that you're getting `Unsupported major.minor version 52` says that JVM that runs (most likely 1.7) does not support version with which the classes were compiled (1.8). Why are you using cdh 4.7.1 by the way? its ancient! – mazaneicha Jul 28 '20 at 00:17
  • @mazaneicha please how do I resolve this? – Abiodun Jul 28 '20 at 12:10

0 Answers0