JDBC request error and Hive 10 or 9

In that I created a Java servlet that allows me to query my hive tables on Cosmos.

Before migrating to cygnus 0.8.2, my data was moved to a table called "hostabee", which I can still query from my Java application. But now a table is automatically created for every object that is placed in space. I didn't see any problems at first, it even simplified my project. But I cannot query for new tables from my application. I get this error instead

java.sql.SQLException: Query returned non-zero code: 10, cause: FAILED: Error in semantic analysis: Line 1:15 Table not found 'guillaume_jourdain_hostabee_hives_a_hive_column'
        at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:194)
        at HiveBasicClientServlet.doQuery(HiveBasicClientServlet.java:100)
        at HiveBasicClientServlet.demo(HiveBasicClientServlet.java:189)
        at HiveBasicClientServlet.doGet(HiveBasicClientServlet.java:44)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:701)

      

or this

java.sql.SQLException: Query returned non-zero code: 9, cause: FAILED: Execution Error, return code -101 from shark.execution.SparkTask
        at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:194)
        at HiveBasicClientServlet.doQuery(HiveBasicClientServlet.java:100)
        at HiveBasicClientServlet.demo(HiveBasicClientServlet.java:189)
        at HiveBasicClientServlet.doGet(HiveBasicClientServlet.java:44)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:701)

      

The table "guillaume_jourdain_hostabee_hives_a_hive_column" exists and I can query it from the hive with an SSH connection. Do you have any idea where my problem came from? If necessary, I can show you some of my code.

+3


source to share


1 answer


Next error:

Error in semantic analysis: Line 1:15 Table not found 'guillaume_jourdain_hostabee_hives_a_hive_column'

      

Not related to Cygnus 0.8.2, but rare behavior we encountered with our global Cosmos instance at FIWARE lab. Fortunately, it's easy to fix by prefixing the default database name (which is default

:)) for the table name. That is, if you have something like:



select * from mytable;

      

Now you need to write:

select * from default.mytable;

      

+1


source







All Articles