2017-09-15 85 views
0

我是新來的Hadoop, 我使用下面的命令從Postgres數據庫導入表HDFS將表格從postgres數據庫導入到HDFS時出錯?

sqoop import --connect 'jdbc:postgresql://0.0.0.0:5432/toptal?ssl=true&sslfactory=o‌​rg.postgresql.ssl.No‌​nValidatingFactory' --username 'capacityprediction_user' -P --table 'raw_hd' --target-dir '/raw_hd' 

我收到以下錯誤:

17/09/15 10:35:33 ERROR manager.SqlManager: Error executing statement: rg.postgresql.ssl.No‌​nValidatingFactory could not be instantiated. 
org.postgresql.util.PSQLException: The SSLSocketFactory class provided o‌​rg.postgresql.ssl.No‌​nValidatingFactory could not be instantiated. 
    at org.postgresql.ssl.MakeSSL.convert(MakeSSL.java:51) 
    at org.postgresql.core.v3.ConnectionFactoryImpl.enableSSL(ConnectionFactoryImpl.java:351) 
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:137) 
    at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) 
    at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:215) 
    at org.postgresql.Driver.makeConnection(Driver.java:406) 
    at org.postgresql.Driver.connect(Driver.java:274) 
    at java.sql.DriverManager.getConnection(DriverManager.java:664) 
    at java.sql.DriverManager.getConnection(DriverManager.java:247) 
    at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:885) 
    at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52) 
    at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:744) 
    at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:767) 
    at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:270) 
    at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:241) 
    at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:227) 
    at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:295) 
    at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1833) 
    at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1645) 
    at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107) 
    at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478) 
    at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605) 
    at org.apache.sqoop.Sqoop.run(Sqoop.java:143) 
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) 
    at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179) 
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218) 
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227) 
    at org.apache.sqoop.Sqoop.main(Sqoop.java:236) 
Caused by: java.lang.ClassNotFoundException: o‌​rg.postgresql.ssl.No‌​nValidatingFactoryorg.postgresql.util.PSQLException: The SSLSocketFactory class provided o‌​ 
+0

'0.0.0.0:5432'絕對不正確。試試真正的IP地址 –

+0

'由:java.lang.ClassNotFoundException'引起的聽起來像你有錯誤的JAR文件 –

回答

0

它看起來像某些問題你jdbc連接。 jdbc連接的常用格式如下:

jdbc:postgresql://hostname:port/dbname" 
相關問題