常用命令

内容纲要
  1. 常用命令
192.168.2.60 cdp0
192.168.2.61 cdp1
192.168.2.62 cdp2
192.168.1.200 cdp3

wget https://archive.cloudera.com/cm7/7.1.4/cloudera-manager-installer.bin

chmod u+x cloudera-manager-installer.bin

 ./cloudera-manager-installer.bin

scp .\mapReduceJob-1.0-SNAPSHOT.jar root@node0:~

git clone https://username:password@remote

git clone http://chenbin:[email protected]:8080/tfs/LittleProCollection/_git/oldmansys

sqoop import --connect jdbc:mysql://192.168.2.30:50230/gis \
--username djjf --password Djjf@123456 \--table t_coords \
-m 1 \
--hive-import \
--hive-overwrite \
--create-hive-table \
--delete-target-dir \
--hive-database gis \
--fields-terminated-by

sqoop import --connect jdbc:mysql://192.168.2.30:50230/gis \
--username djjf --password Djjf@123456 \
--query "select * from t_house_info where $CONDITIONS LIMIT 100" \
--delete-target-dir \
--target-dir /dm/t_house_info \
--direct \
–-split-by 'id'

sqoop import --connect jdbc:mysql://192.168.2.30:50230/gis \
--username djjf --password Djjf@123456 \--table t_house_info \
-m 1 \
--hive-import \
--hive-table t_house_info\
--hive-overwrite \
--create-hive-table \
--hive-database gis \
--fields-terminated-by

sqoop import --connect jdbc:mysql://192.168.2.30:50230/gis --username djjf --password Djjf@123456 --table t_house_info -m 1 --hive-import --hive-overwrite --delete-target-dir --hive-table t_house_info --hive-database gis --fields-terminated-by ,

sqoop import --connect jdbc:mysql://192.168.2.30:50230/gis \
--table t_house_info --username djjf --password Djjf@123456 \
--delete-target-dir \
--target-dir /t_house_info \
--direct

sqoop export \
--connect "jdbc:mysql://192.168.2.60:3306/temp?useUnicode=true&characterEncoding=utf-8&useSSL=true" \
--username root --password arc123456 --table t_house_info_clean_data_1 \
--export-dir /t_house_info_clean_data \
--input-fields-terminated-by "," \
-m 2 \
--batch

sqoop list-databases --connect jdbc:mysql://192.168.2.30:50230 --username djjf --password Djjf@123456

hadoop jar MapReduceJob-1.0-SNAPSHOT-jar-with-dependencies.jar com.lyarc.mapReduce.houseInfo.JobRunner /user/hive/warehouse/gis.db/t_house_info /t_house_info_clean_data

create table gis.t_house_info_clean_data like gis.t_house_info;

ALTER TABLE t_house_info_clean_data change is_clear address_code STRING;
ALTER TABLE t_house_info change column is_clear is_clear int;

hadoop jar MapReduceJob-1.0-SNAPSHOT-jar-with-dependencies.jar com.lyarc.mapReduce.houseInfo.JobRunner /user/hive/warehouse/gis.db/t_house_info /t_house_info_clean_data

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注