You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/02/05 19:42:06 UTC
[GitHub] [incubator-pinot] npawar commented on a change in pull request
#5039: Close Kafka consumer before building or downloading immutable segment
npawar commented on a change in pull request #5039: Close Kafka consumer before building or downloading immutable segment
URL: https://github.com/apache/incubator-pinot/pull/5039#discussion_r375463197
##########
File path: pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java
##########
@@ -1008,7 +1030,8 @@ public void stop()
// If the transition is OFFLINE to ONLINE, the caller should have downloaded the segment and we don't reach here.
public LLRealtimeSegmentDataManager(RealtimeSegmentZKMetadata segmentZKMetadata, TableConfig tableConfig,
InstanceZKMetadata instanceZKMetadata, RealtimeTableDataManager realtimeTableDataManager, String resourceDataDir,
- IndexLoadingConfig indexLoadingConfig, Schema schema, ServerMetrics serverMetrics) {
+ IndexLoadingConfig indexLoadingConfig, Schema schema, Map<Integer, Semaphore> partitionIdToSemaphoreMap,
Review comment:
you could introduce `getSemaphoreForPartition` method in the RealtimeDataManager, similar to `getSegmentBuildSemaphore`. Inside getSemaphoreForPartition, concurrentMap::compute can be used to either return existing value or new semaphore if null. That way you don't have to pass the whole map.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org