You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/12/03 12:49:22 UTC

[GitHub] leventov commented on a change in pull request #6699: release mmap immediately after merge indexes

leventov commented on a change in pull request #6699: release mmap immediately after merge indexes
URL: https://github.com/apache/incubator-druid/pull/6699#discussion_r238255187
 
 

 ##########
 File path: processing/src/main/java/org/apache/druid/segment/IndexMergerV9.java
 ##########
 @@ -798,6 +799,41 @@ public File persist(
     );
   }
 
+  @Override
+  public File mergeSegmentFiles(
+      File[] segmentFiles,
+      boolean rollup,
+      AggregatorFactory[] metricAggs,
+      File outDir,
+      IndexSpec indexSpec,
+      @Nullable SegmentWriteOutMediumFactory segmentWriteOutMediumFactory
+  ) throws IOException
+  {
+    List<QueryableIndex> indexes = Lists.transform(Arrays.asList(segmentFiles), input -> {
+      try {
+        return indexIO.loadIndex(input);
+      }
+      catch (IOException e) {
+        Throwables.propagate(e);
 
 Review comment:
   `Throwables.propagate()` must not be used without `throw ` before it. See https://github.com/google/guava/wiki/Why-we-deprecated-Throwables.propagate#propagate-is-magic. This method must not be used in new code. (Note: there are already 39 occurrences of this bug in Druid, #6701)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org