This is an automated email from the ASF dual-hosted git repository.

jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new c0309a2737 Expose instance config and starter in ClusterTest for 
easier extension (#8510)
c0309a2737 is described below

commit c0309a2737c37626dcaf868e08a61de2344ffe7b
Author: Xiaotian (Jackie) Jiang <17555551+jackie-ji...@users.noreply.github.com>
AuthorDate: Mon Apr 11 17:50:00 2022 -0700

    Expose instance config and starter in ClusterTest for easier extension 
(#8510)
---
 .../pinot/controller/helix/ControllerTest.java     | 65 +++++++++--------
 .../pinot/integration/tests/ClusterTest.java       | 81 ++++++++++++----------
 .../tests/BaseClusterIntegrationTestSet.java       |  8 +--
 .../MultiNodesOfflineClusterIntegrationTest.java   |  4 +-
 4 files changed, 79 insertions(+), 79 deletions(-)

diff --git 
a/pinot-controller/src/test/java/org/apache/pinot/controller/helix/ControllerTest.java
 
b/pinot-controller/src/test/java/org/apache/pinot/controller/helix/ControllerTest.java
index 95c6f50371..bbce94e69a 100644
--- 
a/pinot-controller/src/test/java/org/apache/pinot/controller/helix/ControllerTest.java
+++ 
b/pinot-controller/src/test/java/org/apache/pinot/controller/helix/ControllerTest.java
@@ -55,6 +55,7 @@ import org.apache.pinot.common.utils.SimpleHttpResponse;
 import org.apache.pinot.common.utils.ZkStarter;
 import org.apache.pinot.common.utils.config.TagNameUtils;
 import org.apache.pinot.common.utils.http.HttpClient;
+import org.apache.pinot.controller.BaseControllerStarter;
 import org.apache.pinot.controller.ControllerConf;
 import org.apache.pinot.controller.ControllerStarter;
 import org.apache.pinot.controller.helix.core.PinotHelixResourceManager;
@@ -62,16 +63,14 @@ import org.apache.pinot.spi.config.table.TableConfig;
 import org.apache.pinot.spi.config.table.TableType;
 import org.apache.pinot.spi.data.Schema;
 import org.apache.pinot.spi.env.PinotConfiguration;
-import org.apache.pinot.spi.utils.CommonConstants;
+import org.apache.pinot.spi.utils.CommonConstants.Helix;
+import org.apache.pinot.spi.utils.CommonConstants.Server;
 import org.apache.pinot.spi.utils.NetUtils;
 import org.apache.pinot.spi.utils.builder.TableNameBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 
-import static org.apache.pinot.spi.utils.CommonConstants.Helix.*;
-import static 
org.apache.pinot.spi.utils.CommonConstants.Helix.Instance.ADMIN_PORT_KEY;
-import static 
org.apache.pinot.spi.utils.CommonConstants.Server.DEFAULT_ADMIN_API_PORT;
 import static org.testng.Assert.assertNotNull;
 
 
@@ -94,7 +93,7 @@ public abstract class ControllerTest {
   protected final List<HelixManager> _fakeInstanceHelixManagers = new 
ArrayList<>();
   protected String _controllerDataDir;
 
-  protected ControllerStarter _controllerStarter;
+  protected BaseControllerStarter _controllerStarter;
   protected PinotHelixResourceManager _helixResourceManager;
   protected HelixManager _helixManager;
   protected HelixAdmin _helixAdmin;
@@ -219,9 +218,9 @@ public abstract class ControllerTest {
         break;
     }
     //enable case insensitive pql for test cases.
-    configAccessor.set(scope, 
CommonConstants.Helix.ENABLE_CASE_INSENSITIVE_KEY, Boolean.toString(true));
+    configAccessor.set(scope, Helix.ENABLE_CASE_INSENSITIVE_KEY, 
Boolean.toString(true));
     //Set hyperloglog log2m value to 12.
-    configAccessor.set(scope, 
CommonConstants.Helix.DEFAULT_HYPERLOGLOG_LOG2M_KEY, Integer.toString(12));
+    configAccessor.set(scope, Helix.DEFAULT_HYPERLOGLOG_LOG2M_KEY, 
Integer.toString(12));
   }
 
   protected ControllerStarter getControllerStarter() {
@@ -248,8 +247,7 @@ public abstract class ControllerTest {
   protected void addFakeBrokerInstanceToAutoJoinHelixCluster(String 
instanceId, boolean isSingleTenant)
       throws Exception {
     HelixManager helixManager =
-        HelixManagerFactory.getZKHelixManager(getHelixClusterName(), 
instanceId, InstanceType.PARTICIPANT,
-            getZkUrl());
+        HelixManagerFactory.getZKHelixManager(getHelixClusterName(), 
instanceId, InstanceType.PARTICIPANT, getZkUrl());
     helixManager.getStateMachineEngine()
         
.registerStateModelFactory(FakeBrokerResourceOnlineOfflineStateModelFactory.STATE_MODEL_DEF,
             FakeBrokerResourceOnlineOfflineStateModelFactory.FACTORY_INSTANCE);
@@ -258,7 +256,7 @@ public abstract class ControllerTest {
     if (isSingleTenant) {
       helixAdmin.addInstanceTag(getHelixClusterName(), instanceId, 
TagNameUtils.getBrokerTagForTenant(null));
     } else {
-      helixAdmin.addInstanceTag(getHelixClusterName(), instanceId, 
UNTAGGED_BROKER_INSTANCE);
+      helixAdmin.addInstanceTag(getHelixClusterName(), instanceId, 
Helix.UNTAGGED_BROKER_INSTANCE);
     }
     _fakeInstanceHelixManagers.add(helixManager);
   }
@@ -315,7 +313,7 @@ public abstract class ControllerTest {
 
   protected void addFakeServerInstancesToAutoJoinHelixCluster(int 
numInstances, boolean isSingleTenant)
       throws Exception {
-    addFakeServerInstancesToAutoJoinHelixCluster(numInstances, isSingleTenant, 
DEFAULT_ADMIN_API_PORT);
+    addFakeServerInstancesToAutoJoinHelixCluster(numInstances, isSingleTenant, 
Server.DEFAULT_ADMIN_API_PORT);
   }
 
   protected void addFakeServerInstancesToAutoJoinHelixCluster(int 
numInstances, boolean isSingleTenant,
@@ -328,14 +326,13 @@ public abstract class ControllerTest {
 
   protected void addFakeServerInstanceToAutoJoinHelixCluster(String 
instanceId, boolean isSingleTenant)
       throws Exception {
-    addFakeServerInstanceToAutoJoinHelixCluster(instanceId, isSingleTenant, 
DEFAULT_ADMIN_API_PORT);
+    addFakeServerInstanceToAutoJoinHelixCluster(instanceId, isSingleTenant, 
Server.DEFAULT_ADMIN_API_PORT);
   }
 
   protected void addFakeServerInstanceToAutoJoinHelixCluster(String 
instanceId, boolean isSingleTenant, int adminPort)
       throws Exception {
     HelixManager helixManager =
-        HelixManagerFactory.getZKHelixManager(getHelixClusterName(), 
instanceId, InstanceType.PARTICIPANT,
-            getZkUrl());
+        HelixManagerFactory.getZKHelixManager(getHelixClusterName(), 
instanceId, InstanceType.PARTICIPANT, getZkUrl());
     helixManager.getStateMachineEngine()
         
.registerStateModelFactory(FakeSegmentOnlineOfflineStateModelFactory.STATE_MODEL_DEF,
             FakeSegmentOnlineOfflineStateModelFactory.FACTORY_INSTANCE);
@@ -345,11 +342,12 @@ public abstract class ControllerTest {
       helixAdmin.addInstanceTag(getHelixClusterName(), instanceId, 
TagNameUtils.getOfflineTagForTenant(null));
       helixAdmin.addInstanceTag(getHelixClusterName(), instanceId, 
TagNameUtils.getRealtimeTagForTenant(null));
     } else {
-      helixAdmin.addInstanceTag(getHelixClusterName(), instanceId, 
UNTAGGED_SERVER_INSTANCE);
+      helixAdmin.addInstanceTag(getHelixClusterName(), instanceId, 
Helix.UNTAGGED_SERVER_INSTANCE);
     }
     HelixConfigScope configScope = new 
HelixConfigScopeBuilder(HelixConfigScope.ConfigScopeProperty.PARTICIPANT,
         getHelixClusterName()).forParticipant(instanceId).build();
-    helixAdmin.setConfig(configScope, Collections.singletonMap(ADMIN_PORT_KEY, 
Integer.toString(adminPort)));
+    helixAdmin.setConfig(configScope,
+        Collections.singletonMap(Helix.Instance.ADMIN_PORT_KEY, 
Integer.toString(adminPort)));
     _fakeInstanceHelixManagers.add(helixManager);
   }
 
@@ -433,14 +431,13 @@ public abstract class ControllerTest {
   protected void addFakeMinionInstanceToAutoJoinHelixCluster(String instanceId)
       throws Exception {
     HelixManager helixManager =
-        HelixManagerFactory.getZKHelixManager(getHelixClusterName(), 
instanceId, InstanceType.PARTICIPANT,
-            getZkUrl());
+        HelixManagerFactory.getZKHelixManager(getHelixClusterName(), 
instanceId, InstanceType.PARTICIPANT, getZkUrl());
     helixManager.getStateMachineEngine()
         
.registerStateModelFactory(FakeMinionResourceOnlineOfflineStateModelFactory.STATE_MODEL_DEF,
             FakeMinionResourceOnlineOfflineStateModelFactory.FACTORY_INSTANCE);
     helixManager.connect();
     HelixAdmin helixAdmin = helixManager.getClusterManagmentTool();
-    helixAdmin.addInstanceTag(getHelixClusterName(), instanceId, 
UNTAGGED_MINION_INSTANCE);
+    helixAdmin.addInstanceTag(getHelixClusterName(), instanceId, 
Helix.UNTAGGED_MINION_INSTANCE);
     _fakeInstanceHelixManagers.add(helixManager);
   }
 
@@ -615,10 +612,10 @@ public abstract class ControllerTest {
   public void enableResourceConfigForLeadControllerResource(boolean enable) {
     ConfigAccessor configAccessor = _helixManager.getConfigAccessor();
     ResourceConfig resourceConfig =
-        configAccessor.getResourceConfig(getHelixClusterName(), 
LEAD_CONTROLLER_RESOURCE_NAME);
-    if 
(Boolean.parseBoolean(resourceConfig.getSimpleConfig(LEAD_CONTROLLER_RESOURCE_ENABLED_KEY))
 != enable) {
-      resourceConfig.putSimpleConfig(LEAD_CONTROLLER_RESOURCE_ENABLED_KEY, 
Boolean.toString(enable));
-      configAccessor.setResourceConfig(getHelixClusterName(), 
LEAD_CONTROLLER_RESOURCE_NAME, resourceConfig);
+        configAccessor.getResourceConfig(getHelixClusterName(), 
Helix.LEAD_CONTROLLER_RESOURCE_NAME);
+    if 
(Boolean.parseBoolean(resourceConfig.getSimpleConfig(Helix.LEAD_CONTROLLER_RESOURCE_ENABLED_KEY))
 != enable) {
+      
resourceConfig.putSimpleConfig(Helix.LEAD_CONTROLLER_RESOURCE_ENABLED_KEY, 
Boolean.toString(enable));
+      configAccessor.setResourceConfig(getHelixClusterName(), 
Helix.LEAD_CONTROLLER_RESOURCE_NAME, resourceConfig);
     }
   }
 
@@ -630,8 +627,8 @@ public abstract class ControllerTest {
   public static String sendGetRequest(String urlString, Map<String, String> 
headers)
       throws IOException {
     try {
-      SimpleHttpResponse resp = 
HttpClient.wrapAndThrowHttpException(getHttpClient().sendGetRequest(
-          new URL(urlString).toURI(), headers));
+      SimpleHttpResponse resp =
+          
HttpClient.wrapAndThrowHttpException(getHttpClient().sendGetRequest(new 
URL(urlString).toURI(), headers));
       return constructResponse(resp);
     } catch (URISyntaxException | HttpErrorStatusException e) {
       throw new IOException(e);
@@ -651,8 +648,8 @@ public abstract class ControllerTest {
   public static String sendPostRequest(String urlString, String payload, 
Map<String, String> headers)
       throws IOException {
     try {
-      SimpleHttpResponse resp = 
HttpClient.wrapAndThrowHttpException(getHttpClient().sendJsonPostRequest(
-          new URL(urlString).toURI(), payload, headers));
+      SimpleHttpResponse resp = HttpClient.wrapAndThrowHttpException(
+          getHttpClient().sendJsonPostRequest(new URL(urlString).toURI(), 
payload, headers));
       return constructResponse(resp);
     } catch (URISyntaxException | HttpErrorStatusException e) {
       throw new IOException(e);
@@ -664,8 +661,8 @@ public abstract class ControllerTest {
     try {
       EntityBuilder builder = EntityBuilder.create();
       builder.setText(payload);
-      SimpleHttpResponse resp = 
HttpClient.wrapAndThrowHttpException(getHttpClient().sendPostRequest(
-          new URL(urlString).toURI(), builder.build(), headers));
+      SimpleHttpResponse resp = HttpClient.wrapAndThrowHttpException(
+          getHttpClient().sendPostRequest(new URL(urlString).toURI(), 
builder.build(), headers));
       return constructResponse(resp);
     } catch (URISyntaxException | HttpErrorStatusException e) {
       throw new IOException(e);
@@ -685,8 +682,8 @@ public abstract class ControllerTest {
   public static String sendPutRequest(String urlString, String payload, 
Map<String, String> headers)
       throws IOException {
     try {
-      SimpleHttpResponse resp = 
HttpClient.wrapAndThrowHttpException(getHttpClient().sendJsonPutRequest(
-          new URL(urlString).toURI(), payload, headers));
+      SimpleHttpResponse resp = HttpClient.wrapAndThrowHttpException(
+          getHttpClient().sendJsonPutRequest(new URL(urlString).toURI(), 
payload, headers));
       return constructResponse(resp);
     } catch (URISyntaxException | HttpErrorStatusException e) {
       throw new IOException(e);
@@ -701,8 +698,8 @@ public abstract class ControllerTest {
   public static String sendDeleteRequest(String urlString, Map<String, String> 
headers)
       throws IOException {
     try {
-      SimpleHttpResponse resp = 
HttpClient.wrapAndThrowHttpException(getHttpClient().sendDeleteRequest(
-          new URL(urlString).toURI(), headers));
+      SimpleHttpResponse resp =
+          
HttpClient.wrapAndThrowHttpException(getHttpClient().sendDeleteRequest(new 
URL(urlString).toURI(), headers));
       return constructResponse(resp);
     } catch (URISyntaxException | HttpErrorStatusException e) {
       throw new IOException(e);
@@ -724,7 +721,7 @@ public abstract class ControllerTest {
   }
 
   public static SimpleHttpResponse sendMultipartPutRequest(String url, String 
body)
-    throws IOException {
+      throws IOException {
     return sendMultipartPutRequest(url, body, null);
   }
 
diff --git 
a/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterTest.java
 
b/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterTest.java
index ea15a66ce1..d3cebf1cd4 100644
--- 
a/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterTest.java
+++ 
b/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterTest.java
@@ -48,14 +48,17 @@ import org.apache.http.HttpStatus;
 import org.apache.http.NameValuePair;
 import org.apache.http.message.BasicHeader;
 import org.apache.http.message.BasicNameValuePair;
+import org.apache.pinot.broker.broker.helix.BaseBrokerStarter;
 import org.apache.pinot.broker.broker.helix.HelixBrokerStarter;
 import org.apache.pinot.common.exception.HttpErrorStatusException;
 import org.apache.pinot.common.utils.FileUploadDownloadClient;
 import org.apache.pinot.common.utils.http.HttpClient;
 import org.apache.pinot.controller.helix.ControllerTest;
+import org.apache.pinot.minion.BaseMinionStarter;
 import org.apache.pinot.minion.MinionStarter;
 import org.apache.pinot.plugin.inputformat.avro.AvroRecordExtractor;
 import org.apache.pinot.plugin.inputformat.avro.AvroUtils;
+import org.apache.pinot.server.starter.helix.BaseServerStarter;
 import org.apache.pinot.server.starter.helix.DefaultHelixStarterServerConfig;
 import org.apache.pinot.server.starter.helix.HelixServerStarter;
 import org.apache.pinot.spi.config.table.TableType;
@@ -86,10 +89,10 @@ public abstract class ClusterTest extends ControllerTest {
 
   protected String _brokerBaseApiUrl;
 
-  private List<HelixBrokerStarter> _brokerStarters;
-  private List<HelixServerStarter> _serverStarters;
-  private MinionStarter _minionStarter;
-  private List<Integer> _brokerPorts;
+  protected List<BaseBrokerStarter> _brokerStarters;
+  protected List<BaseServerStarter> _serverStarters;
+  protected List<Integer> _brokerPorts;
+  protected BaseMinionStarter _minionStarter;
 
   protected PinotConfiguration getDefaultBrokerConfiguration() {
     return new PinotConfiguration();
@@ -99,6 +102,17 @@ public abstract class ClusterTest extends ControllerTest {
     // Do nothing, to be overridden by tests if they need something specific
   }
 
+  protected PinotConfiguration getBrokerConf(int brokerId) {
+    PinotConfiguration brokerConf = getDefaultBrokerConfiguration();
+    brokerConf.setProperty(Helix.CONFIG_OF_CLUSTER_NAME, 
getHelixClusterName());
+    brokerConf.setProperty(Helix.CONFIG_OF_ZOOKEEPR_SERVER, getZkUrl());
+    brokerConf.setProperty(Broker.CONFIG_OF_BROKER_TIMEOUT_MS, 60 * 1000L);
+    brokerConf.setProperty(Helix.KEY_OF_BROKER_QUERY_PORT, 
NetUtils.findOpenPort(DEFAULT_BROKER_PORT + brokerId));
+    brokerConf.setProperty(Broker.CONFIG_OF_DELAY_SHUTDOWN_TIME_MS, 0);
+    overrideBrokerConf(brokerConf);
+    return brokerConf;
+  }
+
   protected void startBroker()
       throws Exception {
     startBrokers(1);
@@ -109,25 +123,17 @@ public abstract class ClusterTest extends ControllerTest {
     _brokerStarters = new ArrayList<>(numBrokers);
     _brokerPorts = new ArrayList<>();
     for (int i = 0; i < numBrokers; i++) {
-      HelixBrokerStarter brokerStarter = startOneBroker(i);
+      BaseBrokerStarter brokerStarter = startOneBroker(i);
       _brokerStarters.add(brokerStarter);
       _brokerPorts.add(brokerStarter.getPort());
     }
     _brokerBaseApiUrl = "http://localhost:"; + _brokerPorts.get(0);
   }
 
-  protected HelixBrokerStarter startOneBroker(int brokerId)
+  protected BaseBrokerStarter startOneBroker(int brokerId)
       throws Exception {
-    PinotConfiguration brokerConf = getDefaultBrokerConfiguration();
-    brokerConf.setProperty(Helix.CONFIG_OF_CLUSTER_NAME, 
getHelixClusterName());
-    brokerConf.setProperty(Helix.CONFIG_OF_ZOOKEEPR_SERVER, getZkUrl());
-    brokerConf.setProperty(Broker.CONFIG_OF_BROKER_TIMEOUT_MS, 60 * 1000L);
-    brokerConf.setProperty(Helix.KEY_OF_BROKER_QUERY_PORT, 
NetUtils.findOpenPort(DEFAULT_BROKER_PORT + brokerId));
-    brokerConf.setProperty(Broker.CONFIG_OF_DELAY_SHUTDOWN_TIME_MS, 0);
-    overrideBrokerConf(brokerConf);
-
     HelixBrokerStarter brokerStarter = new HelixBrokerStarter();
-    brokerStarter.init(brokerConf);
+    brokerStarter.init(getBrokerConf(brokerId));
     brokerStarter.start();
     return brokerStarter;
   }
@@ -181,6 +187,23 @@ public abstract class ClusterTest extends ControllerTest {
     // Do nothing, to be overridden by tests if they need something specific
   }
 
+  protected PinotConfiguration getServerConf(int serverId) {
+    PinotConfiguration serverConf = getDefaultServerConfiguration();
+    serverConf.setProperty(Helix.CONFIG_OF_CLUSTER_NAME, 
getHelixClusterName());
+    serverConf.setProperty(Helix.CONFIG_OF_ZOOKEEPR_SERVER, getZkUrl());
+    serverConf.setProperty(Server.CONFIG_OF_INSTANCE_DATA_DIR, 
Server.DEFAULT_INSTANCE_DATA_DIR + "-" + serverId);
+    serverConf.setProperty(Server.CONFIG_OF_INSTANCE_SEGMENT_TAR_DIR,
+        Server.DEFAULT_INSTANCE_SEGMENT_TAR_DIR + "-" + serverId);
+    serverConf.setProperty(Server.CONFIG_OF_ADMIN_API_PORT, 
Server.DEFAULT_ADMIN_API_PORT - serverId);
+    serverConf.setProperty(Server.CONFIG_OF_NETTY_PORT, 
Helix.DEFAULT_SERVER_NETTY_PORT + serverId);
+    serverConf.setProperty(Server.CONFIG_OF_GRPC_PORT, 
Server.DEFAULT_GRPC_PORT + serverId);
+    // Thread time measurement is disabled by default, enable it in 
integration tests.
+    // TODO: this can be removed when we eventually enable thread time 
measurement by default.
+    
serverConf.setProperty(Server.CONFIG_OF_ENABLE_THREAD_CPU_TIME_MEASUREMENT, 
true);
+    overrideServerConf(serverConf);
+    return serverConf;
+  }
+
   protected void startServer()
       throws Exception {
     startServers(1);
@@ -195,24 +218,10 @@ public abstract class ClusterTest extends ControllerTest {
     }
   }
 
-  protected HelixServerStarter startOneServer(int serverId)
+  protected BaseServerStarter startOneServer(int serverId)
       throws Exception {
-    PinotConfiguration serverConf = getDefaultServerConfiguration();
-    serverConf.setProperty(Helix.CONFIG_OF_CLUSTER_NAME, 
getHelixClusterName());
-    serverConf.setProperty(Helix.CONFIG_OF_ZOOKEEPR_SERVER, getZkUrl());
-    serverConf.setProperty(Server.CONFIG_OF_INSTANCE_DATA_DIR, 
Server.DEFAULT_INSTANCE_DATA_DIR + "-" + serverId);
-    serverConf.setProperty(Server.CONFIG_OF_INSTANCE_SEGMENT_TAR_DIR,
-        Server.DEFAULT_INSTANCE_SEGMENT_TAR_DIR + "-" + serverId);
-    serverConf.setProperty(Server.CONFIG_OF_ADMIN_API_PORT, 
Server.DEFAULT_ADMIN_API_PORT - serverId);
-    serverConf.setProperty(Server.CONFIG_OF_NETTY_PORT, 
Helix.DEFAULT_SERVER_NETTY_PORT + serverId);
-    serverConf.setProperty(Server.CONFIG_OF_GRPC_PORT, 
Server.DEFAULT_GRPC_PORT + serverId);
-    // Thread time measurement is disabled by default, enable it in 
integration tests.
-    // TODO: this can be removed when we eventually enable thread time 
measurement by default.
-    
serverConf.setProperty(Server.CONFIG_OF_ENABLE_THREAD_CPU_TIME_MEASUREMENT, 
true);
-    overrideServerConf(serverConf);
-
     HelixServerStarter serverStarter = new HelixServerStarter();
-    serverStarter.init(serverConf);
+    serverStarter.init(getServerConf(serverId));
     serverStarter.start();
     return serverStarter;
   }
@@ -233,10 +242,6 @@ public abstract class ClusterTest extends ControllerTest {
     _serverStarters.add(serverStarter);
   }
 
-  protected List<HelixServerStarter> getServerStarters() {
-    return _serverStarters;
-  }
-
   protected PinotConfiguration getDefaultMinionConfiguration() {
     return new PinotConfiguration();
   }
@@ -256,7 +261,7 @@ public abstract class ClusterTest extends ControllerTest {
 
   protected void stopBroker() {
     assertNotNull(_brokerStarters, "Brokers are not started");
-    for (HelixBrokerStarter brokerStarter : _brokerStarters) {
+    for (BaseBrokerStarter brokerStarter : _brokerStarters) {
       brokerStarter.stop();
     }
     _brokerStarters = null;
@@ -264,7 +269,7 @@ public abstract class ClusterTest extends ControllerTest {
 
   protected void stopServer() {
     assertNotNull(_serverStarters, "Servers are not started");
-    for (HelixServerStarter serverStarter : _serverStarters) {
+    for (BaseServerStarter serverStarter : _serverStarters) {
       serverStarter.stop();
     }
     FileUtils.deleteQuietly(new File(Server.DEFAULT_INSTANCE_BASE_DIR));
@@ -281,7 +286,7 @@ public abstract class ClusterTest extends ControllerTest {
   protected void restartServers()
       throws Exception {
     assertNotNull(_serverStarters, "Servers are not started");
-    for (HelixServerStarter serverStarter : _serverStarters) {
+    for (BaseServerStarter serverStarter : _serverStarters) {
       serverStarter.stop();
     }
     int numServers = _serverStarters.size();
diff --git 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTestSet.java
 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTestSet.java
index 58019ce27e..011cd15d2c 100644
--- 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTestSet.java
+++ 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTestSet.java
@@ -30,7 +30,7 @@ import org.apache.pinot.client.ResultSetGroup;
 import org.apache.pinot.common.exception.QueryException;
 import org.apache.pinot.core.query.utils.idset.IdSet;
 import org.apache.pinot.core.query.utils.idset.IdSets;
-import org.apache.pinot.server.starter.helix.HelixServerStarter;
+import org.apache.pinot.server.starter.helix.BaseServerStarter;
 import org.apache.pinot.spi.data.DimensionFieldSpec;
 import org.apache.pinot.spi.data.FieldSpec;
 import org.apache.pinot.spi.data.MetricFieldSpec;
@@ -76,12 +76,10 @@ public abstract class BaseClusterIntegrationTestSet extends 
BaseClusterIntegrati
   /**
    * Test server table data manager deletion after the table is dropped
    */
-  protected void cleanupTestTableDataManager(String tableNameWithType)
-      throws Exception {
-    List<HelixServerStarter> serverStarters = getServerStarters();
+  protected void cleanupTestTableDataManager(String tableNameWithType) {
     TestUtils.waitForCondition(aVoid -> {
       try {
-        for (HelixServerStarter serverStarter : serverStarters) {
+        for (BaseServerStarter serverStarter : _serverStarters) {
           if 
(serverStarter.getServerInstance().getInstanceDataManager().getTableDataManager(tableNameWithType)
               != null) {
             return false;
diff --git 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiNodesOfflineClusterIntegrationTest.java
 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiNodesOfflineClusterIntegrationTest.java
index e5757a879c..15b1fd9f14 100644
--- 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiNodesOfflineClusterIntegrationTest.java
+++ 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiNodesOfflineClusterIntegrationTest.java
@@ -22,7 +22,7 @@ import java.util.Collections;
 import java.util.Map;
 import org.apache.helix.model.ExternalView;
 import org.apache.helix.model.IdealState;
-import org.apache.pinot.broker.broker.helix.HelixBrokerStarter;
+import org.apache.pinot.broker.broker.helix.BaseBrokerStarter;
 import org.apache.pinot.spi.utils.CommonConstants;
 import 
org.apache.pinot.spi.utils.CommonConstants.Helix.StateModel.BrokerResourceStateModel;
 import org.apache.pinot.util.TestUtils;
@@ -59,7 +59,7 @@ public class MultiNodesOfflineClusterIntegrationTest extends 
OfflineClusterInteg
   public void testUpdateBrokerResource()
       throws Exception {
     // Add a new broker to the cluster
-    HelixBrokerStarter brokerStarter = startOneBroker(NUM_BROKERS);
+    BaseBrokerStarter brokerStarter = startOneBroker(NUM_BROKERS);
 
     // Check if broker is added to all the tables in broker resource
     String clusterName = getHelixClusterName();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to