You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by af...@apache.org on 2015/10/08 16:52:21 UTC

accumulo git commit: ACCUMULO-4019 added an option to specify the interface for the proxy to listen on, and defaulted to all interfaces

Repository: accumulo
Updated Branches:
  refs/heads/1.7 8532f0759 -> 8f37693d6


ACCUMULO-4019 added an option to specify the interface for the proxy to listen on, and defaulted to all interfaces


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

Branch: refs/heads/1.7
Commit: 8f37693d6179c3f18935bbf23ccaf08db95bed56
Parents: 8532f07
Author: Adam Fuchs <ad...@sqrrl.com>
Authored: Thu Oct 8 10:51:35 2015 -0400
Committer: Adam Fuchs <ad...@sqrrl.com>
Committed: Thu Oct 8 10:51:35 2015 -0400

----------------------------------------------------------------------
 proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f37693d/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
index 2290106..c8e9526 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
@@ -81,6 +81,9 @@ public class Proxy implements KeywordExecutable {
   public static final String KERBEROS_PRINCIPAL = "kerberosPrincipal";
   public static final String KERBEROS_KEYTAB = "kerberosKeytab";
 
+  public static final String THRIFT_SERVER_HOSTNAME = "thriftServerHostname";
+  public static final String THRIFT_SERVER_HOSTNAME_DEFAULT = "0.0.0.0";
+
   public static class PropertiesConverter implements IStringConverter<Properties> {
     @Override
     public Properties convert(String fileName) {
@@ -161,7 +164,8 @@ public class Proxy implements KeywordExecutable {
         .asSubclass(TProtocolFactory.class);
     TProtocolFactory protoFactory = protoFactoryClass.newInstance();
     int port = Integer.parseInt(opts.prop.getProperty("port"));
-    HostAndPort address = HostAndPort.fromParts(InetAddress.getLocalHost().getCanonicalHostName(), port);
+    String hostname = opts.prop.getProperty(THRIFT_SERVER_HOSTNAME, THRIFT_SERVER_HOSTNAME_DEFAULT);
+    HostAndPort address = HostAndPort.fromParts(hostname, port);
     ServerAddress server = createProxyServer(address, protoFactory, opts.prop);
     // Wait for the server to come up
     while (!server.server.isServing()) {