On Dec. 3, 2014, 5:45 a.m., Jaideep dhok wrote:
> > And agree with suma, TestHiveDriver should also need the same change.
>
> Jaideep dhok wrote:
> If you look at HiveDriver.cancelQuery, it either returns true, or throws
> an exception. Exception could be because of network issues or if Hive server
> is restarted. It woun't be because query already completed before cancel call
> is issued.
Please refer to OperationManager.cancelOperation in Hive's code base -
```
public void cancelOperation(OperationHandle opHandle) throws HiveSQLException {
Operation operation = getOperation(opHandle);
OperationState opState = operation.getStatus().getState();
if (opState == OperationState.CANCELED ||
opState == OperationState.CLOSED ||
opState == OperationState.FINISHED ||
opState == OperationState.ERROR ||
opState == OperationState.UNKNOWN) {
// Cancel should be a no-op in either cases
LOG.debug(opHandle + ": Operation is already aborted in state - " +
opState);
}
else {
LOG.debug(opHandle + ": Attempting to cancel from state - " + opState);
operation.cancel();
}
}
```
- Jaideep
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28630/#review63647
-----------------------------------------------------------
On Dec. 3, 2014, 5:10 a.m., Jaideep dhok wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28630/
> -----------------------------------------------------------
>
> (Updated Dec. 3, 2014, 5:10 a.m.)
>
>
> Review request for lens, Amareshwari Sriramadasu and Sushil Mohanty.
>
>
> Bugs: LENS-87
> https://issues.apache.org/jira/browse/LENS-87
>
>
> Repository: lens
>
>
> Description
> -------
>
> Test case should check if query cancel was successful and then evaluate
> status accordingly.
>
>
> Diffs
> -----
>
>
> lens-driver-jdbc/src/test/java/org/apache/lens/driver/jdbc/TestJdbcDriver.java
> 30b7935
>
> Diff: https://reviews.apache.org/r/28630/diff/
>
>
> Testing
> -------
>
> Modified exsiting test for cancel query.
>
>
> Thanks,
>
> Jaideep dhok
>
>