9aman commented on code in PR #14920:
URL: https://github.com/apache/pinot/pull/14920#discussion_r1938845451
##########
pinot-common/src/main/java/org/apache/pinot/common/utils/FileUploadDownloadClient.java:
##########
@@ -1274,6 +1275,47 @@ public File downloadUntarFileStreamed(URI uri, File
dest, AuthProvider authProvi
httpHeaders, maxStreamRateInByte);
}
+ /**
+ * Invokes the server's reIngestSegment API via a POST request with JSON
payload,
+ * using Simple HTTP APIs.
+ *
+ * POST http://[serverURL]/reIngestSegment
+ * {
+ * "tableNameWithType": [tableName],
+ * "segmentName": [segmentName]
+ * }
+ */
+ public void triggerReIngestion(String serverHostPort, String
tableNameWithType, String segmentName)
+ throws IOException, URISyntaxException, HttpErrorStatusException {
+ String scheme = HTTP;
+ if (serverHostPort.contains(HTTPS)) {
+ scheme = HTTPS;
+ serverHostPort = serverHostPort.replace(HTTPS + "://", "");
+ } else if (serverHostPort.contains(HTTP)) {
Review Comment:
Nit: Is there a possibility that the `serverHostPort` doesn't contain the
protocol ?
--
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]