简体   繁体   中英

Weird issue using Impala with the Hive2 JDBC drivers

I'm experiencing a weird behavior when trying to connect to Impala via the Hive2 JDBC drivers. I'm connecting to a cluster running CDH 5.3.6.

Basically, when performing a query like

CREATE TABLE new_table AS (SELECT * FROM old_table LIMIT 10)

Impala creates the table with all the columns from old_table but without any row. What makes the issue even more confusing is that by running the very same query with Squirrel or Hue, the statement correctly creates new_table with ten rows from old_table .

I've written a couple of small programs to test this issue. Please note that even though I'm using the wrong driver version ( hive-jdcb-0.12.0-cdh5.1 ), Squirrel correctly performs the query with the exact same drivers.

Does anybody know what can be causing this? Thank you so much in advance.

Simply put, this particular combination of JDBC drivers and Impala doesn't work and it is not supported. If you happen to need to use them both, the only apparent workaround consists in relying on executeQuery calls instead of execute and/or executeUpdate (even though I haven't tested it).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM