Sqoop export to mysql from hive failed


#1

Hi ,
i have 7 records in the hive and in hdfs file. I verified both hive and also in hdfs file. When i run the below command , only 6 is getting copied the last one is not exported and job failed. below is the job output. Can you please advise me what is the mistake here.
sqoop export
–connect jdbc:mysql://ms.itversity.com/retail_export
–username retail_user
–password itversity
–table daily_revenue
–export-dir /apps/hive/warehouse/subrudata_sqoop_import.db/daily_revenue
–input-fields-terminated-by “\001”

Job output ::

sqoop export \

–connect jdbc:mysql://ms.itversity.com/retail_export
–username retail_user
–password itversity
–table daily_revenue
–export-dir /apps/hive/warehouse/subrudata_sqoop_import.db/daily_revenue
–input-fields-terminated-by “\001”
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
18/05/20 16:34:35 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.5.0.0-1245
18/05/20 16:34:35 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
18/05/20 16:34:35 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
18/05/20 16:34:35 INFO tool.CodeGenTool: Beginning code generation
18/05/20 16:34:35 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM daily_revenue AS t LIMIT 1
18/05/20 16:34:35 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM daily_revenue AS t LIMIT 1
18/05/20 16:34:35 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/hdp/2.5.0.0-1245/hadoop-mapreduce
Note: /tmp/sqoop-subrudata/compile/640e4df7760859fb26027af4078ce90d/daily_revenue.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
18/05/20 16:34:36 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-subrudata/compile/640e4df7760859fb26027af4078ce90d/daily_revenue.jar
18/05/20 16:34:36 INFO mapreduce.ExportJobBase: Beginning export of daily_revenue
18/05/20 16:34:38 INFO impl.TimelineClientImpl: Timeline service address: http://rm01.itversity.com:8188/ws/v1/timeline/
18/05/20 16:34:38 INFO client.RMProxy: Connecting to ResourceManager at rm01.itversity.com/172.16.1.106:8050
18/05/20 16:34:39 INFO client.AHSProxy: Connecting to Application History server at rm01.itversity.com/172.16.1.106:10200
18/05/20 16:34:48 INFO input.FileInputFormat: Total input paths to process : 1
18/05/20 16:34:48 INFO input.FileInputFormat: Total input paths to process : 1
18/05/20 16:34:49 INFO mapreduce.JobSubmitter: number of splits:4
18/05/20 16:34:49 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1525279861629_17336
18/05/20 16:34:49 INFO impl.YarnClientImpl: Submitted application application_1525279861629_17336
18/05/20 16:34:49 INFO mapreduce.Job: The url to track the job: http://rm01.itversity.com:19288/proxy/application_1525279861629_17336/
18/05/20 16:34:49 INFO mapreduce.Job: Running job: job_1525279861629_17336
18/05/20 16:34:57 INFO mapreduce.Job: Job job_1525279861629_17336 running in uber mode : false
18/05/20 16:34:57 INFO mapreduce.Job: map 0% reduce 0%
18/05/20 16:35:03 INFO mapreduce.Job: map 50% reduce 0%
18/05/20 16:35:04 INFO mapreduce.Job: map 75% reduce 0%
18/05/20 16:35:05 INFO mapreduce.Job: map 100% reduce 0%
18/05/20 16:35:10 INFO mapred.ClientServiceDelegate: Application state is completed. FinalApplicationStatus=FAILED. Redirecting to job history server
18/05/20 16:35:10 INFO mapreduce.Job: map 0% reduce 100%
18/05/20 16:35:10 INFO mapreduce.Job: Job job_1525279861629_17336 failed with state FAILED due to:
18/05/20 16:35:10 INFO mapreduce.ExportJobBase: The MapReduce job has already been retired. Performance
18/05/20 16:35:10 INFO mapreduce.ExportJobBase: counters are unavailable. To get this information,
18/05/20 16:35:10 INFO mapreduce.ExportJobBase: you will need to enable the completed job store on
18/05/20 16:35:10 INFO mapreduce.ExportJobBase: the jobtracker with:
18/05/20 16:35:10 INFO mapreduce.ExportJobBase: mapreduce.jobtracker.persist.jobstatus.active = true
18/05/20 16:35:10 INFO mapreduce.ExportJobBase: mapreduce.jobtracker.persist.jobstatus.hours = 1
18/05/20 16:35:10 INFO mapreduce.ExportJobBase: A jobtracker restart is required for these settings
18/05/20 16:35:10 INFO mapreduce.ExportJobBase: to take effect.
18/05/20 16:35:10 ERROR mapreduce.ExportJobBase: Export job failed!
18/05/20 16:35:10 ERROR tool.ExportTool: Error during export: Export job failed!


#2

@subbu_n Sqoop export is working fine.
image
image