經過oozie調度sqoop做業時,須要輸入數據庫做業密碼,但在sqoop元數據服務配置密碼後,過一段時間會失效。mysql
將數據庫密碼寫入HDFS文件,經過配置Sqoop job,實現傳入密碼sql
某數據庫數據導入數據庫
密碼文件配置:db.password.file = /user/mysql_pwd.pwd 密碼內容:oop
[root@xdata1 ~]# hdfs dfs -cat /user/mysql_pwd.pwd aaaaaaa
[root@xdata1 ~]# sqoop job --show ZYTK32_AC_PAYMENTBOOKS_HIS Job: ZYTK32_AC_PAYMENTBOOKS_HIS Tool: import Options: ---------------------------- db.password.file = /user/mysql_pwd.pwd enable.compression = false db.batch = false