You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Jackie-Jiang (via GitHub)" <gi...@apache.org> on 2023/09/21 02:18:50 UTC

[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #11590: Remove/Deprecate HLC handling code

Jackie-Jiang commented on code in PR #11590:
URL: https://github.com/apache/pinot/pull/11590#discussion_r1332365316


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/SegmentName.java:
##########
@@ -18,80 +18,16 @@
  */
 package org.apache.pinot.common.utils;
 
-public abstract class SegmentName {
-  public static final String SEPARATOR = "__";
-  public static final String REALTIME_SUFFIX = "_REALTIME";
-  public static final int REALTIME_SUFFIX_LENGTH = REALTIME_SUFFIX.length();
-
-  public enum RealtimeSegmentType {
-    UNSUPPORTED, HLC_LONG, HLC_SHORT, LLC,
-  }
-
-  public static RealtimeSegmentType getSegmentType(String segmentName) {
-    if (isHighLevelConsumerSegmentName(segmentName)) {
-      HLCSegmentName segName = new HLCSegmentName(segmentName);
-
-      if (segName.isOldStyleNaming()) {
-        return RealtimeSegmentType.HLC_LONG;
-      } else {
-        return RealtimeSegmentType.HLC_SHORT;
-      }
-    }
-
-    if (isLowLevelConsumerSegmentName(segmentName)) {
-      return RealtimeSegmentType.LLC;
-    }
-
-    return RealtimeSegmentType.UNSUPPORTED;
-  }
-
-  protected boolean isValidComponentName(String string) {
-    return !string.contains(SEPARATOR);
-  }
-
-  public abstract String getTableName();
-
-  public abstract String getSequenceNumberStr();
-
-  public abstract int getSequenceNumber();
-
-  public abstract String getSegmentName();
-
-  public abstract RealtimeSegmentType getSegmentType();
-
-  public String getGroupId() {
-    throw new RuntimeException("No groupId in " + getSegmentName());
-  }
-
-  public int getPartitionGroupId() {
-    throw new RuntimeException("No partitionGroupId in " + getSegmentName());
-  }
-
-  public String getPartitionRange() {
-    throw new RuntimeException("No partitionRange in " + getSegmentName());
-  }
-
-  public static boolean isHighLevelConsumerSegmentName(String segmentName) {
-    int numSeparators = getNumSeparators(segmentName);
-    return numSeparators == 2 || numSeparators == 4;
+@Deprecated
+public class SegmentName {

Review Comment:
   Kept `SegmentName` and `PartitionLevelStreamConfig` for compatibility. Will remove in next release



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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