accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject git commit: ACCUMULO-1601 trace server needs to bind to the interface passed on the command line
Date Tue, 23 Jul 2013 16:32:43 GMT
Updated Branches:
  refs/heads/master 80d1c3373 -> 14a8dec15


ACCUMULO-1601 trace server needs to bind to the interface passed on the command line


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

Branch: refs/heads/master
Commit: 14a8dec15674fe8e087c5fc577590b99a1740e90
Parents: 80d1c33
Author: Eric Newton <ecn@apache.org>
Authored: Tue Jul 23 12:32:50 2013 -0400
Committer: Eric Newton <ecn@apache.org>
Committed: Tue Jul 23 12:32:50 2013 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/server/trace/TraceServer.java     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/14a8dec1/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java b/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
index 5875182..27624e3 100644
--- a/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
+++ b/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
@@ -202,14 +202,12 @@ public class TraceServer implements Watcher {
     int port = conf.getPort(Property.TRACE_PORT);
     final ServerSocket sock = ServerSocketChannel.open().socket();
     sock.setReuseAddress(true);
-    sock.bind(new InetSocketAddress(port));
+    sock.bind(new InetSocketAddress(hostname, port));
     final TServerTransport transport = new TServerSocket(sock);
     TThreadPoolServer.Args options = new TThreadPoolServer.Args(transport);
     options.processor(new Processor<Iface>(new Receiver()));
     server = new TThreadPoolServer(options);
-    final InetSocketAddress address = new InetSocketAddress(hostname, sock.getLocalPort());
-    registerInZooKeeper(AddressUtil.toString(address));
-    
+    registerInZooKeeper(sock.getInetAddress() + ":" + sock.getLocalPort());
     writer = connector.createBatchWriter(table, new BatchWriterConfig().setMaxLatency(5,
TimeUnit.SECONDS));
   }
   


Mime
View raw message