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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5dfefe7  Remove timeFieldSpec getter from 
HybridClusterIntegrationTestRunner (#5397)
5dfefe7 is described below

commit 5dfefe71210d1f799cd9d38dd9b7742635716612
Author: Neha Pawar <neha.pawa...@gmail.com>
AuthorDate: Fri May 15 20:24:19 2020 -0700

    Remove timeFieldSpec getter from HybridClusterIntegrationTestRunner (#5397)
---
 .../tests/HybridClusterIntegrationTestCommandLineRunner.java | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/HybridClusterIntegrationTestCommandLineRunner.java
 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/HybridClusterIntegrationTestCommandLineRunner.java
index 9df57ee..b3eec4f 100644
--- 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/HybridClusterIntegrationTestCommandLineRunner.java
+++ 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/HybridClusterIntegrationTestCommandLineRunner.java
@@ -39,7 +39,6 @@ import org.apache.pinot.common.segment.ReadMode;
 import org.apache.pinot.controller.ControllerConf;
 import org.apache.pinot.spi.config.table.TableConfig;
 import org.apache.pinot.spi.data.Schema;
-import org.apache.pinot.spi.data.TimeFieldSpec;
 import org.apache.pinot.spi.utils.JsonUtils;
 import org.apache.pinot.tools.query.comparison.QueryComparison;
 import org.apache.pinot.util.TestUtils;
@@ -89,14 +88,14 @@ public class HybridClusterIntegrationTestCommandLineRunner {
 
   public static void printUsage() {
     System.err.println(
-        "Usage: pinot-hybrid-cluster.sh [--llc] tableName schemaFile dataDir 
invertedIndexColumns sortedColumn");
+        "Usage: pinot-hybrid-cluster.sh [--llc] tableName schemaFile 
timeColumnName dataDir invertedIndexColumns sortedColumn");
     System.exit(1);
   }
 
   public static void main(String[] args)
       throws Exception {
     int numArgs = args.length;
-    if (!((numArgs == 5) || (numArgs == 6 && args[0].equals("--llc")))) {
+    if (!((numArgs == 6) || (numArgs == 7 && args[0].equals("--llc")))) {
       printUsage();
     }
 
@@ -111,6 +110,9 @@ public class HybridClusterIntegrationTestCommandLineRunner {
     CustomHybridClusterIntegrationTest._tableName = args[argIdx++];
     File schemaFile = new File(args[argIdx++]);
     CustomHybridClusterIntegrationTest._schema = Schema.fromFile(schemaFile);
+    String timeColumnName = args[argIdx++];
+    CustomHybridClusterIntegrationTest._timeColumnName =
+        
(CustomHybridClusterIntegrationTest._schema.getFieldSpecFor(timeColumnName) != 
null) ? timeColumnName : null;
     File dataDir = new File(args[argIdx++]);
     Preconditions.checkState(dataDir.isDirectory());
     CustomHybridClusterIntegrationTest._dataDir = dataDir;
@@ -179,6 +181,7 @@ public class HybridClusterIntegrationTestCommandLineRunner {
     private static boolean _useLlc = false;
     private static String _tableName;
     private static Schema _schema;
+    private static String _timeColumnName;
     private static File _dataDir;
     private static List<String> _invertedIndexColumns;
     private static String _sortedColumn;
@@ -231,8 +234,7 @@ public class HybridClusterIntegrationTestCommandLineRunner {
     @Nullable
     @Override
     protected String getTimeColumnName() {
-      TimeFieldSpec timeFieldSpec = _schema.getTimeFieldSpec();
-      return timeFieldSpec != null ? timeFieldSpec.getName() : null;
+      return _timeColumnName;
     }
 
     @Override


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

Reply via email to