Jackie-Jiang commented on a change in pull request #7255:
URL: https://github.com/apache/pinot/pull/7255#discussion_r686334111



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/metadata/segment/SegmentZKMetadata.java
##########
@@ -36,209 +34,291 @@
 import org.slf4j.LoggerFactory;
 
 
-public abstract class SegmentZKMetadata implements ZKMetadata {
+public class SegmentZKMetadata implements ZKMetadata {
   private static final Logger LOGGER = 
LoggerFactory.getLogger(SegmentZKMetadata.class);
+  private static final String NULL = "null";
 
-  protected static final String NULL = "null";
-
-  private String _segmentName;
-  private SegmentType _segmentType;
-  private long _startTime = -1;
-  private long _endTime = -1;
-  private TimeUnit _timeUnit;
-  private String _indexVersion;
-  private long _totalDocs = -1;
-  private long _crc = -1;
-  private long _creationTime = -1;
-  private SegmentPartitionMetadata _partitionMetadata;
-  private long _segmentUploadStartTime = -1;
-  private String _crypterName;
-  private Map<String, String> _customMap;
+  private final ZNRecord _znRecord;
+  private Map<String, String> _simpleFields;
 
-  @Deprecated
-  private String _rawTableName;
-
-  public SegmentZKMetadata() {
+  public SegmentZKMetadata(String segmentName) {
+    _znRecord = new ZNRecord(segmentName);
+    _simpleFields = _znRecord.getSimpleFields();
+    // TODO: Remove this field after releasing 0.9.0

Review comment:
       I think this comment implies that the field is deprecated and we want to 
keep backward-compatibility




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to