private void runQuery() throws HiveSQLException { try { OperationState opState = getStatus().getState(); if ((getStatus().getState() == OperationState.CANCELED) || (getStatus().getState() == OperationState.TIMEDOUT) || (getStatus().getState() == OperationState.CLOSED) || (getStatus().getState() == OperationState.FINISHED)) { LOG.warn("Ignore exception in terminal state", e); return;
private void runQuery() throws HiveSQLException { try { OperationState opState = getStatus().getState(); if ((getStatus().getState() == OperationState.CANCELED) || (getStatus().getState() == OperationState.TIMEDOUT) || (getStatus().getState() == OperationState.CLOSED) || (getStatus().getState() == OperationState.FINISHED)) { LOG.warn("Ignore exception in terminal state", e); return;
private void runQuery(HiveConf sqlOperationConf) throws HiveSQLException { try { // In Hive server mode, we are not able to retry in the FetchTask // case, when calling fetch queries since execute() has returned. // For now, we disable the test attempts. driver.setTryCount(Integer.MAX_VALUE); response = driver.run(); if (0 != response.getResponseCode()) { throw toSQLException("Error while processing statement", response); } } catch (HiveSQLException e) { // If the operation was cancelled by another thread, // Driver#run will return a non-zero response code. // We will simply return if the operation state is CANCELED, // otherwise throw an exception if (getStatus().getState() == OperationState.CANCELED) { return; } else { setState(OperationState.ERROR); throw e; } } catch (Exception e) { setState(OperationState.ERROR); throw new HiveSQLException("Error running query: " + e.toString(), e); } setState(OperationState.FINISHED); }
private void runQuery(HiveConf sqlOperationConf) throws HiveSQLException { try { // In Hive server mode, we are not able to retry in the FetchTask // case, when calling fetch queries since execute() has returned. // For now, we disable the test attempts. driver.setTryCount(Integer.MAX_VALUE); response = driver.run(); if (0 != response.getResponseCode()) { throw toSQLException("Error while processing statement", response); } } catch (HiveSQLException e) { // If the operation was cancelled by another thread, // Driver#run will return a non-zero response code. // We will simply return if the operation state is CANCELED, // otherwise throw an exception if (getStatus().getState() == OperationState.CANCELED) { return; } else { setState(OperationState.ERROR); throw e; } } catch (Exception e) { setState(OperationState.ERROR); throw new HiveSQLException("Error running query: " + e.toString(), e); } setState(OperationState.FINISHED); }
private void runQuery(HiveConf sqlOperationConf) throws HiveSQLException { try { // In Hive server mode, we are not able to retry in the FetchTask // case, when calling fetch queries since execute() has returned. // For now, we disable the test attempts. driver.setTryCount(Integer.MAX_VALUE); response = driver.run(); if (0 != response.getResponseCode()) { throw toSQLException("Error while processing statement", response); } } catch (HiveSQLException e) { // If the operation was cancelled by another thread, // Driver#run will return a non-zero response code. // We will simply return if the operation state is CANCELED, // otherwise throw an exception if (getStatus().getState() == OperationState.CANCELED) { return; } else { setState(OperationState.ERROR); throw e; } } catch (Exception e) { setState(OperationState.ERROR); throw new HiveSQLException("Error running query: " + e.toString(), e); } setState(OperationState.FINISHED); }
private void runQuery(HiveConf sqlOperationConf) throws HiveSQLException { try { // In Hive server mode, we are not able to retry in the FetchTask // case, when calling fetch queries since execute() has returned. // For now, we disable the test attempts. driver.setTryCount(Integer.MAX_VALUE); response = driver.run(); if (0 != response.getResponseCode()) { throw toSQLException("Error while processing statement", response); } } catch (HiveSQLException e) { // If the operation was cancelled by another thread, // Driver#run will return a non-zero response code. // We will simply return if the operation state is CANCELED, // otherwise throw an exception if (getStatus().getState() == OperationState.CANCELED) { return; } else { setState(OperationState.ERROR); throw e; } } catch (Exception e) { setState(OperationState.ERROR); throw new HiveSQLException("Error running query: " + e.toString(), e); } setState(OperationState.FINISHED); }