Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Drill, mail # dev - [6/8] git commit: DRILL-244: NPE when updating assignment affinity metric


Copy link to this message
-
[6/8] git commit: DRILL-244: NPE when updating assignment affinity metric
jacques@... 2013-10-11, 18:50
DRILL-244: NPE when updating assignment affinity metric
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/4ccea489
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/4ccea489
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/4ccea489

Branch: refs/heads/master
Commit: 4ccea48905cca4a822521c83ad2ff31eb62bfa06
Parents: c93a5a1
Author: Steven Phillips <[EMAIL PROTECTED]>
Authored: Thu Sep 12 20:11:55 2013 -0700
Committer: Steven Phillips <[EMAIL PROTECTED]>
Committed: Fri Sep 20 15:10:56 2013 -0700

----------------------------------------------------------------------
 .../org/apache/drill/exec/store/parquet/ParquetGroupScan.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/4ccea489/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
index 09dc2f7..10fcdff 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
@@ -341,7 +341,11 @@ public class ParquetGroupScan extends AbstractGroupScan {
 
           endpointAssignments.put(minorFragmentId, rowGroupInfo.getRowGroupReadEntry());
           logger.debug("Assigned rowGroup {} to minorFragmentId {} endpoint {}", rowGroupInfo.getRowGroupIndex(), minorFragmentId, endpoints.get(minorFragmentId).getAddress());
-          assignmentAffinityStats.update(bytesPerEndpoint.get(currentEndpoint) / rowGroupInfo.getLength());
+          if (bytesPerEndpoint.get(currentEndpoint) != null) {
+            assignmentAffinityStats.update(bytesPerEndpoint.get(currentEndpoint) / rowGroupInfo.getLength());
+          } else {
+            assignmentAffinityStats.update(0);
+          }
           iter.remove();
           fragmentPointer = (minorFragmentId + 1) % endpoints.size();
           break;