sqoop--mysql导出到hdfs

[root@master ~]# sqoop import --connect jdbc:mysql://localhost/hadoopguide --table widgets -m 1 --username hadoopguide --password 'H@doopgu1de' 
Warning: /usr/local/src/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/local/src/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
25/02/18 20:41:10 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
25/02/18 20:41:10 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
25/02/18 20:41:10 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
25/02/18 20:41:10 INFO tool.CodeGenTool: Beginning code generation
Tue Feb 18 20:41:10 CST 2025 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
25/02/18 20:41:11 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `widgets` AS t LIMIT 1
25/02/18 20:41:11 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `widgets` AS t LIMIT 1
25/02/18 20:41:11 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/local/src/hadoop
注: /tmp/sqoop-root/compile/d1e66f095247b6ef7c6cf25dadc3745f/widgets.java使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
25/02/18 20:41:12 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-root/compile/d1e66f095247b6ef7c6cf25dadc3745f/widgets.jar
25/02/18 20:41:12 WARN manager.MySQLManager: It looks like you are importing from mysql.
25/02/18 20:41:12 WARN manager.MySQLManager: This transfer can be faster! Use the --direct
25/02/18 20:41:12 WARN manager.MySQLManager: option to exercise a MySQL-specific fast path.
25/02/18 20:41:12 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql)
25/02/18 20:41:12 INFO mapreduce.ImportJobBase: Beginning import of widgets
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/src/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/src/hbase/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
25/02/18 20:41:12 INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar
25/02/18 20:41:13 INFO Configuration.deprecation: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps
25/02/18 20:41:13 INFO client.RMProxy: Connecting to ResourceManager at master/192.168.94.128:8032
Tue Feb 18 20:41:16 CST 2025 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
25/02/18 20:41:16 INFO db.DBInputFormat: Using read commited transaction isolation
25/02/18 20:41:16 INFO mapreduce.JobSubmitter: number of splits:1
25/02/18 20:41:16 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1739882412468_0001
25/02/18 20:41:17 INFO impl.YarnClientImpl: Submitted application application_1739882412468_0001
25/02/18 20:41:17 INFO mapreduce.Job: The url to track the job: http://master:8088/proxy/application_1739882412468_0001/
25/02/18 20:41:17 INFO mapreduce.Job: Running job: job_1739882412468_0001
25/02/18 20:41:30 INFO mapreduce.Job: Job job_1739882412468_0001 running in uber mode : false
25/02/18 20:41:30 INFO mapreduce.Job:  map 0% reduce 0%
已杀死
[root@master ~]# hadoop fs -cat widgets/part-m-00000
1,sprocket,0.25,2010-02-10,1,Connetcts two gizmos
2,gizmo,4.00,2009-11-30,4,null
3,gadget,99.99,1983-08-13,13,Our falgship product
[root@master ~]# 
posted @   基础狗  阅读(5)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
点击右上角即可分享
微信分享提示