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

xiangfu 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 7c15bc3268 Adding more methods in QuickStartCommand for extensibility 
(#8976)
7c15bc3268 is described below

commit 7c15bc326884620e2aaded78a67d4fb8fc577eeb
Author: Xiang Fu <xiangfu.1...@gmail.com>
AuthorDate: Sat Jun 25 15:53:34 2022 -0700

    Adding more methods in QuickStartCommand for extensibility (#8976)
---
 .../pinot/tools/admin/command/QuickStartCommand.java     | 16 ++++++++++++++--
 .../pinot/tools/admin/command/TestQuickStartCommand.java |  4 ++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git 
a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/QuickStartCommand.java
 
b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/QuickStartCommand.java
index 440d8313c7..96061ed4b7 100644
--- 
a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/QuickStartCommand.java
+++ 
b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/QuickStartCommand.java
@@ -74,6 +74,10 @@ public class QuickStartCommand extends 
AbstractBaseAdminCommand implements Comma
     return this;
   }
 
+  public String getType() {
+    return _type;
+  }
+
   public String getTmpDir() {
     return _tmpDir;
   }
@@ -98,6 +102,14 @@ public class QuickStartCommand extends 
AbstractBaseAdminCommand implements Comma
     _zkExternalAddress = zkExternalAddress;
   }
 
+  public String getConfigFilePath() {
+    return _configFilePath;
+  }
+
+  public void setConfigFilePath(String configFilePath) {
+    _configFilePath = configFilePath;
+  }
+
   @Override
   public String toString() {
     return ("QuickStart -type " + _type);
@@ -112,7 +124,7 @@ public class QuickStartCommand extends 
AbstractBaseAdminCommand implements Comma
     return "Run Pinot QuickStart.";
   }
 
-  public static QuickStartBase selectQuickStart(String type)
+  public QuickStartBase selectQuickStart(String type)
           throws NoSuchMethodException, InvocationTargetException, 
InstantiationException, IllegalAccessException {
     Set<Class<? extends QuickStartBase>> quickStarts = allQuickStarts();
     for (Class<? extends QuickStartBase> quickStart : quickStarts) {
@@ -167,7 +179,7 @@ public class QuickStartCommand extends 
AbstractBaseAdminCommand implements Comma
     return validTypes;
   }
 
-  private static Set<Class<? extends QuickStartBase>> allQuickStarts() {
+  protected Set<Class<? extends QuickStartBase>> allQuickStarts() {
     Reflections reflections = new Reflections("org.apache.pinot.tools");
     return reflections.getSubTypesOf(QuickStartBase.class);
   }
diff --git 
a/pinot-tools/src/test/java/org/apache/pinot/tools/admin/command/TestQuickStartCommand.java
 
b/pinot-tools/src/test/java/org/apache/pinot/tools/admin/command/TestQuickStartCommand.java
index e15f07344f..f8e8a0e6b1 100644
--- 
a/pinot-tools/src/test/java/org/apache/pinot/tools/admin/command/TestQuickStartCommand.java
+++ 
b/pinot-tools/src/test/java/org/apache/pinot/tools/admin/command/TestQuickStartCommand.java
@@ -113,8 +113,8 @@ public class TestQuickStartCommand {
         TimestampIndexQuickstart.class);
   }
 
-  private Class<? extends QuickStartBase> quickStartClassFor(String offline)
+  private Class<? extends QuickStartBase> quickStartClassFor(String type)
       throws InvocationTargetException, NoSuchMethodException, 
InstantiationException, IllegalAccessException {
-    return QuickStartCommand.selectQuickStart(offline).getClass();
+    return new QuickStartCommand().selectQuickStart(type).getClass();
   }
 }


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

Reply via email to