zoukankan      html  css  js  c++  java
  • hadoop-sqoop学习笔记


    ======导入====

    sqoop import --connect jdbc:mysql://20.12.20.165:3306/luo0907 --username root --password 12345 --table aa01 --fields-terminated-by ' ' -m 1 --hive-import

    sqoop import --connect jdbc:mysql://20.12.20.165:3306/luo0907 --username root --password 12345 --table aa01 --fields-terminated-by ' ' -m 1 --hive-import --hive-overwrite --create-hive-table --hive-table luo0908.aa01 --delete-target-dir
    sqoop import --connect jdbc:mysql://20.12.20.165:3306/luo0907 --username root --password 12345 --table aa01 --target-dir /luo2/luo01 ###要用hdfs用户执行

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '12345' WITH GRANT OPTION;
    hadoop fs -chown root:hdfs /tmp/test.txt

    =====导出=====
    sqoop export --connect jdbc:mysql://20.12.20.165:3306/luo0907 --username root --password 12345 --table aa01 --export-dir '/user/hive/warehouse/luo0908.db/aa01' --fields-terminated-by ' '

  • 相关阅读:
    20170612测试
    vijos1453曼哈顿距离
    vijos1153 猫狗大战
    vijos1037搭建双塔
    dijkstra+priority_queue+vector
    BZOJ1507: [NOI2003]Editor
    dinic模板
    旅行-树形DP
    51nod1799-二分答案
    51nod1791-合法括号子段
  • 原文地址:https://www.cnblogs.com/luo-mao/p/5872411.html
Copyright © 2011-2022 走看看