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 04:02:24 UTC

[incubator-pinot] branch default_column created (now a68fe47)

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

jackie pushed a change to branch default_column
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.


      at a68fe47  Always enable default column feature, remove the configuration

This branch includes the following new commits:

     new a68fe47  Always enable default column feature, remove the configuration

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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


[incubator-pinot] 01/01: Always enable default column feature, remove the configuration

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a68fe47869ac0e052b24873e01a5edee1eb57721
Author: Jackie (Xiaotian) Jiang <xa...@linkedin.com>
AuthorDate: Wed Apr 3 20:56:19 2019 -0700

    Always enable default column feature, remove the configuration
    
    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 --------
 .../integration/realtime/RealtimeTableDataManagerTest.java   |  2 +-
 6 files changed, 5 insertions(+), 22 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);
   }
diff --git a/pinot-server/src/test/java/org/apache/pinot/server/integration/realtime/RealtimeTableDataManagerTest.java b/pinot-server/src/test/java/org/apache/pinot/server/integration/realtime/RealtimeTableDataManagerTest.java
index 76501ce..c6a0765 100644
--- a/pinot-server/src/test/java/org/apache/pinot/server/integration/realtime/RealtimeTableDataManagerTest.java
+++ b/pinot-server/src/test/java/org/apache/pinot/server/integration/realtime/RealtimeTableDataManagerTest.java
@@ -59,6 +59,7 @@ import org.apache.pinot.segments.v1.creator.SegmentTestUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
 
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -127,7 +128,6 @@ public class RealtimeTableDataManagerTest {
     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;


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