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/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new ce419d2  Allow reloading consuming segment by default (#7078)
ce419d2 is described below

commit ce419d223385ec5bbca177d8f6b0daaa29301ab0
Author: Xiaotian (Jackie) Jiang <17555551+jackie-ji...@users.noreply.github.com>
AuthorDate: Mon Jun 21 11:29:02 2021 -0700

    Allow reloading consuming segment by default (#7078)
    
    Since the feature has been tested and stabilized, set the default value for 
reloading consuming segment flag 
`pinot.server.instance.reload.consumingSegment` to `true` by default.
---
 .../integration/tests/HybridClusterIntegrationTest.java     | 12 +++++-------
 .../tests/LLCRealtimeClusterIntegrationTest.java            |  5 ++---
 .../starter/helix/DefaultHelixStarterServerConfig.java      |  2 --
 .../java/org/apache/pinot/spi/utils/CommonConstants.java    | 13 +++++++------
 4 files changed, 14 insertions(+), 18 deletions(-)

diff --git 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/HybridClusterIntegrationTest.java
 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/HybridClusterIntegrationTest.java
index 354988b..09d21e3 100644
--- 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/HybridClusterIntegrationTest.java
+++ 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/HybridClusterIntegrationTest.java
@@ -30,7 +30,6 @@ 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.JsonUtils;
 import org.apache.pinot.spi.utils.builder.TableNameBuilder;
 import org.apache.pinot.util.TestUtils;
@@ -61,7 +60,6 @@ public class HybridClusterIntegrationTest extends 
BaseClusterIntegrationTestSet
 
   @Override
   protected void overrideServerConf(PinotConfiguration configuration) {
-    
configuration.setProperty(CommonConstants.Server.CONFIG_OF_INSTANCE_RELOAD_CONSUMING_SEGMENT,
 true);
   }
 
   @BeforeClass
@@ -125,8 +123,8 @@ public class HybridClusterIntegrationTest extends 
BaseClusterIntegrationTestSet
   public void testSegmentListApi()
       throws Exception {
     {
-      String jsonOutputStr = sendGetRequest(_controllerRequestURLBuilder.
-          forSegmentListAPIWithTableType(getTableName(), 
TableType.OFFLINE.toString()));
+      String jsonOutputStr = sendGetRequest(
+          
_controllerRequestURLBuilder.forSegmentListAPIWithTableType(getTableName(), 
TableType.OFFLINE.toString()));
       JsonNode array = JsonUtils.stringToJsonNode(jsonOutputStr);
       // There should be one element in the array
       JsonNode element = array.get(0);
@@ -134,8 +132,8 @@ public class HybridClusterIntegrationTest extends 
BaseClusterIntegrationTestSet
       Assert.assertEquals(segments.size(), 8);
     }
     {
-      String jsonOutputStr = sendGetRequest(_controllerRequestURLBuilder.
-          forSegmentListAPIWithTableType(getTableName(), 
TableType.REALTIME.toString()));
+      String jsonOutputStr = sendGetRequest(
+          
_controllerRequestURLBuilder.forSegmentListAPIWithTableType(getTableName(), 
TableType.REALTIME.toString()));
       JsonNode array = JsonUtils.stringToJsonNode(jsonOutputStr);
       // There should be one element in the array
       JsonNode element = array.get(0);
@@ -184,7 +182,7 @@ public class HybridClusterIntegrationTest extends 
BaseClusterIntegrationTestSet
 
   @Test
   public void testBrokerDebugRoutingTableSQL()
-          throws Exception {
+      throws Exception {
     String tableName = getTableName();
     String offlineTableName = 
TableNameBuilder.OFFLINE.tableNameWithType(tableName);
     String realtimeTableName = 
TableNameBuilder.REALTIME.tableNameWithType(tableName);
diff --git 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/LLCRealtimeClusterIntegrationTest.java
 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/LLCRealtimeClusterIntegrationTest.java
index 7029607..6c238c0 100644
--- 
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/LLCRealtimeClusterIntegrationTest.java
+++ 
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/LLCRealtimeClusterIntegrationTest.java
@@ -75,10 +75,10 @@ public class LLCRealtimeClusterIntegrationTest extends 
RealtimeClusterIntegratio
   @Override
   public void startController() {
     Map<String, Object> properties = getDefaultControllerConfiguration();
-    
+
     properties.put(ControllerConf.ALLOW_HLC_TABLES, false);
     properties.put(ControllerConf.ENABLE_SPLIT_COMMIT, _enableSplitCommit);
-    
+
     startController(properties);
     
enableResourceConfigForLeadControllerResource(_enableLeadControllerResource);
   }
@@ -94,7 +94,6 @@ public class LLCRealtimeClusterIntegrationTest extends 
RealtimeClusterIntegratio
       
configuration.setProperty(CommonConstants.Server.CONFIG_OF_ENABLE_SPLIT_COMMIT, 
true);
       
configuration.setProperty(CommonConstants.Server.CONFIG_OF_ENABLE_COMMIT_END_WITH_METADATA,
 true);
     }
-    
configuration.setProperty(CommonConstants.Server.CONFIG_OF_INSTANCE_RELOAD_CONSUMING_SEGMENT,
 true);
   }
 
   @BeforeClass
diff --git 
a/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/DefaultHelixStarterServerConfig.java
 
b/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/DefaultHelixStarterServerConfig.java
index 7d6bdda..1abb09f 100644
--- 
a/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/DefaultHelixStarterServerConfig.java
+++ 
b/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/DefaultHelixStarterServerConfig.java
@@ -51,8 +51,6 @@ public class DefaultHelixStarterServerConfig {
         .addProperty(CommonConstants.Server.CONFIG_OF_INSTANCE_READ_MODE, 
CommonConstants.Server.DEFAULT_READ_MODE);
     
serverConf.addProperty(CommonConstants.Server.CONFIG_OF_INSTANCE_DATA_MANAGER_CLASS,
         CommonConstants.Server.DEFAULT_DATA_MANAGER_CLASS);
-    
serverConf.addProperty(CommonConstants.Server.CONFIG_OF_INSTANCE_RELOAD_CONSUMING_SEGMENT,
-        CommonConstants.Server.DEFAULT_RELOAD_CONSUMING_SEGMENT);
 
     // query executor parameters
     
serverConf.addProperty(CommonConstants.Server.CONFIG_OF_QUERY_EXECUTOR_CLASS,
diff --git 
a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java 
b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
index 478d555..65ff65f 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
@@ -37,8 +37,7 @@ public class CommonConstants {
    * The state of the consumer for a given segment
    */
   public enum ConsumerState {
-    CONSUMING,
-    NOT_CONSUMING // In error state
+    CONSUMING, NOT_CONSUMING // In error state
   }
 
   public static class Table {
@@ -253,7 +252,8 @@ public class CommonConstants {
         "pinot.server.instance.realtime.alloc.offheap.direct";
     public static final String PREFIX_OF_CONFIG_OF_PINOT_FS_FACTORY = 
"pinot.server.storage.factory";
     public static final String PREFIX_OF_CONFIG_OF_PINOT_CRYPTER = 
"pinot.server.crypter";
-    public static final String CONFIG_OF_VALUE_PRUNER_IN_PREDICATE_THRESHOLD = 
"pinot.server.query.executor.pruner.columnvaluesegmentpruner.inpredicate.threshold";
+    public static final String CONFIG_OF_VALUE_PRUNER_IN_PREDICATE_THRESHOLD =
+        
"pinot.server.query.executor.pruner.columnvaluesegmentpruner.inpredicate.threshold";
     public static final int DEFAULT_VALUE_PRUNER_IN_PREDICATE_THRESHOLD = 10;
 
     /**
@@ -273,8 +273,8 @@ public class CommonConstants {
     public static final int 
DEFAULT_STARTUP_REALTIME_CONSUMPTION_CATCHUP_WAIT_MS = 0;
 
     public static final String DEFAULT_READ_MODE = "mmap";
-    // Whether to reload consuming segment on scheme update. Will change 
default behavior to true when this feature is stabilized
-    public static final boolean DEFAULT_RELOAD_CONSUMING_SEGMENT = false;
+    // Whether to reload consuming segment on scheme update
+    public static final boolean DEFAULT_RELOAD_CONSUMING_SEGMENT = true;
     public static final String DEFAULT_INSTANCE_BASE_DIR =
         System.getProperty("java.io.tmpdir") + File.separator + "PinotServer";
     public static final String DEFAULT_INSTANCE_DATA_DIR = 
DEFAULT_INSTANCE_BASE_DIR + File.separator + "index";
@@ -379,7 +379,8 @@ public class CommonConstants {
     public static final int DEFAULT_CURRENT_DATA_TABLE_VERSION = 3;
 
     // Environment Provider Configs
-    public static final String 
PREFIX_OF_CONFIG_OF_ENVIRONMENT_PROVIDER_FACTORY = 
"pinot.server.environmentProvider.factory";
+    public static final String 
PREFIX_OF_CONFIG_OF_ENVIRONMENT_PROVIDER_FACTORY =
+        "pinot.server.environmentProvider.factory";
     public static final String ENVIRONMENT_PROVIDER_CLASS_NAME = 
"pinot.server.environmentProvider.className";
   }
 

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

Reply via email to