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 2021/04/26 19:23:00 UTC

[GitHub] [druid] jihoonson commented on a change in pull request #11123: Avoid memory mapping hydrants after they are persisted & after they are merged for native batch ingestion

jihoonson commented on a change in pull request #11123:
URL: https://github.com/apache/druid/pull/11123#discussion_r620583712



##########
File path: server/src/main/java/org/apache/druid/segment/realtime/FireHydrant.java
##########
@@ -34,17 +34,53 @@
 
 import javax.annotation.Nullable;
 import java.io.Closeable;
+import java.io.File;
 import java.util.Optional;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.function.Function;
 
 /**
+ *
  */
 public class FireHydrant
 {
   private final int count;
   private final AtomicReference<ReferenceCountingSegment> adapter;
   private volatile IncrementalIndex index;
+  private File persistedFile;
+  private SegmentId persistedSegmentId;
+
+  /**
+   * @return The persisted file path. This is needed to recreate mapped files before merging.
+   * it will be null for real time hydrants.
+   */
+  public @Nullable File getPersistedFile()
+  {
+    return persistedFile;
+  }
+
+  /**
+   * @return The persisted segment id. This is needed to recreate mapped files before merging.
+   * It will be null for real time hydrants
+   */
+  public @Nullable SegmentId getPersistedSegmentId()

Review comment:
       I don't understand what `persistedSegmentId` is. Is it ever different from `segmentId`?




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

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



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