This is an automated email from the ASF dual-hosted git repository.
ankitsultana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new abaddd9447 Allow reload for UploadedRealtimeSegmentName segments
(#14494)
abaddd9447 is described below
commit abaddd9447a212095a175e3765dd48aa9df2f42c
Author: Pratik Tibrewal <[email protected]>
AuthorDate: Fri Nov 22 00:14:26 2024 +0530
Allow reload for UploadedRealtimeSegmentName segments (#14494)
---
.../pinot/controller/api/resources/PinotSegmentRestletResource.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java
index 9422fc64a6..b114aa8844 100644
---
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java
+++
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java
@@ -74,6 +74,7 @@ import
org.apache.pinot.common.restlet.resources.TableSegmentsReloadCheckRespons
import org.apache.pinot.common.utils.DatabaseUtils;
import org.apache.pinot.common.utils.LLCSegmentName;
import org.apache.pinot.common.utils.URIUtils;
+import org.apache.pinot.common.utils.UploadedRealtimeSegmentName;
import org.apache.pinot.controller.ControllerConf;
import org.apache.pinot.controller.api.access.AccessType;
import org.apache.pinot.controller.api.access.Authenticate;
@@ -425,13 +426,14 @@ public class PinotSegmentRestletResource {
/**
* Helper method to find the existing table based on the given table name
(with or without type suffix) and segment
* name.
- * TODO: Real-time table might also contain uploaded segments (not with LLC
name), which is not handled here.
*/
private String getExistingTable(String tableName, String segmentName) {
TableType tableType =
TableNameBuilder.getTableTypeFromTableName(tableName);
if (tableType == null) {
// Derive table type from segment name if the given table name doesn't
have type suffix
- tableType = LLCSegmentName.isLLCSegment(segmentName) ?
TableType.REALTIME : TableType.OFFLINE;
+ tableType = LLCSegmentName.isLLCSegment(segmentName) ? TableType.REALTIME
+ :
(UploadedRealtimeSegmentName.isUploadedRealtimeSegmentName(segmentName) ?
TableType.REALTIME
+ : TableType.OFFLINE);
}
return
ResourceUtils.getExistingTableNamesWithType(_pinotHelixResourceManager,
tableName, tableType, LOGGER).get(0);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]