jtao15 commented on a change in pull request #7516:
URL: https://github.com/apache/pinot/pull/7516#discussion_r724580809



##########
File path: 
pinot-minion/src/main/java/org/apache/pinot/minion/executor/MinionTaskZkMetadataManager.java
##########
@@ -31,9 +31,11 @@
  */
 public class MinionTaskZkMetadataManager {
   private final HelixManager _helixManager;
+  private final int _endReplaceSegmentsSocketTimeoutMs;
 
-  public MinionTaskZkMetadataManager(HelixManager helixManager) {
+  public MinionTaskZkMetadataManager(HelixManager helixManager, int 
endReplaceSegmentsSocketTimeoutMs) {

Review comment:
       As discussed offline, based on the definition, the minion configs should 
not be maintained by this class. Moved the config into 
`BaseMultipleSegmentsConversionExecutor` class. Added new init function in 
`PinotTaskExecutorFactory` to make it backward compatible.

##########
File path: 
pinot-minion/src/main/java/org/apache/pinot/minion/BaseMinionStarter.java
##########
@@ -101,7 +101,11 @@ public void init(PinotConfiguration config)
     _listenerConfigs = ListenerConfigUtil.buildMinionAdminConfigs(_config);
     setupHelixSystemProperties();
     _helixManager = new ZKHelixManager(helixClusterName, _instanceId, 
InstanceType.PARTICIPANT, zkAddress);
-    MinionTaskZkMetadataManager minionTaskZkMetadataManager = new 
MinionTaskZkMetadataManager(_helixManager);
+    int endReplaceSegmentsSocketTimeoutMs =
+        
_config.getProperty(CommonConstants.Minion.END_REPLACE_SEGMENTS_SOCKET_TIMEOUT_MS_KEY,
+            
CommonConstants.Minion.DEFAULT_END_REPLACE_SEGMENTS_SOCKET_TIMEOUT_MS);
+    MinionTaskZkMetadataManager minionTaskZkMetadataManager =
+        new MinionTaskZkMetadataManager(_helixManager, 
endReplaceSegmentsSocketTimeoutMs);

Review comment:
       Good point! This is also mentioned by @snleee offline. Created the new 
`MinionConf` class instead. Based on the definition of 
`MinionTaskZkMetadataManager`, moved the configs out of this class.

##########
File path: 
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/test/java/org/apache/pinot/plugin/minion/tasks/mergerollup/MergeRollupTaskExecutorTest.java
##########
@@ -104,7 +104,7 @@ public void setUp()
   @Test
   public void testConvert()
       throws Exception {
-    MergeRollupTaskExecutor mergeRollupTaskExecutor = new 
MergeRollupTaskExecutor();
+    MergeRollupTaskExecutor mergeRollupTaskExecutor = new 
MergeRollupTaskExecutor(null);

Review comment:
       Updated the constructor to use `MinionConf` as input instead. Hmm, this 
requires to add the default constructor explicitly while the config should be a 
required field. Maybe we can use `new MinionConf()` instead cause this field 
should never be `null`?




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to