use of javax.jdo.datastore.JDOConnection in project hive by apache.
the class MetaStoreDirectSql method executeNoResult.
private void executeNoResult(final String queryText) throws SQLException {
JDOConnection jdoConn = pm.getDataStoreConnection();
Statement statement = null;
boolean doTrace = LOG.isDebugEnabled();
try {
long start = doTrace ? System.nanoTime() : 0;
statement = ((Connection) jdoConn.getNativeConnection()).createStatement();
statement.execute(queryText);
MetastoreDirectSqlUtils.timingTrace(doTrace, queryText, start, doTrace ? System.nanoTime() : 0);
} finally {
if (statement != null) {
statement.close();
}
// We must release the connection before we call other pm methods.
jdoConn.close();
}
}
Aggregations