incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1230755 - in /incubator/accumulo/trunk: ./ src/core/ src/server/ src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java src/trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java
Date Thu, 12 Jan 2012 20:17:17 GMT
Author: ecn
Date: Thu Jan 12 20:17:17 2012
New Revision: 1230755

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

Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/core/   (props changed)
    incubator/accumulo/trunk/src/server/   (props changed)
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
    incubator/accumulo/trunk/src/trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 12 20:17:17 2012
@@ -1,3 +1,3 @@
-/incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180
+/incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180,1230736
 /incubator/accumulo/branches/1.3.5rc:1209938
-/incubator/accumulo/branches/1.4:1201902-1230701,1230706
+/incubator/accumulo/branches/1.4:1201902-1230701,1230706,1230753

Propchange: incubator/accumulo/trunk/src/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 12 20:17:17 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3/src/core:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215
 /incubator/accumulo/branches/1.3.5rc/src/core:1209938
-/incubator/accumulo/branches/1.4/src/core:1201902-1230701,1230706
+/incubator/accumulo/branches/1.4/src/core:1201902-1230701,1230706,1230753

Propchange: incubator/accumulo/trunk/src/server/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 12 20:17:17 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3/src/server:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611
 /incubator/accumulo/branches/1.3.5rc/src/server:1209938
-/incubator/accumulo/branches/1.4/src/server:1201902-1230701,1230706
+/incubator/accumulo/branches/1.4/src/server:1201902-1230701,1230706,1230753

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java?rev=1230755&r1=1230754&r2=1230755&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
Thu Jan 12 20:17:17 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;
@@ -27,13 +29,12 @@ 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.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.ServerConfiguration;
-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.accumulo.server.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
@@ -43,6 +44,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.WatchedEvent;
@@ -156,10 +160,16 @@ public class TraceServer implements Watc
     }
     
     int port = conf.getPort(Property.TRACE_PORT);
-    ServerPort serverPort = TServerUtils.startTServer(port, new SpanReceiver.Processor(new
Receiver()), "tracer", "tracer", 4, 1000l);
-    server = serverPort.server;
-    InetAddress address = Accumulo.getLocalAddress(args);
-    registerInZooKeeper(address.getHostAddress() + ":" + serverPort.port);
+    final ServerSocket sock = ServerSocketChannel.open().socket();
+    sock.setReuseAddress(true);
+    sock.bind(new InetSocketAddress(port));
+    final TServerTransport transport = new TServerSocket(sock);
+    TThreadPoolServer.Args options = new TThreadPoolServer.Args(transport);
+    options.processor(new SpanReceiver.Processor(new Receiver()));
+    server = new TThreadPoolServer(options);
+    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/trunk/src/trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java?rev=1230755&r1=1230754&r2=1230755&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java
(original)
+++ incubator/accumulo/trunk/src/trace/src/main/java/cloudtrace/instrument/receivers/AsyncSpanReceiver.java
Thu Jan 12 20:17:17 2012
@@ -66,7 +66,7 @@ public abstract class AsyncSpanReceiver<
         }
       }
       
-    }, 0, millis);
+    }, millis, millis);
   }
   
   void sendSpans() {



Mime
View raw message