This is an automated email from the ASF dual-hosted git repository.

asdf2014 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new fbc12218375 DartTableInputSpecSlicer: Fix for TLS workers. (#17224)
fbc12218375 is described below

commit fbc1221837561f71eaa14e688b6cccbc562943a7
Author: Gian Merlino <gianmerl...@gmail.com>
AuthorDate: Wed Oct 2 20:01:11 2024 -0700

    DartTableInputSpecSlicer: Fix for TLS workers. (#17224)
    
    We should use getHost(), which returns TLS if configured or plaintext
    otherwise. getHostAndPort() returns plaintext only.
---
 .../apache/druid/msq/dart/controller/DartTableInputSpecSlicer.java  | 2 +-
 .../druid/msq/dart/controller/DartTableInputSpecSlicerTest.java     | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/dart/controller/DartTableInputSpecSlicer.java
 
b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/dart/controller/DartTableInputSpecSlicer.java
index 52ecccbc152..7ce3fe851f4 100644
--- 
a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/dart/controller/DartTableInputSpecSlicer.java
+++ 
b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/dart/controller/DartTableInputSpecSlicer.java
@@ -168,7 +168,7 @@ public class DartTableInputSpecSlicer implements 
InputSpecSlicer
       return UNKNOWN;
     }
 
-    final String serverHostAndPort = server.getServer().getHostAndPort();
+    final String serverHostAndPort = server.getServer().getHost();
     final int workerNumber = workerIdToNumber.getInt(serverHostAndPort);
 
     // The worker number may be UNKNOWN in a race condition, such as the set 
of Historicals changing while
diff --git 
a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/dart/controller/DartTableInputSpecSlicerTest.java
 
b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/dart/controller/DartTableInputSpecSlicerTest.java
index be67fe860ab..4c3c99816c0 100644
--- 
a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/dart/controller/DartTableInputSpecSlicerTest.java
+++ 
b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/dart/controller/DartTableInputSpecSlicerTest.java
@@ -76,8 +76,8 @@ public class DartTableInputSpecSlicerTest extends 
InitializedNullHandlingTest
    * This makes tests deterministic.
    */
   private static final List<DruidServerMetadata> SERVERS = ImmutableList.of(
-      new DruidServerMetadata("no", "localhost:1001", null, 1, 
ServerType.HISTORICAL, "__default", 2),
-      new DruidServerMetadata("no", "localhost:1002", null, 1, 
ServerType.HISTORICAL, "__default", 1),
+      new DruidServerMetadata("no", "localhost:1001", null, 1, 
ServerType.HISTORICAL, "__default", 2), // plaintext
+      new DruidServerMetadata("no", null, "localhost:1002", 1, 
ServerType.HISTORICAL, "__default", 1), // TLS
       new DruidServerMetadata("no", "localhost:1003", null, 1, 
ServerType.REALTIME, "__default", 0)
   );
 
@@ -86,7 +86,7 @@ public class DartTableInputSpecSlicerTest extends 
InitializedNullHandlingTest
    */
   private static final List<String> WORKER_IDS =
       SERVERS.stream()
-             .map(server -> new WorkerId("http", server.getHostAndPort(), 
QUERY_ID).toString())
+             .map(server -> new WorkerId("http", server.getHost(), 
QUERY_ID).toString())
              .collect(Collectors.toList());
 
   /**


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to