This is an automated email from the ASF dual-hosted git repository.
siddteotia pushed a commit to branch multi_stage_query_engine
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/multi_stage_query_engine by
this push:
new c9bebeb504 [hotfix] fix server discovery (#8664)
c9bebeb504 is described below
commit c9bebeb504b306c3c9e348b2e958f9a690414f6c
Author: Rong Rong <[email protected]>
AuthorDate: Mon May 9 20:20:03 2022 -0700
[hotfix] fix server discovery (#8664)
Co-authored-by: Rong Rong <[email protected]>
---
.../main/java/org/apache/pinot/query/routing/WorkerInstance.java | 2 +-
.../test/java/org/apache/pinot/query/QueryEnvironmentTest.java | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git
a/pinot-query-planner/src/main/java/org/apache/pinot/query/routing/WorkerInstance.java
b/pinot-query-planner/src/main/java/org/apache/pinot/query/routing/WorkerInstance.java
index 7ad6ee0b9c..c7e6bcfbd5 100644
---
a/pinot-query-planner/src/main/java/org/apache/pinot/query/routing/WorkerInstance.java
+++
b/pinot-query-planner/src/main/java/org/apache/pinot/query/routing/WorkerInstance.java
@@ -41,7 +41,7 @@ public class WorkerInstance extends ServerInstance {
}
private static InstanceConfig toInstanceConfig(String hostname, int
serverPort, int mailboxPort) {
- String server = String.format("%s_%d", hostname, serverPort);
+ String server = String.format("%s%s_%d",
CommonConstants.Helix.PREFIX_OF_SERVER_INSTANCE, hostname, serverPort);
InstanceConfig instanceConfig = InstanceConfig.toInstanceConfig(server);
ZNRecord znRecord = instanceConfig.getRecord();
Map<String, String> simpleFields = znRecord.getSimpleFields();
diff --git
a/pinot-query-planner/src/test/java/org/apache/pinot/query/QueryEnvironmentTest.java
b/pinot-query-planner/src/test/java/org/apache/pinot/query/QueryEnvironmentTest.java
index d63c5c55c7..9f4778743b 100644
---
a/pinot-query-planner/src/test/java/org/apache/pinot/query/QueryEnvironmentTest.java
+++
b/pinot-query-planner/src/test/java/org/apache/pinot/query/QueryEnvironmentTest.java
@@ -68,18 +68,18 @@ public class QueryEnvironmentTest extends
QueryEnvironmentTestBase {
// table scan stages; for tableA it should have 2 hosts, for tableB it
should have only 1
Assert.assertEquals(
e.getValue().getServerInstances().stream().map(ServerInstance::toString).collect(Collectors.toList()),
- tables.get(0).equals("a") ? ImmutableList.of("localhost_1",
"localhost_2")
- : ImmutableList.of("localhost_1"));
+ tables.get(0).equals("a") ? ImmutableList.of("Server_localhost_1",
"Server_localhost_2")
+ : ImmutableList.of("Server_localhost_1"));
} else if (!PlannerUtils.isRootStage(e.getKey())) {
// join stage should have both servers used.
Assert.assertEquals(
e.getValue().getServerInstances().stream().map(ServerInstance::toString).collect(Collectors.toList()),
- ImmutableList.of("localhost_1", "localhost_2"));
+ ImmutableList.of("Server_localhost_1", "Server_localhost_2"));
} else {
// reduce stage should have the reducer instance.
Assert.assertEquals(
e.getValue().getServerInstances().stream().map(ServerInstance::toString).collect(Collectors.toList()),
- ImmutableList.of("localhost_3"));
+ ImmutableList.of("Server_localhost_3"));
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]