Skip to content

Commit

Permalink
[KYUUBI-2450] Update lastAccessTime in getStatus and catch close laun…
Browse files Browse the repository at this point in the history
…chEngineOp exception
  • Loading branch information
wForget committed Apr 24, 2022
1 parent 3ecdd42 commit cca3377
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ abstract class AbstractOperation(opType: OperationType, session: Session)
override def getHandle: OperationHandle = handle

override def getStatus: OperationStatus = {
lastAccessTime = System.currentTimeMillis()
OperationStatus(
state,
createTime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ class KyuubiSessionImpl(

override def close(): Unit = {
if (!OperationState.isTerminal(launchEngineOp.getStatus.state)) {
closeOperation(launchEngineOp.getHandle)
try {
closeOperation(launchEngineOp.getHandle)
} catch {
case e: Exception =>
warn(s"Error closing operation $launchEngineOp.getHandle during closing $handle for", e)
}
}
super.close()
sessionManager.credentialsManager.removeSessionCredentialsEpoch(handle.identifier.toString)
Expand Down

0 comments on commit cca3377

Please sign in to comment.