rohityadav1993 commented on code in PR #13107:
URL: https://github.com/apache/pinot/pull/13107#discussion_r1604457365


##########
pinot-common/src/main/java/org/apache/pinot/common/metadata/segment/SegmentPartitionMetadata.java:
##########
@@ -48,6 +53,21 @@ public SegmentPartitionMetadata(
       @Nonnull @JsonProperty("columnPartitionMap") Map<String, 
ColumnPartitionMetadata> columnPartitionMap) {
     Preconditions.checkNotNull(columnPartitionMap);
     _columnPartitionMap = columnPartitionMap;
+    _uploadedSegmentPartitionId = -1;
+  }
+
+  /**
+   * Constructor for the class.
+   *
+   * @param columnPartitionMap Column name to ColumnPartitionMetadata map.
+   */
+  @JsonCreator
+  public SegmentPartitionMetadata(
+      @Nullable @JsonProperty("columnPartitionMap") Map<String, 
ColumnPartitionMetadata> columnPartitionMap,
+      @Nullable @JsonProperty(value = "uploadedSegmentPartitionId", 
defaultValue = "-1")

Review Comment:
   > While processing segments not in LLC name pattern, segments added first 
are favored, but we can not control which segments get processed first next 
time when server restarts.
   
   We have segment status as `UPLOADED`, we can consider comparing 
create/upload time to do resolution.
   
   > uploaded_{tableName}__{partitionId}__{creationTime}
   
   Do we enforce naming conventions? I only see `LLCSegmentName`. I can add one 
for uploaded segment name for realtime table segment but wasn't prefering this 
approach if this is not something strictly enforced.
   
   Additionally, we will have to add a `SegmentNameGenerator` implementation so 
that the user workload generating and uploading segments can create these 
segments.



-- 
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-unsubscr...@pinot.apache.org

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


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

Reply via email to