sqoop password alias mode --password-alias

 

hadoop credential create xiaopengfei  -provider jceks://hdfs/user/password/xiaopengfei

create followed by the created alias

-provider jceks://hdfs is followed by the location where the password is stored on hdfs

 

 

sqoop import  -Dhadoop.security.credential.provider.path=jceks://hdfs/user/password/xiaopengfei  --connect "jdbc:mysql://172.16.12.210:3306/CLTransportBusinessDB2018?tinyInt1isBit=false&useUnicode=true&characterEncoding=utf-8" --username 517bigdata  --password-alias xiaopengfei  --table SaleOrderInfo201804     --check-column ModifyTime --incremental append  --last-value "2018-04-01 00:00:10"  --split-by  SaleOrderID  -m 2 --escaped-by '\\'   --null-string '\\N' --null-non-string '\\N'   --fields-terminated-by '^'    --target-dir "/user/hive/travelfirst/cltransportbusiness/saleorderinfo/month=201804"

 

--password-alias specify alias

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324779595&siteId=291194637