Reputation: 413
I've been using products around Hadoop, but new to developing an application with them using Java.
I'd like to use some classes like HiveStatement, but found that there are the same name classes with different packages.
ex) org.apache.hive.jdbc.HiveStatement
, org.apache.hadoop.hive.jdbc.HiveStatement
.
I noticed this when trying to cast a Statement object into HiveStatement. I was trying to cast a object into org.apache.hadoop.hive.jdbc.HiveStatement
, but casting into org.apache.hive.jdbc.HiveStatement
seems right in my case.
What's the difference, and why do two similar packages exist?
Thanks in advance!
Upvotes: 1
Views: 134
Reputation: 5443
org.apache.hadoop.hive
is the old Java package name for Apache Hive, for example version 0.8.x of the Hive JDBC driver.
Around the 1.0.0 release time frame, the package name changed.
You should use org.apache.hive
for newer versions.
Upvotes: 2