accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From afu...@apache.org
Subject accumulo git commit: ACCUMULO-4019 added an option to specify the interface for the proxy to listen on, and defaulted to all interfaces
Date Thu, 08 Oct 2015 14:52:21 GMT
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 <adam@sqrrl.com>
Authored: Thu Oct 8 10:51:35 2015 -0400
Committer: Adam Fuchs <adam@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()) {


Mime
View raw message