kishoreg commented on code in PR #9379:
URL: https://github.com/apache/pinot/pull/9379#discussion_r967874234
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/routing/WorkerManager.java:
##########
@@ -58,11 +60,37 @@ public WorkerManager(String hostName, int port,
RoutingManager routingManager) {
public void assignWorkerToStage(int stageId, StageMetadata stageMetadata) {
List<String> scannedTables = stageMetadata.getScannedTables();
- if (scannedTables.size() == 1) { // table scan stage, need to attach
server as well as segment info.
- RoutingTable routingTable = getRoutingTable(scannedTables.get(0));
- Map<ServerInstance, List<String>> serverInstanceToSegmentsMap =
routingTable.getServerInstanceToSegmentsMap();
+ if (scannedTables.size() == 1) {
+ // table scan stage, need to attach server as well as segment info for
each physical table type.
+ Map<String, RoutingTable> routingTableMap =
getRoutingTable(scannedTables.get(0));
Review Comment:
is scannedtable referring to logical table name or tablename with type.. can
we name variable to indicate that?
##########
pinot-common/src/main/proto/worker.proto:
##########
@@ -68,7 +68,13 @@ message StagePlan {
message StageMetadata {
repeated string instances = 1;
repeated string dataSources = 2;
- map<string, SegmentList> instanceToSegmentList = 3;
+ map<string, SegmentMap> instanceToSegmentMap = 3;
Review Comment:
we can add another map<string,SegmentList> right? one for real time and one
for offline.. thought your approah is more flexible if we add more tabletype
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/routing/WorkerManager.java:
##########
@@ -86,13 +114,23 @@ private static List<ServerInstance>
filterServers(Collection<ServerInstance> ser
return serverInstances;
}
- private RoutingTable getRoutingTable(String tableName) {
+ private Map<String, RoutingTable> getRoutingTable(String tableName) {
Review Comment:
tableName -> tableNameWithType right?
--
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]