klsince commented on code in PR #13107:
URL: https://github.com/apache/pinot/pull/13107#discussion_r1604127022
##########
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:
I see you have proposed in description that we can use a new naming pattern
for uploaded segment. Similarly, I'd propose something a bit simpler:
`uploaded_{tableName}__{partitionId}__{creationTime}`, with 3 fields as
separated by `__` (double underscore), in order to provide {partitionId} info
for segment assignment and help break tie with {creationTime}.
The `uploaded_` prefix can be anything or none, but better to have it to
lookup uploaded segments easily, e.g. MergeRollup task names the segments it
generates with a prefix `merged_` when uploading them to the table.
--
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]