/** * * @param hql * @throws CommandNeedRetryException * @throws IOException */ public void executeHQL(String hql) throws CommandNeedRetryException, IOException { CommandProcessorResponse response = getDriver().run(hql); int retCode = response.getResponseCode(); if (retCode != 0) { String err = response.getErrorMessage(); throw new IOException("Failed to execute hql [" + hql + "], error message is: " + err); } }
/** * * @param hql * @throws org.apache.hadoop.hive.ql.CommandNeedRetryException * @throws java.io.IOException */ public void executeHQL(String hql) throws CommandNeedRetryException, IOException { CommandProcessorResponse response = getDriver().run(hql); int retCode = response.getResponseCode(); if (retCode != 0) { String err = response.getErrorMessage(); throw new IOException("Failed to execute hql [" + hql + "], error message is: " + err); } }