mysql导入hdfs指定位置_MySQL数据库表 导入到 HDFS指定目录

[root@centos02 bin]#sqoop import --connect jdbc:mysql://centos02:3306/OfficialCashMid --username root --password sa123_***** --table tadminoperationlog --m 1 --target-dir /dirTadminoperationlog

Warning: /opt/bigdata/sqoop/sqoop-1.4.7/../hbase does not exist!HBase imports will fail.

Please set$HBASE_HOMEto the root of your HBase installation.

Warning:/opt/bigdata/sqoop/sqoop-1.4.7/../hcatalog does not exist!HCatalog jobs will fail.

Please set$HCAT_HOMEto the root of your HCatalog installation.

Warning:/opt/bigdata/sqoop/sqoop-1.4.7/../accumulo does not exist!Accumulo imports will fail.

Please set$ACCUMULO_HOMEto the root of your Accumulo installation.

Warning:/opt/bigdata/sqoop/sqoop-1.4.7/../zookeeper does not exist!Accumulo imports will fail.

Please set$ZOOKEEPER_HOMEto the root of your Zookeeper installation.19/09/03 10:59:39 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7

19/09/03 10:59:39 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.19/09/03 10:59:40INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.19/09/03 10:59:40INFO tool.CodeGenTool: Beginning code generation

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.19/09/03 10:59:40 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `tadminoperationlog` AS t LIMIT 1

19/09/03 10:59:41 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `tadminoperationlog` AS t LIMIT 1

19/09/03 10:59:41 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /opt/bigdata/hadoop/hadoop-2.8.5注:/tmp/sqoop-root/compile/f2781e5449075de95fc5fe2f7fc872d8/tadminoperationlog.java使用或覆盖了已过时的 API。

注: 有关详细信息, 请使用-Xlint:deprecation 重新编译。19/09/03 10:59:47 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-root/compile/f2781e5449075de95fc5fe2f7fc872d8/tadminoperationlog.jar19/09/03 10:59:47WARN manager.MySQLManager: It looks like you are importing from mysql.19/09/03 10:59:47 WARN manager.MySQLManager: This transfer can be faster! Use the --direct19/09/03 10:59:47 WARN manager.MySQLManager: option to exercise a MySQL-specific fast path.19/09/03 10:59:47INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql)19/09/03 10:59:47INFO mapreduce.ImportJobBase: Beginning import of tadminoperationlog19/09/03 10:59:48 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable19/09/03 10:59:48INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar19/09/03 10:59:49INFO Configuration.deprecation: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps19/09/03 10:59:49 INFO client.RMProxy: Connecting to ResourceManager at centos02/192.168.122.1:8032

19/09/03 10:59:58INFO db.DBInputFormat: Using read commited transaction isolation19/09/03 10:59:58 INFO mapreduce.JobSubmitter: number of splits:1

19/09/03 10:59:59 INFO mapreduce.JobSubmitter: Submitting tokens forjob: job_1567472733544_000119/09/03 11:00:00INFO impl.YarnClientImpl: Submitted application application_1567472733544_000119/09/03 11:00:01 INFO mapreduce.Job: The url to track the job: http://centos02:8088/proxy/application_1567472733544_0001/

19/09/03 11:00:01INFO mapreduce.Job: Running job: job_1567472733544_000119/09/03 11:00:41 INFO mapreduce.Job: Job job_1567472733544_0001 running in uber mode : false

19/09/03 11:00:41 INFO mapreduce.Job: map 0% reduce 0%

19/09/03 11:01:36 INFO mapreduce.Job: map 100% reduce 0%

19/09/03 11:01:38INFO mapreduce.Job: Job job_1567472733544_0001 completed successfully19/09/03 11:01:38 INFO mapreduce.Job: Counters: 30File System Counters

FILE: Number of bytes read=0FILE: Number of bytes written=178920FILE: Number of read operations=0FILE: Number of large read operations=0FILE: Number of write operations=0HDFS: Number of bytes read=87HDFS: Number of bytes written=3753700HDFS: Number of read operations=4HDFS: Number of large read operations=0HDFS: Number of write operations=2Job Counters

Launched map tasks=1Other local map tasks=1Total time spent by all mapsin occupied slots (ms)=49905Total time spent by all reducesin occupied slots (ms)=0Total time spent by all map tasks (ms)=49905Total vcore-milliseconds taken by all map tasks=49905Total megabyte-milliseconds taken by all map tasks=51102720Map-Reduce Framework

Map input records=12122Map output records=12122Input split bytes=87Spilled Records=0Failed Shuffles=0Merged Map outputs=0GC time elapsed (ms)=248CPU time spent (ms)=7740Physical memory (bytes) snapshot=189337600Virtual memory (bytes) snapshot=2121957376Total committed heap usage (bytes)=92274688File Input Format Counters

Bytes Read=0File Output Format Counters

Bytes Written=3753700

19/09/03 11:01:38 INFO mapreduce.ImportJobBase: Transferred 3.5798 MB in 108.9399 seconds (33.649 KB/sec)19/09/03 11:01:38 INFO mapreduce.ImportJobBase: Retrieved 12122records.

[root@centos02 bin]#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值