[wjy@yue root]$ sqoop export \
> --connect jdbc:mysql://localhost:3306/coffee_sales?serverTimezone=UTC\&useSSL=false\&allowPublicKeyRetrieval=true\&characterEncoding=utf8 \
> --username root \
> --password Root@123456 \
> --driver com.mysql.cj.jdbc.Driver \
> --table coffee_sales_detail \
> --export-dir /root/mapreduce/data \
> --input-fields-terminated-by ',' \
> --columns "hour_of_day,cash_type,money,coffee_name,Time_of_Day,Weekday,Month_name,Weekdaysort,Monthsort,Date,Time" \
> --m 1
Warning: /home/wjy/opt/sqoop/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /home/wjy/opt/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /home/wjy/opt/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Warning: /home/wjy/opt/sqoop/../zookeeper does not exist! Accumulo imports will fail.
Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
2025-12-11 20:32:31,411 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
2025-12-11 20:32:31,541 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
2025-12-11 20:32:31,703 WARN sqoop.ConnFactory: Parameter --driver is set to an explicit driver however appropriate connection manager is not being set (via --connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.
2025-12-11 20:32:31,734 INFO manager.SqlManager: Using default fetchSize of 1000
2025-12-11 20:32:31,734 INFO tool.CodeGenTool: Beginning code generation
2025-12-11 20:32:32,721 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM coffee_sales_detail AS t WHERE 1=0
2025-12-11 20:32:32,825 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /home/wjy/app/hadoop
注: /tmp/sqoop-wjy/compile/fd56bb22a3a774d34036c0cc4f6560c7/coffee_sales_detail.java使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
2025-12-11 20:32:37,349 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-wjy/compile/fd56bb22a3a774d34036c0cc4f6560c7/coffee_sales_detail.jar
2025-12-11 20:32:37,410 INFO mapreduce.ExportJobBase: Beginning export of coffee_sales_detail
2025-12-11 20:32:37,411 INFO Configuration.deprecation: mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
2025-12-11 20:32:38,142 INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar
2025-12-11 20:32:40,275 INFO Configuration.deprecation: mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative
2025-12-11 20:32:40,283 INFO Configuration.deprecation: mapred.map.tasks.speculative.execution is deprecated. Instead, use mapreduce.map.speculative
2025-12-11 20:32:40,285 INFO Configuration.deprecation: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps
2025-12-11 20:32:40,704 INFO client.DefaultNoHARMFailoverProxyProvider: Connecting to ResourceManager at yue/192.168.47.130:8032
2025-12-11 20:32:42,326 INFO mapreduce.JobResourceUploader: Disabling Erasure Coding for path: /tmp/hadoop-yarn/staging/wjy/.staging/job_1765450395010_0010
2025-12-11 20:32:48,259 INFO input.FileInputFormat: Total input files to process : 1
2025-12-11 20:32:48,262 INFO input.FileInputFormat: Total input files to process : 1
2025-12-11 20:32:48,443 INFO mapreduce.JobSubmitter: number of splits:1
2025-12-11 20:32:48,611 INFO Configuration.deprecation: mapred.map.tasks.speculative.execution is deprecated. Instead, use mapreduce.map.speculative
2025-12-11 20:32:49,314 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1765450395010_0010
2025-12-11 20:32:49,314 INFO mapreduce.JobSubmitter: Executing with tokens: []
2025-12-11 20:32:49,893 INFO conf.Configuration: resource-types.xml not found
2025-12-11 20:32:49,896 INFO resource.ResourceUtils: Unable to find 'resource-types.xml'.
2025-12-11 20:32:50,264 INFO impl.YarnClientImpl: Submitted application application_1765450395010_0010
2025-12-11 20:32:50,370 INFO mapreduce.Job: The url to track the job: http://yue:8088/proxy/application_1765450395010_0010/
2025-12-11 20:32:50,371 INFO mapreduce.Job: Running job: job_1765450395010_0010
2025-12-11 20:33:21,869 INFO mapreduce.Job: Job job_1765450395010_0010 running in uber mode : false
2025-12-11 20:33:21,895 INFO mapreduce.Job: map 0% reduce 0%
2025-12-11 20:33:48,289 INFO mapreduce.Job: map 100% reduce 0%
2025-12-11 20:33:49,327 INFO mapreduce.Job: Job job_1765450395010_0010 failed with state FAILED due to: Task failed task_1765450395010_0010_m_000000
Job failed as tasks failed. failedMaps:1 failedReduces:0 killedMaps:0 killedReduces: 0
2025-12-11 20:33:49,520 INFO mapreduce.Job: Counters: 8
Job Counters
Failed map tasks=1
Launched map tasks=1
Data-local map tasks=1
Total time spent by all maps in occupied slots (ms)=23203
Total time spent by all reduces in occupied slots (ms)=0
Total time spent by all map tasks (ms)=23203
Total vcore-milliseconds taken by all map tasks=23203
Total megabyte-milliseconds taken by all map tasks=23759872
2025-12-11 20:33:49,543 WARN mapreduce.Counters: Group FileSystemCounters is deprecated. Use org.apache.hadoop.mapreduce.FileSystemCounter instead
2025-12-11 20:33:49,549 INFO mapreduce.ExportJobBase: Transferred 0 bytes in 69.2157 seconds (0 bytes/sec)
2025-12-11 20:33:49,563 WARN mapreduce.Counters: Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
2025-12-11 20:33:49,563 INFO mapreduce.ExportJobBase: Exported 0 records.
2025-12-11 20:33:49,563 ERROR mapreduce.ExportJobBase: Export job failed!
2025-12-11 20:33:49,568 ERROR tool.ExportTool: Error during export:
Export job failed!
at org.apache.sqoop.mapreduce.ExportJobBase.runExport(ExportJobBase.java:445)
at org.apache.sqoop.manager.SqlManager.exportTable(SqlManager.java:931)
at org.apache.sqoop.tool.ExportTool.exportTable(ExportTool.java:80)
at org.apache.sqoop.tool.ExportTool.run(ExportTool.java:99)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:81)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243)
at org.apache.sqoop.Sqoop.main(Sqoop.java:252)
[wjy@yue root]$
最新发布