• sqoop基本 操作


    列出 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 ' ' -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 ' ' -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


  • 相关阅读:
    常用html设置:
    Java Enum
    ajax
    Utils使用
    jdk免安装对应配置
    jdk mvn下载--操作系统
    SpringMvc 文件上传后台处理
    SpringMvc 获取ApplicationContext
    Jenkins 持续集成
    自定义 directive pagination
  • 原文地址:https://www.cnblogs.com/brucemengbm/p/7191473.html
Copyright © 2020-2023  润新知