You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2019/04/04 23:22:18 UTC

[incubator-pinot] branch master updated: Always enable default column feature, remove the configuration (#4074)

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 2d860d2  Always enable default column feature, remove the configuration (#4074)
2d860d2 is described below

commit 2d860d2f33d079f6dfdffe69b6bc5c99fddecdc8
Author: Xiaotian (Jackie) Jiang <17...@users.noreply.github.com>
AuthorDate: Thu Apr 4 16:22:13 2019 -0700

    Always enable default column feature, remove the configuration (#4074)
    
    The configuration is introduced to test the default column feature.
    Since it has been tested thoroughly for years, remove the
    configuration and always enable it.
---
 .../core/data/manager/config/InstanceDataManagerConfig.java  |  2 --
 .../pinot/core/segment/index/loader/IndexLoadingConfig.java  | 12 +++---------
 .../pinot/core/segment/index/loader/SegmentPreProcessor.java |  2 +-
 .../manager/realtime/LLRealtimeSegmentDataManagerTest.java   |  1 -
 .../server/starter/helix/HelixInstanceDataManagerConfig.java |  8 --------
 5 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/pinot-core/src/main/java/org/apache/pinot/core/data/manager/config/InstanceDataManagerConfig.java b/pinot-core/src/main/java/org/apache/pinot/core/data/manager/config/InstanceDataManagerConfig.java
index ba1896f..835de3c 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/data/manager/config/InstanceDataManagerConfig.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/data/manager/config/InstanceDataManagerConfig.java
@@ -41,8 +41,6 @@ public interface InstanceDataManagerConfig {
 
   String getAvgMultiValueCount();
 
-  boolean isEnableDefaultColumns();
-
   boolean isEnableSplitCommit();
 
   boolean isEnableSplitCommitEndWithMetadata();
diff --git a/pinot-core/src/main/java/org/apache/pinot/core/segment/index/loader/IndexLoadingConfig.java b/pinot-core/src/main/java/org/apache/pinot/core/segment/index/loader/IndexLoadingConfig.java
index 04f9beb..7560ec9 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/segment/index/loader/IndexLoadingConfig.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/segment/index/loader/IndexLoadingConfig.java
@@ -50,8 +50,6 @@ public class IndexLoadingConfig {
   private Set<String> _bloomFilterColumns = new HashSet<>();
 
   private SegmentVersion _segmentVersion;
-  // This value will remain true only when the empty constructor is invoked.
-  private boolean _enableDefaultColumns = true;
   private ColumnMinMaxValueGeneratorMode _columnMinMaxValueGeneratorMode = ColumnMinMaxValueGeneratorMode.DEFAULT_MODE;
   private int _realtimeAvgMultiValueCount = DEFAULT_REALTIME_AVG_MULTI_VALUE_COUNT;
   private boolean _enableSplitCommit;
@@ -125,8 +123,6 @@ public class IndexLoadingConfig {
       _segmentVersion = SegmentVersion.valueOf(instanceSegmentVersion.toLowerCase());
     }
 
-    _enableDefaultColumns = instanceDataManagerConfig.isEnableDefaultColumns();
-
     _enableSplitCommit = instanceDataManagerConfig.isEnableSplitCommit();
 
     _isRealtimeOffheapAllocation = instanceDataManagerConfig.isRealtimeOffHeapAllocation();
@@ -216,15 +212,13 @@ public class IndexLoadingConfig {
     _segmentVersion = segmentVersion;
   }
 
-  public boolean isEnableDefaultColumns() {
-    return _enableDefaultColumns;
-  }
-
   public boolean isEnableSplitCommit() {
     return _enableSplitCommit;
   }
 
-  public boolean isEnableSplitCommitEndWithMetadata() { return _enableSplitCommitEndWithMetadata; }
+  public boolean isEnableSplitCommitEndWithMetadata() {
+    return _enableSplitCommitEndWithMetadata;
+  }
 
   public boolean isRealtimeOffheapAllocation() {
     return _isRealtimeOffheapAllocation;
diff --git a/pinot-core/src/main/java/org/apache/pinot/core/segment/index/loader/SegmentPreProcessor.java b/pinot-core/src/main/java/org/apache/pinot/core/segment/index/loader/SegmentPreProcessor.java
index 2a12a2e..98a56f1 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/segment/index/loader/SegmentPreProcessor.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/segment/index/loader/SegmentPreProcessor.java
@@ -84,7 +84,7 @@ public class SegmentPreProcessor implements AutoCloseable {
 
     try (SegmentDirectory.Writer segmentWriter = _segmentDirectory.createWriter()) {
       // Update default columns according to the schema.
-      if (_indexLoadingConfig.isEnableDefaultColumns() && (_schema != null)) {
+      if (_schema != null) {
         DefaultColumnHandler defaultColumnHandler =
             DefaultColumnHandlerFactory.getDefaultColumnHandler(_indexDir, _schema, _segmentMetadata, segmentWriter);
         defaultColumnHandler.updateDefaultColumns();
diff --git a/pinot-core/src/test/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManagerTest.java b/pinot-core/src/test/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManagerTest.java
index e87a85a..ee2ce4a 100644
--- a/pinot-core/src/test/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManagerTest.java
+++ b/pinot-core/src/test/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManagerTest.java
@@ -654,7 +654,6 @@ public class LLRealtimeSegmentDataManagerTest {
       when(dataManagerConfig.getReadMode()).thenReturn(null);
       when(dataManagerConfig.getAvgMultiValueCount()).thenReturn(null);
       when(dataManagerConfig.getSegmentFormatVersion()).thenReturn(null);
-      when(dataManagerConfig.isEnableDefaultColumns()).thenReturn(false);
       when(dataManagerConfig.isEnableSplitCommit()).thenReturn(false);
       when(dataManagerConfig.isRealtimeOffHeapAllocation()).thenReturn(false);
       return dataManagerConfig;
diff --git a/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManagerConfig.java b/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManagerConfig.java
index 5439618..873845f 100644
--- a/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManagerConfig.java
+++ b/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManagerConfig.java
@@ -57,9 +57,6 @@ public class HelixInstanceDataManagerConfig implements InstanceDataManagerConfig
   // Key of the segment format this server can read
   public static final String SEGMENT_FORMAT_VERSION = "segment.format.version";
 
-  // Key of whether to enable default columns
-  private static final String ENABLE_DEFAULT_COLUMNS = "enable.default.columns";
-
   // Key of how many parallel realtime segments can be built.
   // A value of <= 0 indicates unlimited.
   // Unlimited parallel builds can cause high GC pauses during segment builds, causing
@@ -156,11 +153,6 @@ public class HelixInstanceDataManagerConfig implements InstanceDataManagerConfig
   }
 
   @Override
-  public boolean isEnableDefaultColumns() {
-    return _instanceDataManagerConfiguration.getBoolean(ENABLE_DEFAULT_COLUMNS, false);
-  }
-
-  @Override
   public boolean isEnableSplitCommit() {
     return _instanceDataManagerConfiguration.getBoolean(ENABLE_SPLIT_COMMIT, false);
   }


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