You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/07/05 23:09:38 UTC

[GitHub] [pinot] walterddr commented on a diff in pull request #9006: Add Segment Lineage List API #9005

walterddr commented on code in PR #9006:
URL: https://github.com/apache/pinot/pull/9006#discussion_r914273106


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java:
##########
@@ -652,6 +652,29 @@ public Response endReplaceSegments(
     }
   }
 
+  @GET
+  @Path("segments/{tableName}/listSegmentLineage")
+  @Authenticate(AccessType.READ)
+  @Produces(MediaType.APPLICATION_JSON)
+  @ApiOperation(value = "List segment lineage", notes = "List segment lineage")
+  public Response listSegmentLineage(

Review Comment:
   could we add some test for this endpoint. you can checkout how other endpoints are tested under `PinotSegmentUploadDownloadRestletResourceTest` 



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -3274,6 +3274,15 @@ public void endReplaceSegments(String tableNameWithType, String segmentLineageEn
         tableNameWithType, segmentLineageEntryId);
   }
 
+  /**
+   * List the segment lineage
+   *
+   * @param tableNameWithType
+   */
+  public SegmentLineage listSegmentLineage(String tableNameWithType) {
+      return SegmentLineageAccessHelper.getSegmentLineage(_propertyStore, tableNameWithType);
+  }

Review Comment:
   i think @jtao15 already mentioned. it is better to return SegmentLineage. you are already doing it here. is it possible to you to update the PR description to show the accurate response screenshot. thanks. 



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