You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/12/09 04:11:55 UTC

[2/5] accumulo git commit: ACCUMULO-3394 Remove unused method.

ACCUMULO-3394 Remove unused method.


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

Branch: refs/heads/master
Commit: 6e368edb8cd5eb5a68e75f45352a8fdfacaedc1e
Parents: f25d850
Author: Josh Elser <el...@apache.org>
Authored: Mon Dec 8 21:17:41 2014 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Mon Dec 8 22:04:17 2014 -0500

----------------------------------------------------------------------
 .../accumulo/server/thrift/TServerUtils.java    | 20 --------------------
 1 file changed, 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/6e368edb/server/base/src/main/java/org/apache/accumulo/server/thrift/TServerUtils.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/thrift/TServerUtils.java b/server/base/src/main/java/org/apache/accumulo/server/thrift/TServerUtils.java
index ca182d4..4e6a758 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/thrift/TServerUtils.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/thrift/TServerUtils.java
@@ -16,14 +16,11 @@
  */
 package org.apache.accumulo.server.thrift;
 
-import java.io.IOException;
 import java.lang.reflect.Field;
 import java.net.BindException;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
-import java.net.ServerSocket;
 import java.net.UnknownHostException;
-import java.nio.channels.ServerSocketChannel;
 import java.util.Random;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.ThreadPoolExecutor;
@@ -170,23 +167,6 @@ public class TServerUtils {
     return new ServerAddress(new CustomNonBlockingServer(options), address);
   }
 
-  public static ServerAddress createThreadPoolServer(HostAndPort address, TProcessor processor, String serverName, String threadName, int numThreads)
-      throws TTransportException {
-
-    // if port is zero, then we must bind to get the port number
-    ServerSocket sock;
-    try {
-      sock = ServerSocketChannel.open().socket();
-      sock.setReuseAddress(true);
-      sock.bind(new InetSocketAddress(address.getHostText(), address.getPort()));
-      address = HostAndPort.fromParts(address.getHostText(), sock.getLocalPort());
-    } catch (IOException ex) {
-      throw new TTransportException(ex);
-    }
-    TServerTransport transport = new TBufferedServerSocket(sock, 32 * 1024);
-    return new ServerAddress(createThreadPoolServer(transport, processor), address);
-  }
-
   public static TServer createThreadPoolServer(TServerTransport transport, TProcessor processor) {
     TThreadPoolServer.Args options = new TThreadPoolServer.Args(transport);
     options.protocolFactory(ThriftUtil.protocolFactory());