tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject tajo git commit: TAJO-2032: Change tajo.rest.service.port to be the general style in TAJO.
Date Fri, 15 Jan 2016 07:21:55 GMT
Repository: tajo
Updated Branches:
  refs/heads/branch-0.11.1 c906e59e5 -> fcf1ae1a1


TAJO-2032: Change tajo.rest.service.port to be the general style in TAJO.

Signed-off-by: Jihoon Son <jihoonson@apache.org>


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

Branch: refs/heads/branch-0.11.1
Commit: fcf1ae1a18ac5ca7df6795d99cb80d6f78569107
Parents: c906e59
Author: Byunghwa Yun <combine@combineads.co.kr>
Authored: Thu Jan 14 23:21:32 2016 -0800
Committer: Jihoon Son <jihoonson@apache.org>
Committed: Thu Jan 14 23:21:32 2016 -0800

----------------------------------------------------------------------
 CHANGES                                           |  3 +++
 .../java/org/apache/tajo/TajoTestingCluster.java  |  6 +++---
 .../main/java/org/apache/tajo/conf/TajoConf.java  | 18 +++++++++---------
 .../org/apache/tajo/ha/TestHAServiceHDFSImpl.java |  4 ++--
 .../tajo/ws/rs/resources/TestClusterResource.java |  5 +++--
 .../ws/rs/resources/TestDatabasesResource.java    |  5 +++--
 .../ws/rs/resources/TestFunctionsResource.java    |  6 ++++--
 .../tajo/ws/rs/resources/TestQueryResource.java   |  6 ++++--
 .../ws/rs/resources/TestQueryResultResource.java  |  5 +++--
 .../ws/rs/resources/TestSessionsResource.java     |  5 +++--
 .../tajo/ws/rs/resources/TestTablesResource.java  |  6 ++++--
 .../org/apache/tajo/ws/rs/TajoRestService.java    |  4 ++--
 .../tajo/ws/rs/netty/NettyRestServerFactory.java  |  2 +-
 13 files changed, 44 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 6c5f490..fee113d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,9 @@ Release 0.11.1 - unreleased
 
   IMPROVEMENT
 
+    TAJO-2032: Change tajo.rest.service.port to be the general style in TAJO.
+    (Byunghwa Yun via jihoon)
+
     TAJO-2040: Decrease the default size of max request for locality. (jinho)
 
     TAJO-1950: Query master uses too much memory during range shuffle. (jihoon)

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-cluster-tests/src/test/java/org/apache/tajo/TajoTestingCluster.java
----------------------------------------------------------------------
diff --git a/tajo-cluster-tests/src/test/java/org/apache/tajo/TajoTestingCluster.java b/tajo-cluster-tests/src/test/java/org/apache/tajo/TajoTestingCluster.java
index c08100e..75f410e 100644
--- a/tajo-cluster-tests/src/test/java/org/apache/tajo/TajoTestingCluster.java
+++ b/tajo-cluster-tests/src/test/java/org/apache/tajo/TajoTestingCluster.java
@@ -359,7 +359,7 @@ public class TajoTestingCluster {
     c.setVar(ConfVars.RESOURCE_TRACKER_RPC_ADDRESS, "localhost:0");
     c.setVar(ConfVars.WORKER_PEER_RPC_ADDRESS, "localhost:0");
     c.setVar(ConfVars.WORKER_TEMPORAL_DIR, "file://" + testBuildDir.getAbsolutePath() + "/tajo-localdir");
-    c.setIntVar(ConfVars.REST_SERVICE_PORT, 0);
+    c.setVar(ConfVars.REST_SERVICE_ADDRESS, "localhost:0");
 
     if (!local) {
       String tajoRootDir = getMiniDFSCluster().getFileSystem().getUri().toString() + "/tajo";
@@ -394,8 +394,8 @@ public class TajoTestingCluster {
     this.conf.setVar(ConfVars.CATALOG_ADDRESS, c.getVar(ConfVars.CATALOG_ADDRESS));
     
     InetSocketAddress tajoRestAddress = tajoMaster.getContext().getRestServer().getBindAddress();
-    
-    this.conf.setIntVar(ConfVars.REST_SERVICE_PORT, tajoRestAddress.getPort());
+
+    this.conf.setVar(ConfVars.REST_SERVICE_ADDRESS, tajoRestAddress.getHostName() + ":" +
tajoRestAddress.getPort());
 
     startTajoWorkers(numSlaves);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-common/src/main/java/org/apache/tajo/conf/TajoConf.java
----------------------------------------------------------------------
diff --git a/tajo-common/src/main/java/org/apache/tajo/conf/TajoConf.java b/tajo-common/src/main/java/org/apache/tajo/conf/TajoConf.java
index 1440f01..33f5799 100644
--- a/tajo-common/src/main/java/org/apache/tajo/conf/TajoConf.java
+++ b/tajo-common/src/main/java/org/apache/tajo/conf/TajoConf.java
@@ -121,7 +121,7 @@ public class TajoConf extends Configuration {
     ///////////////////////////////////////////////////////////////////////////////////////
 
     // a username for a running Tajo cluster
-    ROOT_DIR("tajo.rootdir", "file:///tmp/tajo-${user.name}/", 
+    ROOT_DIR("tajo.rootdir", "file:///tmp/tajo-${user.name}/",
         Validators.groups(Validators.notNull(), Validators.pathUrl())),
     USERNAME("tajo.username", "${user.name}", Validators.javaString()),
 
@@ -140,7 +140,7 @@ public class TajoConf extends Configuration {
     TAJO_MASTER_INFO_ADDRESS("tajo.master.info-http.address", "0.0.0.0:26080", Validators.networkAddr()),
 
     // Tajo Rest Service
-    REST_SERVICE_PORT("tajo.rest.service.port", 26880),
+    REST_SERVICE_ADDRESS("tajo.rest.service.address", "0.0.0.0:26880", Validators.networkAddr()),
 
     // High availability configurations
     TAJO_MASTER_HA_ENABLE("tajo.master.ha.enable", false, Validators.bool()),
@@ -418,7 +418,7 @@ public class TajoConf extends Configuration {
       this.defaultBoolVal = false;
       this.type = VarType.STRING;
     }
-    
+
     ConfVars(String varname, String defaultVal, Validator validator) {
       this(varname, defaultVal);
       this.validator = validator;
@@ -434,7 +434,7 @@ public class TajoConf extends Configuration {
       this.defaultBoolVal = false;
       this.type = VarType.INT;
     }
-    
+
     ConfVars(String varname, int defaultIntVal, Validator validator) {
       this(varname, defaultIntVal);
       this.validator = validator;
@@ -450,7 +450,7 @@ public class TajoConf extends Configuration {
       this.defaultBoolVal = false;
       this.type = VarType.LONG;
     }
-    
+
     ConfVars(String varname, long defaultLongVal, Validator validator) {
       this(varname, defaultLongVal);
       this.validator = validator;
@@ -466,7 +466,7 @@ public class TajoConf extends Configuration {
       this.defaultBoolVal = false;
       this.type = VarType.FLOAT;
     }
-    
+
     ConfVars(String varname, float defaultFloatVal, Validator validator) {
       this(varname, defaultFloatVal);
       this.validator = validator;
@@ -482,7 +482,7 @@ public class TajoConf extends Configuration {
       this.defaultBoolVal = defaultBoolVal;
       this.type = VarType.BOOLEAN;
     }
-    
+
     ConfVars(String varname, boolean defaultBoolVal, Validator validator) {
       this(varname, defaultBoolVal);
       this.validator = validator;
@@ -833,11 +833,11 @@ public class TajoConf extends Configuration {
       return new Path(systemConfPathStr);
     }
   }
-  
+
   /**
    * validateProperty function will fetch pre-defined configuration property by keyname.
    * If found, it will validate the supplied value with these validators.
-   * 
+   *
    * @param name - a string containing specific key
    * @param value - a string containing value
    * @throws ConstraintViolationException

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-core-tests/src/test/java/org/apache/tajo/ha/TestHAServiceHDFSImpl.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ha/TestHAServiceHDFSImpl.java b/tajo-core-tests/src/test/java/org/apache/tajo/ha/TestHAServiceHDFSImpl.java
index 81eeb1f..3eeeb39 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ha/TestHAServiceHDFSImpl.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ha/TestHAServiceHDFSImpl.java
@@ -107,8 +107,8 @@ public class TestHAServiceHDFSImpl  {
         "localhost:" + NetUtils.getFreeSocketPort());
     conf.setVar(TajoConf.ConfVars.TAJO_MASTER_INFO_ADDRESS,
         "localhost:" + NetUtils.getFreeSocketPort());
-    conf.setIntVar(TajoConf.ConfVars.REST_SERVICE_PORT,
-        NetUtils.getFreeSocketPort());
+    conf.setVar(TajoConf.ConfVars.REST_SERVICE_ADDRESS,
+	"localhost:" + NetUtils.getFreeSocketPort());
 
     conf.setBoolVar(TajoConf.ConfVars.TAJO_MASTER_HA_ENABLE, true);
     conf.setIntVar(TajoConf.ConfVars.TAJO_MASTER_HA_MONITOR_INTERVAL, 1000);

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestClusterResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestClusterResource.java
b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestClusterResource.java
index 7e18c1d..c8fd213 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestClusterResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestClusterResource.java
@@ -18,6 +18,7 @@
 
 package org.apache.tajo.ws.rs.resources;
 
+import java.net.InetSocketAddress;
 import java.net.URI;
 import java.util.List;
 import java.util.Map;
@@ -50,8 +51,8 @@ public class TestClusterResource extends QueryTestCaseBase {
   
   @Before
   public void setUp() throws Exception {
-    int restPort = testBase.getTestingCluster().getConfiguration().getIntVar(ConfVars.REST_SERVICE_PORT);
-    restServiceURI = new URI("http", null, "127.0.0.1", restPort, "/rest", null, null);
+    InetSocketAddress address = testBase.getTestingCluster().getConfiguration().getSocketAddrVar(ConfVars.REST_SERVICE_ADDRESS);
+    restServiceURI = new URI("http", null, address.getHostName(), address.getPort(), "/rest",
null, null);
     clusterURI = new URI(restServiceURI + "/cluster");
     restClient = ClientBuilder.newBuilder()
         .register(new GsonFeature(RestTestUtils.registerTypeAdapterMap()))

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestDatabasesResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestDatabasesResource.java
b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestDatabasesResource.java
index 59c53f1..bffa295 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestDatabasesResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestDatabasesResource.java
@@ -18,6 +18,7 @@
 
 package org.apache.tajo.ws.rs.resources;
 
+import java.net.InetSocketAddress;
 import java.net.URI;
 import java.util.Collection;
 import java.util.Map;
@@ -56,8 +57,8 @@ public class TestDatabasesResource extends QueryTestCaseBase {
   
   @Before
   public void setUp() throws Exception {
-    int restPort = testBase.getTestingCluster().getConfiguration().getIntVar(ConfVars.REST_SERVICE_PORT);
-    restServiceURI = new URI("http", null, "127.0.0.1", restPort, "/rest", null, null);
+    InetSocketAddress address = testBase.getTestingCluster().getConfiguration().getSocketAddrVar(ConfVars.REST_SERVICE_ADDRESS);
+    restServiceURI = new URI("http", null, address.getHostName(), address.getPort(), "/rest",
null, null);
     databasesURI = new URI(restServiceURI + "/databases");
     restClient = ClientBuilder.newBuilder()
         .register(new GsonFeature(RestTestUtils.registerTypeAdapterMap()))

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestFunctionsResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestFunctionsResource.java
b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestFunctionsResource.java
index 7c7aeae..9299554 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestFunctionsResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestFunctionsResource.java
@@ -32,6 +32,8 @@ import org.junit.Test;
 import javax.ws.rs.client.Client;
 import javax.ws.rs.client.ClientBuilder;
 import javax.ws.rs.core.GenericType;
+
+import java.net.InetSocketAddress;
 import java.net.URI;
 import java.util.List;
 
@@ -50,8 +52,8 @@ public class TestFunctionsResource extends QueryTestCaseBase {
   
   @Before
   public void setUp() throws Exception {
-    int restPort = testBase.getTestingCluster().getConfiguration().getIntVar(ConfVars.REST_SERVICE_PORT);
-    restServiceURI = new URI("http", null, "127.0.0.1", restPort, "/rest", null, null);
+    InetSocketAddress address = testBase.getTestingCluster().getConfiguration().getSocketAddrVar(ConfVars.REST_SERVICE_ADDRESS);
+    restServiceURI = new URI("http", null, address.getHostName(), address.getPort(), "/rest",
null, null);
     functionsURI = new URI(restServiceURI + "/functions");
     restClient = ClientBuilder.newBuilder()
         .register(new GsonFeature(RestTestUtils.registerTypeAdapterMap()))

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResource.java
b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResource.java
index 210d38d..002a27c 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResource.java
@@ -41,6 +41,8 @@ import javax.ws.rs.client.ClientBuilder;
 import javax.ws.rs.client.Entity;
 import javax.ws.rs.core.GenericType;
 import javax.ws.rs.core.MediaType;
+
+import java.net.InetSocketAddress;
 import java.net.URI;
 import java.util.List;
 import java.util.Map;
@@ -62,8 +64,8 @@ public class TestQueryResource extends QueryTestCaseBase {
   
   @Before
   public void setUp() throws Exception {
-    int restPort = testBase.getTestingCluster().getConfiguration().getIntVar(ConfVars.REST_SERVICE_PORT);
-    restServiceURI = new URI("http", null, "127.0.0.1", restPort, "/rest", null, null);
+    InetSocketAddress address = testBase.getTestingCluster().getConfiguration().getSocketAddrVar(ConfVars.REST_SERVICE_ADDRESS);
+    restServiceURI = new URI("http", null, address.getHostName(), address.getPort(), "/rest",
null, null);
     sessionsURI = new URI(restServiceURI + "/sessions");
     queriesURI = new URI(restServiceURI + "/queries");
     restClient = ClientBuilder.newBuilder()

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResultResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResultResource.java
b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResultResource.java
index 7762b05..7d2f5f4 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResultResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResultResource.java
@@ -50,6 +50,7 @@ import java.io.BufferedInputStream;
 import java.io.DataInputStream;
 import java.io.EOFException;
 import java.io.InputStream;
+import java.net.InetSocketAddress;
 import java.net.URI;
 import java.security.MessageDigest;
 import java.util.List;
@@ -76,8 +77,8 @@ public class TestQueryResultResource extends QueryTestCaseBase {
 
   @Before
   public void setUp() throws Exception {
-    int restPort = testBase.getTestingCluster().getConfiguration().getIntVar(ConfVars.REST_SERVICE_PORT);
-    restServiceURI = new URI("http", null, "127.0.0.1", restPort, "/rest", null, null);
+    InetSocketAddress address = testBase.getTestingCluster().getConfiguration().getSocketAddrVar(ConfVars.REST_SERVICE_ADDRESS);
+    restServiceURI = new URI("http", null, address.getHostName(), address.getPort(), "/rest",
null, null);
     sessionsURI = new URI(restServiceURI + "/sessions");
     queriesURI = new URI(restServiceURI + "/queries");
     restClient = ClientBuilder.newBuilder()

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestSessionsResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestSessionsResource.java
b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestSessionsResource.java
index 7b293d8..8668423 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestSessionsResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestSessionsResource.java
@@ -18,6 +18,7 @@
 
 package org.apache.tajo.ws.rs.resources;
 
+import java.net.InetSocketAddress;
 import java.net.URI;
 import java.util.HashMap;
 import java.util.Map;
@@ -56,8 +57,8 @@ public class TestSessionsResource extends QueryTestCaseBase {
   
   @Before
   public void setUp() throws Exception {
-    int restPort = testBase.getTestingCluster().getConfiguration().getIntVar(ConfVars.REST_SERVICE_PORT);
-    restServiceURI = new URI("http", null, "127.0.0.1", restPort, "/rest", null, null);
+    InetSocketAddress address = testBase.getTestingCluster().getConfiguration().getSocketAddrVar(ConfVars.REST_SERVICE_ADDRESS);
+    restServiceURI = new URI("http", null, address.getHostName(), address.getPort(), "/rest",
null, null);
     sessionsURI = new URI(restServiceURI + "/sessions");
     restClient = ClientBuilder.newBuilder()
         .register(new GsonFeature(RestTestUtils.registerTypeAdapterMap()))

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestTablesResource.java
----------------------------------------------------------------------
diff --git a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestTablesResource.java
b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestTablesResource.java
index aa8a696..3dc8888 100644
--- a/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestTablesResource.java
+++ b/tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestTablesResource.java
@@ -41,6 +41,8 @@ import javax.ws.rs.core.GenericType;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
+
+import java.net.InetSocketAddress;
 import java.net.URI;
 import java.util.Collection;
 import java.util.List;
@@ -66,8 +68,8 @@ public class TestTablesResource extends QueryTestCaseBase {
 
   @Before
   public void setUp() throws Exception {
-    int restPort = testBase.getTestingCluster().getConfiguration().getIntVar(ConfVars.REST_SERVICE_PORT);
-    restServiceURI = new URI("http", null, "127.0.0.1", restPort, "/rest", null, null);
+    InetSocketAddress address = testBase.getTestingCluster().getConfiguration().getSocketAddrVar(ConfVars.REST_SERVICE_ADDRESS);
+    restServiceURI = new URI("http", null, address.getHostName(), address.getPort(), "/rest",
null, null);
     tablesURI = new URI(restServiceURI + "/databases/" + defaultDatabaseName + "/tables");
 		queriesURI = new URI(restServiceURI + "/queries");
 		sessionsURI = new URI(restServiceURI + "/sessions");

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-core/src/main/java/org/apache/tajo/ws/rs/TajoRestService.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/java/org/apache/tajo/ws/rs/TajoRestService.java b/tajo-core/src/main/java/org/apache/tajo/ws/rs/TajoRestService.java
index 6da2b32..5fff44e 100644
--- a/tajo-core/src/main/java/org/apache/tajo/ws/rs/TajoRestService.java
+++ b/tajo-core/src/main/java/org/apache/tajo/ws/rs/TajoRestService.java
@@ -99,8 +99,8 @@ public class TajoRestService extends CompositeService {
         .property(ServerProperties.METAINF_SERVICES_LOOKUP_DISABLE, true);
     TajoConf tajoConf = (TajoConf) conf;
 
-    int port = TajoConf.getIntVar(tajoConf, TajoConf.ConfVars.REST_SERVICE_PORT);
-    URI restServiceURI = new URI("http", null, "0.0.0.0", port, "/rest", null, null);
+    InetSocketAddress address = tajoConf.getSocketAddrVar(TajoConf.ConfVars.REST_SERVICE_ADDRESS);
+    URI restServiceURI = new URI("http", null, address.getHostName(), address.getPort(),
"/rest", null, null);
     int workerCount = TajoConf.getIntVar(tajoConf, TajoConf.ConfVars.REST_SERVICE_RPC_SERVER_WORKER_THREAD_NUM);
     restServer = NettyRestServerFactory.createNettyRestServer(restServiceURI, resourceConfig,
workerCount, false);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/fcf1ae1a/tajo-rpc/tajo-ws-rs/src/main/java/org/apache/tajo/ws/rs/netty/NettyRestServerFactory.java
----------------------------------------------------------------------
diff --git a/tajo-rpc/tajo-ws-rs/src/main/java/org/apache/tajo/ws/rs/netty/NettyRestServerFactory.java
b/tajo-rpc/tajo-ws-rs/src/main/java/org/apache/tajo/ws/rs/netty/NettyRestServerFactory.java
index 5d2eea1..1fcfbe5 100644
--- a/tajo-rpc/tajo-ws-rs/src/main/java/org/apache/tajo/ws/rs/netty/NettyRestServerFactory.java
+++ b/tajo-rpc/tajo-ws-rs/src/main/java/org/apache/tajo/ws/rs/netty/NettyRestServerFactory.java
@@ -74,7 +74,7 @@ public final class NettyRestServerFactory {
 
     handler.setRootPath(uri.getPath());
 
-    InetSocketAddress bindAddress = new InetSocketAddress(port);
+    InetSocketAddress bindAddress = new InetSocketAddress(uri.getHost(), port);
     NettyRestServer nettyRestServer = new NettyRestServer("Tajo-REST", bindAddress, workerCount);
 
     nettyRestServer.setHandler(handler);


Mime
View raw message