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/05/03 23:56:40 UTC

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

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



##########
File path: server/src/main/java/org/apache/druid/segment/realtime/appenderator/AppenderatorImpl.java
##########
@@ -161,6 +164,13 @@
 
   private volatile Throwable persistError;
 
+  private final boolean isRealTime;
+  // Use next Map to store metadata (File, SegmentId) for a hydrant for batch appenderator
+  // in order to facilitate the mapping of the QueryableIndex associated with a given hydrant
+  // at merge time. This is necessary since batch appenderator will not map the QueryableIndex
+  // at persist time in order to minimize its memory footprint.
+  private final Map<FireHydrant, Pair<File, SegmentId>> persistedHydrantMetadata = new HashMap<>();

Review comment:
       Yeah, IndentyHashMap makes it explicit that the key is a Java reference. Also, clearing the Map in the places you referenced above. 




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