atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject atlas git commit: ATLAS-2087: Fix Unit test failures introduced by previous commit
Date Wed, 30 Aug 2017 23:22:21 GMT
Repository: atlas
Updated Branches:
  refs/heads/master 68f66e92a -> ef300f15a


ATLAS-2087: Fix Unit test failures introduced by previous commit

Signed-off-by: Sarath Subramanian <ssubramanian@hortonworks.com>


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/ef300f15
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/ef300f15
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/ef300f15

Branch: refs/heads/master
Commit: ef300f15a500948b983b8a49c5828e5f39dcd35d
Parents: 68f66e9
Author: Richard Ding <sding@us.ibm.com>
Authored: Wed Aug 30 16:22:02 2017 -0700
Committer: Sarath Subramanian <ssubramanian@hortonworks.com>
Committed: Wed Aug 30 16:22:02 2017 -0700

----------------------------------------------------------------------
 distro/src/bin/atlas_config.py                         | 13 ++++++++++++-
 .../apache/atlas/web/service/SecureEmbeddedServer.java |  3 ++-
 2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/ef300f15/distro/src/bin/atlas_config.py
----------------------------------------------------------------------
diff --git a/distro/src/bin/atlas_config.py b/distro/src/bin/atlas_config.py
index ada5743..4d13b30 100755
--- a/distro/src/bin/atlas_config.py
+++ b/distro/src/bin/atlas_config.py
@@ -71,6 +71,8 @@ ATLAS_HTTPS_PORT="atlas.server.https.port"
 DEFAULT_ATLAS_HTTP_PORT="21000"
 DEFAULT_ATLAS_HTTPS_PORT="21443"
 ATLAS_ENABLE_TLS="atlas.enableTLS"
+ATLAS_SERVER_BIND_ADDRESS="atlas.server.bind.address"
+DEFAULT_ATLAS_SERVER_HOST="localhost"
 
 DEBUG = False
 
@@ -464,14 +466,23 @@ def get_atlas_url_port(confdir):
     print "starting atlas on port %s" % port
     return port
 
+def get_atlas_url_host(confdir):
+    confdir = os.path.join(confdir, CONF_FILE)
+    host = getConfigWithDefault(confdir, ATLAS_SERVER_BIND_ADDRESS, DEFAULT_ATLAS_SERVER_HOST)
+    if (host == '0.0.0.0'):
+        host = DEFAULT_ATLAS_SERVER_HOST
+    print "starting atlas on host %s" % host
+    return host
+
 def wait_for_startup(confdir, wait):
     count = 0
+    host = get_atlas_url_host(confdir)
     port = get_atlas_url_port(confdir)
     while True:
         try:
             s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
             s.settimeout(1)
-            s.connect(('localhost', int(port)))
+            s.connect((host, int(port)))
             s.close()
             break
         except Exception as e:

http://git-wip-us.apache.org/repos/asf/atlas/blob/ef300f15/webapp/src/main/java/org/apache/atlas/web/service/SecureEmbeddedServer.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/service/SecureEmbeddedServer.java b/webapp/src/main/java/org/apache/atlas/web/service/SecureEmbeddedServer.java
index bd8ea1d..3a8bd9f 100755
--- a/webapp/src/main/java/org/apache/atlas/web/service/SecureEmbeddedServer.java
+++ b/webapp/src/main/java/org/apache/atlas/web/service/SecureEmbeddedServer.java
@@ -64,7 +64,8 @@ public class SecureEmbeddedServer extends EmbeddedServer {
         super(host, port, path);
     }
 
-    protected Connector getConnector(int port) throws IOException {
+    @Override
+    protected Connector getConnector(String host, int port) throws IOException {
         org.apache.commons.configuration.Configuration config = getConfiguration();
 
         SslContextFactory sslContextFactory = new SslContextFactory();


Mime
View raw message