deniskuzZ commented on code in PR #3451:
URL: https://github.com/apache/hive/pull/3451#discussion_r924657420
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java:
##########
@@ -501,7 +502,11 @@ protected Boolean findNextCompactionAndExecute(boolean
collectGenericStats, bool
}
} catch (TException | IOException t) {
LOG.error("Caught an exception in the main loop of compactor worker " +
workerName, t);
- markFailed(ci, t.getMessage());
+
+ if (ci != null) {
Review Comment:
I think it's better to move NULL check inside of markFailed, it's already
there but joined with an extra condition
````
private void markFailed(CompactionInfo ci, String errorMessage) {
if (ci == null)
return;
if (org.apache.commons.lang3.StringUtils.isNotBlank(errorMessage)) {
ci.errorMessage = errorMessage;
}
....
````
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]