Repository: accumulo Updated Branches: refs/heads/master 29c7eeb6b -> 23a084737
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/master Commit: 8f37693d6179c3f18935bbf23ccaf08db95bed56 Parents: 8532f07 Author: Adam Fuchs <a...@sqrrl.com> Authored: Thu Oct 8 10:51:35 2015 -0400 Committer: Adam Fuchs <a...@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()) {