签到成功

知道了

CNDBA社区CNDBA社区

Sqoop Eval工具使用说明

2019-03-03 03:16 3020 0 原创 Sqoop
作者: dave

Sqoop “eval”工具允许用户执行用户定义的查询,支持DDL或DML语句。http://www.cndba.cn/cndba/dave/article/3311

http://www.cndba.cn/cndba/dave/article/3311
http://www.cndba.cn/cndba/dave/article/3311
http://www.cndba.cn/cndba/dave/article/3311
http://www.cndba.cn/cndba/dave/article/3311
http://www.cndba.cn/cndba/dave/article/3311
http://www.cndba.cn/cndba/dave/article/3311
http://www.cndba.cn/cndba/dave/article/3311http://www.cndba.cn/cndba/dave/article/3311http://www.cndba.cn/cndba/dave/article/3311

[dave@www.cndba.cn data]$ sqoop eval --connect jdbc:mysql://192.168.56.2:3306/employees --username root --password root --query "SELECT * FROM employees LIMIT 3"
2019-03-03 03:11:33,362 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
2019-03-03 03:11:33,486 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
2019-03-03 03:11:33,704 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
Sun Mar 03 03:11:34 CST 2019 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.
---------------------------------------------------------------------------------
| emp_no      | birth_date | first_name     | last_name        | gender | hire_date  | 
---------------------------------------------------------------------------------
| 10001       | 1953-09-02 | Georgi         | Facello          | M | 1986-06-26 | 
| 10002       | 1964-06-02 | Bezalel        | Simmel           | F | 1985-11-21 | 
| 10003       | 1959-12-03 | Parto          | Bamford          | M | 1986-08-28 | 
---------------------------------------------------------------------------------
[dave@www.cndba.cn data]$ 

[dave@www.cndba.cn data]$ sqoop eval --connect jdbc:mysql://192.168.56.2:3306/employees --username root --password root --query "delete  FROM employees"
2019-03-03 03:13:58,376 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
2019-03-03 03:13:58,523 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
2019-03-03 03:13:58,741 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
Sun Mar 03 03:13:59 CST 2019 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.
2019-03-03 03:14:20,803 INFO tool.EvalSqlTool: 300024 row(s) updated.

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2262
    原创
  • 3
    翻译
  • 578
    转载
  • 192
    评论
  • 访问:8064221次
  • 积分:4349
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ