throw new SQLException(status.getErrorMessage(), status.getSqlState());
throw new SQLException(status.getErrorMessage(), status.getSqlState());
QueryStatus status = doFetchStatus(operationHandle); if (QueryStatus.OpStatus.ERROR == status.getStatus()) { throw new HiveSQLException(status.getErrorMessage(), status.getSqlState());
QueryStatus status = doFetchStatus(operationHandle); if (QueryStatus.OpStatus.ERROR == status.getStatus()) { throw new HiveSQLException(status.getErrorMessage(), status.getSqlState());
protected QueryStatus fetchStatus(OperationInfo operationInfo) throws ExploreException, HandleNotFoundException, HiveSQLException { QueryStatus queryStatus; try { queryStatus = doFetchStatus(operationInfo.getOperationHandle()); if (QueryStatus.OpStatus.ERROR.equals(queryStatus.getStatus()) && queryStatus.getErrorMessage() == null) { queryStatus = new QueryStatus("Operation failed. See the log for more details.", null); } } catch (HiveSQLException e) { // if this is a sql exception, record it in the query status. // it means that query execution failed, but we can successfully retrieve the status. if (e.getSQLState() != null) { queryStatus = new QueryStatus(e.getMessage(), e.getSQLState()); } else { // this is an internal error - we are not able to retrieve the status throw new ExploreException(e.getMessage(), e); } } operationInfo.setStatus(queryStatus); return queryStatus; }
protected QueryStatus fetchStatus(OperationInfo operationInfo) throws ExploreException, HandleNotFoundException, HiveSQLException { QueryStatus queryStatus; try { queryStatus = doFetchStatus(operationInfo.getOperationHandle()); if (QueryStatus.OpStatus.ERROR.equals(queryStatus.getStatus()) && queryStatus.getErrorMessage() == null) { queryStatus = new QueryStatus("Operation failed. See the log for more details.", null); } } catch (HiveSQLException e) { // if this is a sql exception, record it in the query status. // it means that query execution failed, but we can successfully retrieve the status. if (e.getSQLState() != null) { queryStatus = new QueryStatus(e.getMessage(), e.getSQLState()); } else { // this is an internal error - we are not able to retrieve the status throw new ExploreException(e.getMessage(), e); } } operationInfo.setStatus(queryStatus); return queryStatus; }