asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Westmann (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Fix NPE in DatasetDirectoryService.reportJobFailure
Date Tue, 14 Mar 2017 21:17:27 GMT
Till Westmann has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1582

Change subject: Fix NPE in DatasetDirectoryService.reportJobFailure
......................................................................

Fix NPE in DatasetDirectoryService.reportJobFailure

Change-Id: I4c27d2133d199bbb6984f8da14e37b2e511528ac
---
M hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/dataset/DatasetDirectoryService.java
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/82/1582/1

diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/dataset/DatasetDirectoryService.java
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/dataset/DatasetDirectoryService.java
index 927d499..8fd15f9 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/dataset/DatasetDirectoryService.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/dataset/DatasetDirectoryService.java
@@ -159,9 +159,10 @@
         if (djr != null) {
             djr.fail(exceptions);
         }
-        // TODO(tillw) throwing an NPE here hangs the system, why?
-        // TODO(tillw) still run into NPE here ..
-        jobResultLocations.get(jobId).setException(exceptions.isEmpty() ? null : exceptions.get(0));
+        final JobResultInfo jobResultInfo = jobResultLocations.get(jobId);
+        if (jobResultInfo != null) {
+            jobResultInfo.setException(exceptions.isEmpty() ? null : exceptions.get(0));
+        }
         notifyAll();
     }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1582
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c27d2133d199bbb6984f8da14e37b2e511528ac
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <tillw@apache.org>

Mime
View raw message