Camel Jdbc // Error while connecting to HIVE

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Camel Jdbc // Error while connecting to HIVE

reji.mathews
Hello community

I am using camel jdbc component to query some data from HIVE database. When I trigger a query, it throws me off with following stack trace. Has any attempted connecting to HIVE database using camel jdbc component? Or, is there a better component to achieve the task.

PS: I have already tested connecting to HIVE database using RazorSQL just to ensure everything is ok with the database setup.

2020-04-29 10:42:00.960 - INFO 425268 --- [http-nio-8888-exec-3] o.apache.camel.impl.DefaultCamelContext [lineno:3186]     : Total 1 routes, of which 1 are started
2020-04-29 10:42:00.960 - INFO 425268 --- [http-nio-8888-exec-3] o.apache.camel.impl.DefaultCamelContext [lineno:3197]     : Apache Camel 2.24.1 (CamelContext: a7ed99f3-742b-48ca-873e-ac17ae4975b8) started in 1.181 seconds
2020-04-29 10:42:02.055 - INFO 425268 --- [http-nio-8888-exec-3] com.company.camel.core.FlowManager       [lineno:124]     : <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<routes xmlns="http://camel.apache.org/schema/spring">
    <route customId="false" id="route1">
        <from uri="jetty:http://0.0.0.0:8081/hive?httpMethodRestrict=GET"/>
        <log id="log2" message="Received http payload : ${body}"/>
        <process id="process3"/>
        <setBody id="setBody1">
            <simple>select * from employee</simple>
        </setBody>
        <log id="log3" loggingLevel="INFO" message="Executing Sql Statement : ${body}"/>
        <to id="to2" uri="jdbc:hive-default"/>
        <setProperty id="setProperty1" propertyName="DESTINATION_FORMAT_TYPE">
            <expressionDefinition>language[constant:json]</expressionDefinition>
        </setProperty>
        <process id="process4"/>
        <removeProperty id="removeProperty1" propertyName="DESTINATION_FORMAT_TYPE"/>
    </route>
</routes>

2020-04-29 10:42:05.047 - INFO 425268 --- [qtp27332965-56] route1                                  [lineno:159]     : Received http payload :
2020-04-29 10:42:05.065 - INFO 425268 --- [qtp27332965-56] route1                                  [lineno:159]     : Executing Sql Statement : select * from employee
2020-04-29 10:42:05.125 - INFO 425268 --- [qtp27332965-56] org.apache.hive.jdbc.Utils              [lineno:325]     : Supplied authorities: 10.213.96.182:10000
2020-04-29 10:42:05.126 - INFO 425268 --- [qtp27332965-56] org.apache.hive.jdbc.Utils              [lineno:444]     : Resolved authority: 10.213.96.182:10000
2020-04-29 10:42:05.605 - INFO 425268 --- [qtp27332965-56] org.apache.hive.jdbc.Utils              [lineno:325]     : Supplied authorities: 10.213.96.182:10000
2020-04-29 10:42:05.606 - INFO 425268 --- [qtp27332965-56] org.apache.hive.jdbc.Utils              [lineno:444]     : Resolved authority: 10.213.96.182:10000
2020-04-29 10:42:05.768 - WARN 425268 --- [qtp27332965-56] org.apache.hive.jdbc.HiveConnection     [lineno:1329]     : Request to set autoCommit to false; Hive does not support autoCommit=false.
2020-04-29 10:42:06.338 - WARN 425268 --- [qtp27332965-56] o.a.camel.component.jdbc.JdbcProducer   [lineno:95]     : Error occurred during jdbc rollback. This exception will be ignored.

java.sql.SQLFeatureNotSupportedException: Method not supported
              at org.apache.hive.jdbc.HiveConnection.rollback(HiveConnection.java:1299) ~[hive-jdbc-2.3.7.jar:2.3.7]
              at org.apache.commons.dbcp2.DelegatingConnection.rollback(DelegatingConnection.java:488) ~[commons-dbcp2-2.0.1.jar:2.0.1]
              at org.apache.commons.dbcp2.DelegatingConnection.rollback(DelegatingConnection.java:488) ~[commons-dbcp2-2.0.1.jar:2.0.1]
              at org.apache.camel.component.jdbc.JdbcProducer.processingSqlBySettingAutoCommit(JdbcProducer.java:92) [camel-jdbc-2.24.1.jar:2.24.1]
              at org.apache.camel.component.jdbc.JdbcProducer.process(JdbcProducer.java:67) [camel-jdbc-2.24.1.jar:2.24.1]
              at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) [camel-core-2.24.1.jar:2.24.1]
              at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) [camel-core-2.24.1.jar:2.24.1]
              at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [camel-core-2.24.1.jar:2.24.1]
              at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.24.1.jar:2.24.1]
              at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [camel-core-2.24.1.jar:2.24.1]
              at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [camel-core-2.24.1.jar:2.24.1]
              at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.24.1.jar:2.24.1]
              at org.apache.camel.component.jetty.CamelContinuationServlet.doService(CamelContinuationServlet.java:220) [camel-jetty-common-2.24.1.jar:2.24.1]
              at org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:79) [camel-http-common-2.24.1.jar:2.24.1]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [tomcat-embed-core-9.0.21.jar:9.0.21]
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:876) [jetty-servlet-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623) [jetty-servlet-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.servlets.MultiPartFilter.doFilter(MultiPartFilter.java:150) [jetty-servlets-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.apache.camel.component.jetty.CamelFilterWrapper.doFilter(CamelFilterWrapper.java:43) [camel-jetty-common-2.24.1.jar:2.24.1]
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) [jetty-servlet-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) [jetty-servlet-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) [jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1347) [jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) [jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) [jetty-servlet-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) [jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1249) [jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) [jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.server.Server.handle(Server.java:505) [jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370) [jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267) [jetty-server-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) [jetty-io-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [jetty-io-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [jetty-io-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:781) [jetty-util-9.4.19.v20190610.jar:9.4.19.v20190610]
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:917) [jetty-util-9.4.19.v20190610.jar:9.4.19.v20190610]
              at java.lang.Thread.run(Thread.java:748) [na:1.8.0_211]