[Fix](SparkLoad): fix the timeout aborted loadtasks are not cleaned up. (#15480)

Co-authored-by: spaces-x <weixiang06@meituan.com>
This commit is contained in:
spaces-x
2022-12-30 14:02:00 +08:00
committed by GitHub
parent 5c5b7a5c6f
commit 5db8b52441

View File

@ -695,6 +695,8 @@ public class SparkLoadJob extends BulkLoadJob {
// clear job infos that not persist
sparkLoadAppHandle = null;
resourceDesc = null;
etlOutputPath = "";
appId = "";
tableToLoadPartitions.clear();
indexToPushBrokerReaderParams.clear();
indexToSchemaHash.clear();
@ -713,6 +715,13 @@ public class SparkLoadJob extends BulkLoadJob {
clearJob();
}
@Override
public void afterAborted(TransactionState txnState, boolean txnOperated, String txnStatusChangeReason)
throws UserException {
super.afterAborted(txnState, txnOperated, txnStatusChangeReason);
clearJob();
}
@Override
public void cancelJobWithoutCheck(FailMsg failMsg, boolean abortTxn, boolean needLog) {
super.cancelJobWithoutCheck(failMsg, abortTxn, needLog);