I'm trying to use preparestament as following, however, I got the
SQLException saying that the setInt method is not supported. Is there any
special requirements to use prepareStatement in hive? where can i find the
user manual for the api.
statement = _conn.prepareStatement(expression);
//Set parameters
for (Integer fieldindex : parameters.keySet() ) {
statement.setInt(fieldindex,
Integer.parseInt(parameters.get(fieldindex)));
}
statement.executeQuery();
java.sql.SQLException: Method not supported
at
org.apache.hadoop.hive.jdbc.HivePreparedStatement.setInt(HivePreparedStatement.java:349)
at
ca.ubc.ece.netsys.db.HiveDatabaseLayer.executeUpdateWithParameter(HiveDatabaseLayer.java:292)
at
ca.ece.ubc.netsys.graph.EdgeCreator.populateEdgeTable(EdgeCreator.java:109)
at ca.ece.ubc.netsys.graph.EdgeCreator.run(EdgeCreator.java:49)
at java.lang.Thread.run(Thread.java:619)
--
Thank you,
Keven Chen