論壇首頁 綜合技術論壇

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

瀏覽 138 次
精華帖 (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 真人娱乐官方网站 盈江县| 清镇市| 龙口市| 佛学| 罗田县| 邮箱| 南康市| 辉南县| 延安市| 南平市| 辽宁省| 岱山县| 穆棱市| 双牌县| 泉州市| 襄汾县| 呼和浩特市| 长汀县| 共和县| 康平县| 禄劝| 云南省| 合川市| 宁安市| 通州区| 清新县| 潍坊市| 新宁县| 东安县| 凯里市| 乌兰察布市| 湛江市| 阿巴嘎旗| 赣榆县| 南投市| 房产| 信宜市| 三原县| 秦安县| 忻州市| 仁化县| 建始县| 嘉黎县| 南京市| 鄂托克旗| 开化县| 彩票| 公主岭市| 广丰县| 改则县| 宜黄县| 东乌| 沅江市| 南乐县| 于都县| 岳阳县| 林甸县| 敦化市| 克什克腾旗| 乐平市| 金塔县| 辽阳市| 韶关市| 聊城市| 图们市| 道孚县| 萨嘎县| 禄劝| 蕲春县| 静海县| 三明市| 景泰县| 浑源县| 桑日县| 宝兴县| 济宁市| 寿阳县| 普宁市| 济宁市| 牡丹江市| 康马县| 清河县| 柳河县| 通山县| 郴州市| 永定县| 揭阳市| 修水县| 三河市| 玉田县| 黄石市| 广东省| 孟州市| 昔阳县| 娱乐| 离岛区| 嘉善县| 同仁县| 张家港市| 舟山市| 开平市| 博乐市| 射阳县| 蓬安县| 伽师县| 肃宁县| 那坡县| 六安市| 鹤山市| 滨海县| 确山县| 虹口区| 桐柏县| 乌审旗| 康马县| 宝山区| 兴隆县| 大洼县| 鄂州市| 富锦市| 平果县| 南阳市| 寿宁县| 梅州市| 乐亭县| 平邑县| 丘北县| 大厂| 禄丰县| 兴仁县| 离岛区| 绥宁县| 梧州市| 秦安县| 大足县| 钟祥市| 陆丰市|