論壇首頁 綜合技術論壇

【sqoop2 error】 org.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer.confi

瀏覽 78 次
精華帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隱藏帖 (0)
作者 正文
   發表時間:2019-06-05  

問題 :

sqoop:000> start job -name m2h
Exception has occurred during processing command 
Exception: org.apache.sqoop.common.SqoopException Message: GENERIC_JDBC_CONNECTOR_0016:Can't fetch schema - 



d]
2019-06-01 10:23:53,689 INFO  [org.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer.configurePartitionProperties(GenericJdbcFromInitializer.java:152)] Using partition column: deviceid
2019-06-01 10:23:53,689 INFO  [org.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer.configurePartitionProperties(GenericJdbcFromInitializer.java:181)] Incremental new max value query:  SELECT MAX("deviceid") FROM "mqh"."device"
2019-06-01 10:23:53,715 ERROR [org.apache.sqoop.server.SqoopProtocolServlet.doPut(SqoopProtocolServlet.java:86)] Exception in PUT http://localhost:12000/sqoop/v1/job/job-m2h/start
org.apache.sqoop.common.SqoopException: GENERIC_JDBC_CONNECTOR_0016:Can't fetch schema
	at org.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer.initialize(GenericJdbcFromInitializer.java:64)
	at org.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer.initialize(GenericJdbcFromInitializer.java:47)
	at org.apache.sqoop.driver.JobManager$1.call(JobManager.java:520)
	at org.apache.sqoop.driver.JobManager$1.call(JobManager.java:517)
	at org.apache.sqoop.utils.ClassUtils.executeWithClassLoader(ClassUtils.java:281)
	at org.apache.sqoop.driver.JobManager.initializeConnector(JobManager.java:516)
	at org.apache.sqoop.driver.JobManager.createJobRequest(JobManager.java:423)
	at org.apache.sqoop.driver.JobManager.start(JobManager.java:317)
	at org.apache.sqoop.handler.JobRequestHandler.startJob(JobRequestHandler.java:353)
	at org.apache.sqoop.handler.JobRequestHandler.handleEvent(JobRequestHandler.java:114)
	at org.apache.sqoop.server.v1.JobServlet.handlePutRequest(JobServlet.java:84)
	at org.apache.sqoop.server.SqoopProtocolServlet.doPut(SqoopProtocolServlet.java:81)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
	at org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:574)
	at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.doFilter(DelegationTokenAuthenticationFilter.java:269)
	at org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:544)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"mqh"."device" WHERE 1 = 2' at line 1
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.Util.getInstance(Util.java:408)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903)
	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2011)
	at org.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer.configurePartitionProperties(GenericJdbcFromInitializer.java:185)
	at org.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer.initialize(GenericJdbcFromInitializer.java:61)
	... 32 more

?

解決方法:

Identifier enclose: 指定SQL中標識符的定界符,也就是說,有的SQL標示符是一個引號:select * from "table_name",這種定界符在MySQL中是會報錯的。這個屬性默認值就是雙引號,所以不能使用回車,必須將之覆蓋,可使用空格覆蓋了這個值。
?
Identifier enclose: 輸入 空格
?
?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

捐助開發者?

在興趣的驅動下,寫一個免費的東西,有欣喜,也還有汗水,希望你喜歡我的作品,同時也能支持一下。 當然,有錢捧個錢場(支持支付寶和微信 以及扣扣群),沒錢捧個人場,謝謝各位。

?

個人主頁http://knight-black-bob.iteye.com/



?
?
?謝謝您的贊助,我會做的更好!

論壇首頁 綜合技術版

跳轉論壇:
Global site tag (gtag.js) - Google Analytics 全天上海快3计划网 富平县| 麟游县| 梧州市| 留坝县| 闵行区| 苍溪县| 东宁县| 吉隆县| 定安县| 沙雅县| 盈江县| 南岸区| 无棣县| 古丈县| 鄯善县| 利川市| 泸水县| 阿鲁科尔沁旗| 安远县| 丰台区| 辰溪县| 阿城市| 石台县| 民和| 葫芦岛市| 清苑县| 香河县| 麟游县| 肇源县| 宜川县| 旬阳县| 都安| 株洲县| 靖远县| 高邑县| 潢川县| 胶州市| 南乐县|