内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

執(zhí)行Job時(shí)怎么省略輸入MySQL保存密碼

本篇內(nèi)容介紹了“執(zhí)行Job時(shí)怎么省略輸入MySQL保存密碼”的有關(guān)知識,在實(shí)際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

創(chuàng)新互聯(lián)是專業(yè)的三亞網(wǎng)站建設(shè)公司,三亞接單;提供成都做網(wǎng)站、成都網(wǎng)站制作,網(wǎng)頁設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行三亞網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來合作!

一、刪除Job

  1. sqoop job \

  2. --delete testjob

二、創(chuàng)建Job
說明:在創(chuàng)建Job時(shí),我們使用--password-file參數(shù),而且非--passowrd。主要原因是在執(zhí)行Job時(shí)使用--password參數(shù)將有警告,并且需要輸入密碼才能執(zhí)行Job。當(dāng)我們采用--password-file參數(shù)時(shí),執(zhí)行Job無需輸入數(shù)據(jù)庫密碼。

  1. sqoop job \

  2. --create testjob \

  3. -- \

  4. import \

  5. --connect jdbc:mysql://192.168.137.130:3306/jepsondb \

  6. --username root \

  7. --password-file /input/sqoop.pwd \

  8. --table abc \

  9. --target-dir /input/abc \

  10. --delete-target-dir \

  11. -m 1

注:import與"--"之間必須要有一個(gè)空格

三、執(zhí)行Job

  1. sqoop job \

  2. --exec testjob

四、創(chuàng)建--password-file參數(shù)需要的密碼文件(注:sqoop規(guī)定密碼文件必須放在HDFS之上,并且權(quán)限必須為400)
1、操作命令:

  1. echo -n "123456" > sqoop.pwd

  2. hdfs dfs -rm sqoop.pwd /input/sqoop.pwd

  3. hdfs dfs -put sqoop.pwd /input

  4. hdfs dfs -chmod 400 /input/sqoop.pwd

  5. hdfs dfs -ls /input

  6. -r--------   1 hadoop supergroup          6 2018-01-15 18:38 /input/sqoop.pwd

2、檢查sqoop的配置文件(sqoop-site.xml)是否存在以下配置,并且value值為true

  1. <property>

  2.     <name>sqoop.metastore.client.record.password</name>

  3.     <value>true</value>

  4.     <description>If true, allow saved passwords in the metastore.

  5.     </description>

  6. </property>

注:password文件的格式不對錯誤提示如下:

  1. arning: /app/sqoop-1.4.6-cdh6.7.0/../hbase does not exist! HBase imports will fail.

  2. Please set $HBASE_HOME to the root of your HBase installation.

  3. Warning: /app/sqoop-1.4.6-cdh6.7.0/../hcatalog does not exist! HCatalog jobs will fail.

  4. Please set $HCAT_HOME to the root of your HCatalog installation.

  5. Warning: /app/sqoop-1.4.6-cdh6.7.0/../accumulo does not exist! Accumulo imports will fail.

  6. Please set $ACCUMULO_HOME to the root of your Accumulo installation.

  7. Warning: /app/sqoop-1.4.6-cdh6.7.0/../zookeeper does not exist! Accumulo imports will fail.

  8. Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.

  9. 18/01/15 18:33:50 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh6.7.0

  10. 18/01/15 18:33:53 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.

  11. 18/01/15 18:33:53 INFO tool.CodeGenTool: Beginning code generation

  12. 18/01/15 18:33:54 ERROR manager.SqlManager: Error executing statement: java.sql.SQLException: Access denied for user 'root'@'spark220' (using password: YES)

  13. java.sql.SQLException: Access denied for user 'root'@'spark220' (using password: YES)

  14. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)

  15. at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)

  16. at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)

  17. at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:873)

  18. at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1710)

  19. at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1226)

  20. at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2188)

  21. at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2219)

  22. at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2014)

  23. at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:776)

  24. at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)

  25. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

  26. at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

  27. at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

  28. at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

  29. at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)

  30. at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)

  31. at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)

  32. at java.sql.DriverManager.getConnection(DriverManager.java:664)

  33. at java.sql.DriverManager.getConnection(DriverManager.java:247)

  34. at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:904)

  35. at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)

  36. at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:763)

  37. at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:786)

  38. at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:289)

  39. at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:260)

  40. at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:246)

  41. at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:327)

  42. at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1846)

  43. at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1646)

  44. at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)

  45. at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)

  46. at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)

  47. at org.apache.sqoop.Sqoop.run(Sqoop.java:143)

  48. at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)

  49. at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)

  50. at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)

  51. at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)

  52. at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

  53. 18/01/15 18:33:54 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter

  54. at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1652)

  55. at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)

  56. at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)

  57. at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)

  58. at org.apache.sqoop.Sqoop.run(Sqoop.java:143)

  59. at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)

  60. at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)

  61. at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)

  62. at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)

  63. at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

“執(zhí)行Job時(shí)怎么省略輸入MySQL保存密碼”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!

文章標(biāo)題:執(zhí)行Job時(shí)怎么省略輸入MySQL保存密碼
網(wǎng)站網(wǎng)址:http://m.rwnh.cn/article26/jdgojg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)建站網(wǎng)頁設(shè)計(jì)公司、App開發(fā)、網(wǎng)站建設(shè)全網(wǎng)營銷推廣、

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)
塔河县| 固始县| 锦州市| 平阴县| 自贡市| 广饶县| 迁西县| 连云港市| 大关县| 娱乐| 罗城| 克东县| 互助| 子长县| 许昌市| 平乐县| 阳新县| 仙桃市| 诸暨市| 英山县| 玛曲县| 犍为县| 嵊泗县| 保亭| 广河县| 通榆县| 汨罗市| 南木林县| 凉山| 乌兰浩特市| 乌审旗| 鄢陵县| 东至县| 昌都县| 六盘水市| 淳化县| 会同县| 黄大仙区| 海宁市| 托克逊县| 静宁县|