FAQ
I tried and it didn't work. Is there a way to send refresh through JDBC
driver?

   val impalaUrl = "jdbc:hive2://impala:21050/default1;auth=noSasl"

   val driverClass = Class.forName("org.apache.hive.jdbc.HiveDriver")

   val conn = DriverManager.getConnection(impalaUrl)

   val st = conn.createStatement()
   st.execute("refresh my_table")

   conn.close

Exception in thread "main" java.sql.SQLException: AnalysisException: Syntax
error at:
refresh my_table
^
Encountered: IDENTIFIER
Expected: ALTER, CREATE, DESCRIBE, DROP, SELECT, SHOW, USE, INSERT

CAUSED BY: Exception: Syntax error
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:159)
at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:147)

Search Discussions

  • Nong Li at Jun 12, 2013 at 5:29 pm
    There is no way to issue the refresh through the driver. We have this work
    item to track fixing this:
    https://issues.cloudera.org/browse/IMPALA-387

    Thanks
    Nong

    On Wed, Jun 12, 2013 at 9:49 AM, wrote:

    I tried and it didn't work. Is there a way to send refresh through JDBC
    driver?

    val impalaUrl = "jdbc:hive2://impala:21050/default1;auth=noSasl"

    val driverClass = Class.forName("org.apache.hive.jdbc.HiveDriver")

    val conn = DriverManager.getConnection(impalaUrl)

    val st = conn.createStatement()
    st.execute("refresh my_table")

    conn.close

    Exception in thread "main" java.sql.SQLException: AnalysisException:
    Syntax error at:
    refresh my_table
    ^
    Encountered: IDENTIFIER
    Expected: ALTER, CREATE, DESCRIBE, DROP, SELECT, SHOW, USE, INSERT

    CAUSED BY: Exception: Syntax error
    at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:159)
    at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:147)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupimpala-user @
categorieshadoop
postedJun 12, '13 at 4:49p
activeJun 12, '13 at 5:29p
posts2
users2
websitecloudera.com
irc#hadoop

2 users in discussion

Bewang Tech: 1 post Nong Li: 1 post

People

Translate

site design / logo © 2022 Grokbase