You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/08/06 16:10:46 UTC
git commit: ACCUMULO-1537 committing Michael Berman's patch to run
against IPV6 enabled macs
Updated Branches:
refs/heads/master 517c271ca -> 3ed8aec5b
ACCUMULO-1537 committing Michael Berman's patch to run against IPV6 enabled macs
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3ed8aec5
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3ed8aec5
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3ed8aec5
Branch: refs/heads/master
Commit: 3ed8aec5ba3ce2f34ebfdc1ef624e1810c81257f
Parents: 517c271
Author: Eric Newton <ec...@apache.org>
Authored: Tue Aug 6 10:10:26 2013 -0400
Committer: Eric Newton <ec...@apache.org>
Committed: Tue Aug 6 10:10:53 2013 -0400
----------------------------------------------------------------------
.../trace/instrument/receivers/SendSpansViaThrift.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ed8aec5/trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/SendSpansViaThrift.java
----------------------------------------------------------------------
diff --git a/trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/SendSpansViaThrift.java b/trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/SendSpansViaThrift.java
index b05bee0..4967d97 100644
--- a/trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/SendSpansViaThrift.java
+++ b/trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/SendSpansViaThrift.java
@@ -46,9 +46,11 @@ public class SendSpansViaThrift extends AsyncSpanReceiver<String,Client> {
if (destination == null)
return null;
try {
- String[] hostAddr = destination.split(":", 2);
- log.debug("Connecting to " + hostAddr[0] + ":" + hostAddr[1]);
- InetSocketAddress addr = new InetSocketAddress(hostAddr[0], Integer.parseInt(hostAddr[1]));
+ int portSeparatorIndex = destination.lastIndexOf(':');
+ String host = destination.substring(0, portSeparatorIndex);
+ int port = Integer.parseInt(destination.substring(portSeparatorIndex+1));
+ log.debug("Connecting to " + host + ":" + port);
+ InetSocketAddress addr = new InetSocketAddress(host, port);
Socket sock = new Socket();
sock.connect(addr);
TTransport transport = new TSocket(sock);