From commits-return-15984-archive-asf-public=cust-asf.ponee.io@pinot.apache.org Wed Feb 5 19:42:07 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 73B0618067C for ; Wed, 5 Feb 2020 20:42:07 +0100 (CET) Received: (qmail 81522 invoked by uid 500); 5 Feb 2020 19:42:06 -0000 Mailing-List: contact commits-help@pinot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pinot.apache.org Delivered-To: mailing list commits@pinot.apache.org Received: (qmail 81481 invoked by uid 99); 5 Feb 2020 19:42:06 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2020 19:42:06 +0000 From: GitBox To: commits@pinot.apache.org Subject: [GitHub] [incubator-pinot] npawar commented on a change in pull request #5039: Close Kafka consumer before building or downloading immutable segment Message-ID: <158093172682.26523.7261206987652226638.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Wed, 05 Feb 2020 19:42:06 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 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