You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by tm...@apache.org on 2019/09/27 17:17:51 UTC

[impala] branch master updated: Fix --webserver_interface for remote cluster tests

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5645c46  Fix --webserver_interface for remote cluster tests
5645c46 is described below

commit 5645c4682a5efb8b7f9af32a46084af602e2e928
Author: Thomas Tauber-Marshall <tm...@cloudera.com>
AuthorDate: Thu Sep 26 11:59:00 2019 -0700

    Fix --webserver_interface for remote cluster tests
    
    IMPALA-4057 updated our test infrastructure to allow setting the flag
    --webserver_interface. In some cases, that patch used a default value
    of '127.0.0.1', which works for running the tests against the local
    minicluster but fails when the tests are run against a remote cluster.
    
    This patch fixes this by removing the use of '127.0.0.1' and replacing
    it with the specified hostname.
    
    Change-Id: Ic5b8adefe4e2bb8f7013d9af70fd3e5dfd7ee18f
    Reviewed-on: http://gerrit.cloudera.org:8080/14313
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
    Reviewed-by: Joe McDonnell <jo...@cloudera.com>
---
 tests/common/impala_service.py    | 5 ++++-
 tests/common/impala_test_suite.py | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/common/impala_service.py b/tests/common/impala_service.py
index c546a15..fb6beb2 100644
--- a/tests/common/impala_service.py
+++ b/tests/common/impala_service.py
@@ -46,6 +46,9 @@ class BaseImpalaService(object):
       webserver_certificate_file):
     self.hostname = hostname
     self.webserver_interface = webserver_interface
+    if webserver_interface == "":
+      # If no webserver interface was specified, just use the hostname.
+      self.webserver_interface = hostname
     self.webserver_port = webserver_port
     self.webserver_certificate_file = webserver_certificate_file
 
@@ -158,7 +161,7 @@ class BaseImpalaService(object):
 # Allows for interacting with an Impalad instance to perform operations such as creating
 # new connections or accessing the debug webpage.
 class ImpaladService(BaseImpalaService):
-  def __init__(self, hostname, webserver_interface="127.0.0.1", webserver_port=25000,
+  def __init__(self, hostname, webserver_interface="", webserver_port=25000,
       beeswax_port=21000, be_port=22000, hs2_port=21050, hs2_http_port=28000,
       webserver_certificate_file=""):
     super(ImpaladService, self).__init__(
diff --git a/tests/common/impala_test_suite.py b/tests/common/impala_test_suite.py
index 64c0911..d23901e 100644
--- a/tests/common/impala_test_suite.py
+++ b/tests/common/impala_test_suite.py
@@ -243,8 +243,10 @@ class ImpalaTestSuite(BaseTestSuite):
 
   @classmethod
   def create_impala_service(
-      cls, host_port=IMPALAD, webserver_interface="127.0.0.1", webserver_port=25000):
+      cls, host_port=IMPALAD, webserver_interface="", webserver_port=25000):
     host, port = host_port.split(':')
+    if webserver_interface == "":
+      webserver_interface = host
     return ImpaladService(host, beeswax_port=port,
         webserver_interface=webserver_interface, webserver_port=webserver_port)