[Fix](show-load)Show load npe(userinfo is null) (#27698)
This commit is contained in:
@ -826,8 +826,12 @@ public abstract class LoadJob extends AbstractTxnStateChangeCallback implements
|
||||
jobInfo.add(transactionId);
|
||||
// error tablets
|
||||
jobInfo.add(errorTabletsToJson());
|
||||
// user
|
||||
jobInfo.add(userInfo.getQualifiedUser());
|
||||
// user, some load job may not have user info
|
||||
if (userInfo == null || userInfo.getQualifiedUser() == null) {
|
||||
jobInfo.add(FeConstants.null_string);
|
||||
} else {
|
||||
jobInfo.add(userInfo.getQualifiedUser());
|
||||
}
|
||||
// comment
|
||||
jobInfo.add(comment);
|
||||
return jobInfo;
|
||||
|
||||
@ -572,8 +572,9 @@ public class LoadManager implements Writable {
|
||||
}
|
||||
// add load job info
|
||||
loadJobInfos.add(loadJob.getShowInfo());
|
||||
} catch (DdlException e) {
|
||||
continue;
|
||||
} catch (RuntimeException | DdlException e) {
|
||||
// ignore this load job
|
||||
LOG.warn("get load job info failed. job id: {}", loadJob.getId(), e);
|
||||
}
|
||||
}
|
||||
return loadJobInfos;
|
||||
|
||||
Reference in New Issue
Block a user