<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      Sqoop 的安裝使用

      1:下載地址 http://mirrors.hust.edu.cn/apache/sqoop/1.4.6/

      2:上傳壓縮包

        scp sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz root@hadoop2:/opt/software

      3:解壓并重命名

        tar -zxvf  sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz -C /opt/module

        mv sqoop-1.4.6.bin__hadoop-2.0.4-alpha/ sqoop

      4:修改配置文件

        進入目錄 sqoop/conf

        mv sqoop-env-template.sh sqoop-env.sh

      #Set path to where bin/hadoop is available
      export HADOOP_COMMON_HOME=/opt/module/hadoop-2.10.1
      
      #Set path to where hadoop-*-core.jar is available
      export HADOOP_MAPRED_HOME=/opt/module/hadoop-2.10.1
      
      #set the path to where bin/hbase is available
      #export HBASE_HOME=/opt/module/hbase-2.3.3
      
      #Set the path to where bin/hive is available
      export HIVE_HOME=/opt/module/hive1.2.1

      #Set the path for where zookeper config dir is export ZOOKEEPER_HOME=/opt/module/zookeeper3.5.8 export ZOOCFGDIR=/opt/module/zookeeper3.5.8/conf

      6:驗證sqoop是否配置正確

        進入bin目錄下執行 ./sqoop help

        出現如下頁面則配置成功 出現的警告是因為沒有配置hbase、hcatlog等

      Warning: /opt/module/sqoop/bin/../../hbase does not exist! HBase imports will fail.
      Please set $HBASE_HOME to the root of your HBase installation.
      Warning: /opt/module/sqoop/bin/../../hcatalog does not exist! HCatalog jobs will fail.
      Please set $HCAT_HOME to the root of your HCatalog installation.
      Warning: /opt/module/sqoop/bin/../../accumulo does not exist! Accumulo imports will fail.
      Please set $ACCUMULO_HOME to the root of your Accumulo installation.
      21/04/19 11:25:46 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
      usage: sqoop COMMAND [ARGS]
      
      Available commands:
        codegen            Generate code to interact with database records
        create-hive-table  Import a table definition into Hive
        eval               Evaluate a SQL statement and display the results
        export             Export an HDFS directory to a database table
        help               List available commands
        import             Import a table from a database to HDFS
        import-all-tables  Import tables from a database to HDFS
        import-mainframe   Import datasets from a mainframe server to HDFS
        job                Work with saved jobs
        list-databases     List available databases on a server
        list-tables        List available tables in a database
        merge              Merge results of incremental imports
        metastore          Run a standalone Sqoop metastore
        version            Display version information
      
      See 'sqoop help COMMAND' for information on a specific command.

      7:測試sqoop是否能夠連上mysql

        ./sqoop list-databases --connect jdbc:mysql://hadoop2:3306 --username root --password root

        能夠看到databases說明連接成功

      Warning: /opt/module/sqoop/bin/../../hbase does not exist! HBase imports will fail.
      Please set $HBASE_HOME to the root of your HBase installation.
      Warning: /opt/module/sqoop/bin/../../hcatalog does not exist! HCatalog jobs will fail.
      Please set $HCAT_HOME to the root of your HCatalog installation.
      Warning: /opt/module/sqoop/bin/../../accumulo does not exist! Accumulo imports will fail.
      Please set $ACCUMULO_HOME to the root of your Accumulo installation.
      21/04/19 12:02:23 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
      21/04/19 12:02:24 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
      21/04/19 12:02:24 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
      Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
      mysql
      information_schema
      performance_schema
      sys
      gmall

      到此 sqoop的部署完成

      8:導入測試

        target-dir 上傳hadoop位置  

        num-mappers 啟動mapper的個數,不設置時默認為4個  

        fields-terminated-by 分隔符

        split-by 一那個字段分區,如果mapper為1是否設置效果都相同

      ./sqoop import \
          --connect jdbc:mysql://hadoop2:3306/gmall \ 
          --username root \
          --password root \
          --table user_info \ 
          --columns id,login_name \
          --where 'id >= 10 and id <= 30' \
          --target-dir /test \
          --delete-target-dir \
          --num-mappers 1 \
          --fields-terminated-by '\t' \
          --split-by id

        --query 后面可以直接寫sql

        

      posted @ 2021-04-19 18:10  buaa_java  閱讀(160)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 亚洲 欧美 唯美 国产 伦 综合| 亚洲欧美中文日韩V日本| 房产| 国产精一品亚洲二区在线播放| 成人亚洲国产精品一区不卡| 乱码中文字幕| 无码人妻斩一区二区三区| 色婷婷五月综合久久| 国产网友愉拍精品视频手机| 亚洲人成网7777777国产| 中文字幕国产精品一二区| 华人在线亚洲欧美精品| 精品国产粉嫩内射白浆内射双马尾| 女人香蕉久久毛毛片精品| 日本道播放一区二区三区| 免费观看性行为视频的网站| 亚洲av综合色区在线观看| 国产精品大片中文字幕| 国产高清精品在线一区二区| 韩国午夜理伦三级| 亚洲第一香蕉视频啪啪爽| 国产成人精彩在线视频| 黄色网站免费在线观看| 国产丰满乱子伦无码专区| 亚洲国产成人精品激情姿源| 少妇特黄a一区二区三区| 国产精品免费中文字幕| 国产漂亮白嫩美女在线观看 | 国产在线精品一区二区三区| 久久一级黄色大片免费观看| 久久午夜无码免费| 丰满少妇被猛烈进出69影院| 亚洲精品中文字幕二区| 亚洲另类激情专区小说图片 | 久久国产免费观看精品3| 老司机亚洲精品一区二区| 人妻无码不卡中文字幕系列| 久久青青草原精品国产app| 亚洲成aⅴ人片久青草影院| 中日韩中文字幕一区二区| 亚洲欧美日韩愉拍自拍美利坚|