You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/07/19 15:31:43 UTC

[GitHub] [hive] deniskuzZ commented on a diff in pull request #3451: Hive-26288 Fill NullPointerException in Worker

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 extra condition



##########
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



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org