sqoop基本 操作
2015-08-17 15:06
344 查看
列出 hive的 所有库
sqoop list-databases --connect jdbc:mysql://localhost --username hive --password hive
列出所有的表
sqoop list-tables --connect jdbc:mysql://localhost/hive_metadata --username hive --password hive
mysql导入到hdfs中
sqoop import -connect jdbc:mysql://10.0.2.139:3306/db -username root -password 123456 -table tb_name -fields-terminated-by '\t' -m 1
将 hdfs导入到mysql中
sqoop export --connect jdbc:mysql://localhost:3306/hive_metadata --username hive --password hive --table f2b_admins --export-dir '/user/root/f2b_admins/part-m-00000' --fields-terminated-by '\t' -m 1
从mysql导入到hbase中
sqoop import -connect jdbc:mysql://10.0.2.139:3306/f2b -username root -password suibianba --table f2b_admins --hbase-create-table --hbase-table f2b_admin --column-family info --hbase-row-key id -m 1
sqoop list-databases --connect jdbc:mysql://localhost --username hive --password hive
列出所有的表
sqoop list-tables --connect jdbc:mysql://localhost/hive_metadata --username hive --password hive
mysql导入到hdfs中
sqoop import -connect jdbc:mysql://10.0.2.139:3306/db -username root -password 123456 -table tb_name -fields-terminated-by '\t' -m 1
将 hdfs导入到mysql中
sqoop export --connect jdbc:mysql://localhost:3306/hive_metadata --username hive --password hive --table f2b_admins --export-dir '/user/root/f2b_admins/part-m-00000' --fields-terminated-by '\t' -m 1
从mysql导入到hbase中
sqoop import -connect jdbc:mysql://10.0.2.139:3306/f2b -username root -password suibianba --table f2b_admins --hbase-create-table --hbase-table f2b_admin --column-family info --hbase-row-key id -m 1
相关文章推荐
- Linux环境Nginx安装与调试以及PHP安装
- Linux写时拷贝技术(copy-on-write)
- 浅析电子政务工程建设项目的建章立制
- Apache 的BeanUtils 拷贝日期对象转换问题
- Linux____用户和群组进阶学习笔记
- stretchableImageWithLeftCapWidth: topCapHeight:拉伸图
- [转]部署war包到tomcat的几个问题
- linux基础之find初认识
- UVA_10739_StringToPalindrome
- 修复OpenStack-Horizon遇到的UnicodeDecodeError
- OpenGL ES 雾
- LINUX创建本地yum源
- windows与linux下执行.class(包含main方法)
- linux中自动挂载、卸载SD卡/u盘 和 mount -t vfat ntfs smbfs nfs -o ro rw iocharse 等待
- linux中fork()函数详解
- linux命令应用之一
- linux 查看端口情况
- Linux源码包编译和安装
- ECSHOP Strict Standards: Redefining already defined constructor 错误
- 建立OpenGL ES环境