incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1230736 - in /incubator/accumulo/branches/1.3/src: server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java
Date Thu, 12 Jan 2012 19:55:22 GMT
Author: ecn
Date: Thu Jan 12 19:55:22 2012
New Revision: 1230736

URL: http://svn.apache.org/viewvc?rev=1230736&view=rev
Log:
ACCUMULO-243 reverting a change that prevents traces from getting into the trace table

Modified:
    incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
    incubator/accumulo/branches/1.3/src/trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java?rev=1230736&r1=1230735&r2=1230736&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
(original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
Thu Jan 12 19:55:22 2012
@@ -16,7 +16,9 @@
  */
 package org.apache.accumulo.server.trace;
 
-import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.ServerSocket;
+import java.nio.channels.ServerSocketChannel;
 import java.util.TimerTask;
 
 import org.apache.accumulo.core.Constants;
@@ -28,11 +30,10 @@ import org.apache.accumulo.core.conf.Acc
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.util.AddressUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.server.Accumulo;
-import org.apache.accumulo.server.util.TServerUtils;
-import org.apache.accumulo.server.util.TServerUtils.ServerPort;
 import org.apache.accumulo.server.util.time.SimpleTimer;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
@@ -40,6 +41,9 @@ import org.apache.thrift.TByteArrayOutpu
 import org.apache.thrift.TException;
 import org.apache.thrift.protocol.TCompactProtocol;
 import org.apache.thrift.server.TServer;
+import org.apache.thrift.server.TThreadPoolServer;
+import org.apache.thrift.transport.TServerSocket;
+import org.apache.thrift.transport.TServerTransport;
 import org.apache.thrift.transport.TTransport;
 import org.apache.thrift.transport.TTransportException;
 import org.apache.zookeeper.CreateMode;
@@ -150,10 +154,15 @@ public class TraceServer implements Watc
       }
     }
     
-    ServerPort serverPort = TServerUtils.startServer(Property.TRACE_PORT, new SpanReceiver.Processor(new
Receiver()), "tracer", "tracer", false);
-    server = serverPort.server;
-    InetAddress address = Accumulo.getLocalAddress(args);
-    registerInZooKeeper(address.getHostAddress() + ":" + serverPort.port);
+    int port = conf.getPort(Property.TRACE_PORT);
+    final ServerSocket sock = ServerSocketChannel.open().socket();
+    sock.setReuseAddress(true);
+    sock.bind(new InetSocketAddress(port));
+    final TServerTransport transport = new TServerSocket(sock);
+    server = new TThreadPoolServer(new SpanReceiver.Processor(new Receiver()), transport);
+    final InetSocketAddress address = new InetSocketAddress(Accumulo.getLocalAddress(args),
sock.getLocalPort());
+    registerInZooKeeper(AddressUtil.toString(address));
+    
     writer = connector.createBatchWriter(table, 100l * 1024 * 1024, 5 * 1000l, 10);
   }
   

Modified: incubator/accumulo/branches/1.3/src/trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java?rev=1230736&r1=1230735&r2=1230736&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java
(original)
+++ incubator/accumulo/branches/1.3/src/trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java
Thu Jan 12 19:55:22 2012
@@ -66,7 +66,7 @@ public abstract class AsyncSpanReceiver<
         }
       }
       
-    }, 0, millis);
+    }, millis, millis);
   }
   
   void sendSpans() {



Mime
View raw message