You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by jl...@apache.org on 2020/09/02 06:28:57 UTC

[incubator-pinot] branch add-port-to-swagger updated (23a2ca2 -> d364c14)

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

jlli pushed a change to branch add-port-to-swagger
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.


 discard 23a2ca2  Add port to swagger ui
     new d364c14  Add port to swagger ui

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (23a2ca2)
            \
             N -- N -- N   refs/heads/add-port-to-swagger (d364c14)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/pinot/controller/api/ControllerAdminApiApplication.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[incubator-pinot] 01/01: Add port to swagger ui

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlli pushed a commit to branch add-port-to-swagger
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit d364c1495b2fbb3c2c3ca8c303dfa89b4aeb4b24
Author: Jack Li(Analytics Engineering) <jl...@jlli-mn1.linkedin.biz>
AuthorDate: Tue Sep 1 23:27:13 2020 -0700

    Add port to swagger ui
---
 .../pinot/controller/api/ControllerAdminApiApplication.java       | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/api/ControllerAdminApiApplication.java b/pinot-controller/src/main/java/org/apache/pinot/controller/api/ControllerAdminApiApplication.java
index 1684868..2d1d335 100644
--- a/pinot-controller/src/main/java/org/apache/pinot/controller/api/ControllerAdminApiApplication.java
+++ b/pinot-controller/src/main/java/org/apache/pinot/controller/api/ControllerAdminApiApplication.java
@@ -24,6 +24,7 @@ import java.net.URI;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.net.UnknownHostException;
+import java.util.Collection;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -152,7 +153,12 @@ public class ControllerAdminApiApplication extends ResourceConfig {
     beanConfig.setResourcePackage(RESOURCE_PACKAGE);
     beanConfig.setScan(true);
     try {
-      beanConfig.setHost(InetAddress.getLocalHost().getHostName());
+      Collection<NetworkListener> listeners = httpServer.getListeners();
+      if (listeners.size() > 0) {
+        // fetch the port from the first listener which uses http
+        int port = listeners.iterator().next().getPort();
+        beanConfig.setHost(InetAddress.getLocalHost().getHostName() + ":" + port);
+      }
     } catch (UnknownHostException e) {
       throw new RuntimeException("Cannot get localhost name");
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org