114115116117118119120121122123124
((Driver)proc).destroy(); isHiveQuery = true; response = driver.run(cmd); } else { isHiveQuery = false; response = proc.run(cmd_1); } ret = response.getResponseCode(); SQLState = response.getSQLState(); errorMessage = response.getErrorMessage();
206207208209210211212213214215216
double timeTaken = (end - start) / 1000.0; console.printInfo("Time taken: " + timeTaken + " seconds", null); } } else { ret = proc.run(cmd_1).getResponseCode(); } } } return ret;
273274275276277278279280281282283
} else { if (ss.getIsVerbose()) { ss.out.println(tokens[0] + " " + cmd_1); } ret = proc.run(cmd_1).getResponseCode(); } } } catch (CommandNeedRetryException e) { console.printInfo("Retry query with a different approach..."); tryCount++;
157158159160161162163164165166167
} else { isHiveQuery = false; driver = null; // need to reset output for each non-Hive query setupSessionIO(session); response = proc.run(cmd_1); } ret = response.getResponseCode(); SQLState = response.getSQLState(); errorMessage = response.getErrorMessage();
365366367368369370371372373374375
} finally { qp.close(); } } else { try { queryRet.add(Integer.valueOf(proc.run(cmd_1).getResponseCode())); } catch (CommandNeedRetryException e) { // this should never happen if there is no bug l4j.error(getSessionName() + " Exception when executing", e); } }
121122123124125126127128129130131
ret = response.getResponseCode(); SQLState = response.getSQLState(); errorMessage = response.getErrorMessage(); } else { isHiveQuery = false; ret = proc.run(cmd_1); } } } catch (Exception e) { HiveServerException ex = new HiveServerException(); ex.setMessage("Error running query: " + e.toString());
346347348349350351352353354355356
l4j.error(this.getSessionName() + " getting results " + this.getResultFile() + " caused exception.", ex); } qp.close(); } else { queryRet.add( new Integer(proc.run(cmd_1) ) ); } } else { //processor was null l4j.error(this.getSessionName() + " query processor was not found for query "+ cmd );
168169170171172173174175176177178
113114115116117118119120121122123
if (proc instanceof Driver) { isHiveQuery = true; ret = driver.run(cmd); } else { isHiveQuery = false; ret = proc.run(cmd_1); } } } catch (Exception e) { throw new HiveServerException("Error running query: " + e.toString()); }
153154155156157158159160161162163
double timeTaken = (double)(end-start)/1000.0; console.printInfo("Time taken: " + timeTaken + " seconds", null); } } else { ret = proc.run(cmd_1); } } } return ret;