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


##########
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;

Review Comment:
   Good to define a constant that can be used at other places directly checking 
for `-1`, may be with a better name.
   
   ```
   public static final int NON_EXTERNAL_PARTITION_ID = -1;
   ```



##########
pinot-common/src/test/java/org/apache/pinot/common/utils/SegmentUtilsTest.java:
##########
@@ -35,4 +47,32 @@ public void testGetSegmentCreationTimeMs() {
     segmentZKMetadata.setPushTime(2000L);
     assertEquals(SegmentUtils.getSegmentCreationTimeMs(segmentZKMetadata), 
2000L);
   }
+
+  @Test
+  public void testGetUploadedRealtimeSegmentPartitionId() {

Review Comment:
   Good to add a UT that checks for 
`SegmentPartitionMetadata.getUploadedSegmentPartitionId` -1 when it is not 
externally partitioned. 



-- 
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