accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [1/3] accumulo git commit: ACCUMULO-3394 Change thrift package to rpc and make an rpc package in core too
Date Tue, 09 Dec 2014 05:15:38 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master b7927906f -> de1d3ee38


http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/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
deleted file mode 100644
index 123caab..0000000
--- a/server/base/src/main/java/org/apache/accumulo/server/thrift/TServerUtils.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.server.thrift;
-
-import java.lang.reflect.Field;
-import java.net.BindException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.UnknownHostException;
-import java.util.Random;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.ThreadPoolExecutor;
-
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
-import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.core.util.Daemon;
-import org.apache.accumulo.core.util.LoggingRunnable;
-import org.apache.accumulo.core.util.SimpleThreadPool;
-import org.apache.accumulo.core.util.SslConnectionParams;
-import org.apache.accumulo.core.util.ThriftUtil;
-import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.accumulo.server.AccumuloServerContext;
-import org.apache.accumulo.server.util.Halt;
-import org.apache.accumulo.server.util.time.SimpleTimer;
-import org.apache.log4j.Logger;
-import org.apache.thrift.TProcessor;
-import org.apache.thrift.TProcessorFactory;
-import org.apache.thrift.server.TServer;
-import org.apache.thrift.server.TThreadPoolServer;
-import org.apache.thrift.transport.TServerTransport;
-import org.apache.thrift.transport.TTransportException;
-
-import com.google.common.net.HostAndPort;
-
-public class TServerUtils {
-  private static final Logger log = Logger.getLogger(TServerUtils.class);
-
-  public static final ThreadLocal<String> clientAddress = new ThreadLocal<String>();
-
-  /**
-   * Start a server, at the given port, or higher, if that port is not available.
-   *
-   * @param portHintProperty
-   *          the port to attempt to open, can be zero, meaning "any available port"
-   * @param processor
-   *          the service to be started
-   * @param serverName
-   *          the name of the class that is providing the service
-   * @param threadName
-   *          name this service's thread for better debugging
-   * @return the server object created, and the port actually used
-   * @throws UnknownHostException
-   *           when we don't know our own address
-   */
-  public static ServerAddress startServer(AccumuloServerContext service, String address,
Property portHintProperty, TProcessor processor, String serverName,
-      String threadName, Property portSearchProperty, Property minThreadProperty, Property
timeBetweenThreadChecksProperty, Property maxMessageSizeProperty)
-      throws UnknownHostException {
-    int portHint = service.getConfiguration().getPort(portHintProperty);
-    int minThreads = 2;
-    if (minThreadProperty != null)
-      minThreads = service.getConfiguration().getCount(minThreadProperty);
-    long timeBetweenThreadChecks = 1000;
-    if (timeBetweenThreadChecksProperty != null)
-      timeBetweenThreadChecks = service.getConfiguration().getTimeInMillis(timeBetweenThreadChecksProperty);
-    long maxMessageSize = 10 * 1000 * 1000;
-    if (maxMessageSizeProperty != null)
-      maxMessageSize = service.getConfiguration().getMemoryInBytes(maxMessageSizeProperty);
-    boolean portSearch = false;
-    if (portSearchProperty != null)
-      portSearch = service.getConfiguration().getBoolean(portSearchProperty);
-    // create the TimedProcessor outside the port search loop so we don't try to register
the same metrics mbean more than once
-    TimedProcessor timedProcessor = new TimedProcessor(service.getConfiguration(), processor,
serverName, threadName);
-    Random random = new Random();
-    for (int j = 0; j < 100; j++) {
-
-      // Are we going to slide around, looking for an open port?
-      int portsToSearch = 1;
-      if (portSearch)
-        portsToSearch = 1000;
-
-      for (int i = 0; i < portsToSearch; i++) {
-        int port = portHint + i;
-        if (portHint != 0 && i > 0)
-          port = 1024 + random.nextInt(65535 - 1024);
-        if (port > 65535)
-          port = 1024 + port % (65535 - 1024);
-        try {
-          HostAndPort addr = HostAndPort.fromParts(address, port);
-          return TServerUtils.startTServer(addr, timedProcessor, serverName, threadName,
minThreads,
-              service.getConfiguration().getCount(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE),
timeBetweenThreadChecks, maxMessageSize,
-              service.getServerSslParams(), service.getClientTimeoutInMillis());
-        } catch (TTransportException ex) {
-          log.error("Unable to start TServer", ex);
-          if (ex.getCause() == null || ex.getCause().getClass() == BindException.class) {
-            // Note: with a TNonblockingServerSocket a "port taken" exception is a cause-less
-            // TTransportException, and with a TSocket created by TSSLTransportFactory, it
-            // comes through as caused by a BindException.
-            log.info("Unable to use port " + port + ", retrying. (Thread Name = " + threadName
+ ")");
-            UtilWaitThread.sleep(250);
-          } else {
-            // thrift is passing up a nested exception that isn't a BindException,
-            // so no reason to believe retrying on a different port would help.
-            log.error("Unable to start TServer", ex);
-            break;
-          }
-        }
-      }
-    }
-    throw new UnknownHostException("Unable to find a listen port");
-  }
-
-  /**
-   * Create a NonBlockingServer with a custom thread pool that can dynamically resize itself.
-   */
-  public static ServerAddress createNonBlockingServer(HostAndPort address, TProcessor processor,
final String serverName, String threadName,
-      final int numThreads, final int numSTThreads, long timeBetweenThreadChecks, long maxMessageSize)
throws TTransportException {
-    TNonblockingServerSocket transport = new TNonblockingServerSocket(new InetSocketAddress(address.getHostText(),
address.getPort()));
-    CustomNonBlockingServer.Args options = new CustomNonBlockingServer.Args(transport);
-    options.protocolFactory(ThriftUtil.protocolFactory());
-    options.transportFactory(ThriftUtil.transportFactory(maxMessageSize));
-    options.maxReadBufferBytes = maxMessageSize;
-    options.stopTimeoutVal(5);
-    /*
-     * Create our own very special thread pool.
-     */
-    final ThreadPoolExecutor pool = new SimpleThreadPool(numThreads, "ClientPool");
-    // periodically adjust the number of threads we need by checking how busy our threads
are
-    SimpleTimer.getInstance(numSTThreads).schedule(new Runnable() {
-      @Override
-      public void run() {
-        if (pool.getCorePoolSize() <= pool.getActiveCount()) {
-          int larger = pool.getCorePoolSize() + Math.min(pool.getQueue().size(), 2);
-          log.info("Increasing server thread pool size on " + serverName + " to " + larger);
-          pool.setMaximumPoolSize(larger);
-          pool.setCorePoolSize(larger);
-        } else {
-          if (pool.getCorePoolSize() > pool.getActiveCount() + 3) {
-            int smaller = Math.max(numThreads, pool.getCorePoolSize() - 1);
-            if (smaller != pool.getCorePoolSize()) {
-              // ACCUMULO-2997 there is a race condition here... the active count could be
higher by the time
-              // we decrease the core pool size... so the active count could end up higher
than
-              // the core pool size, in which case everything will be queued... the increase
case
-              // should handle this and prevent deadlock
-              log.info("Decreasing server thread pool size on " + serverName + " to " + smaller);
-              pool.setCorePoolSize(smaller);
-            }
-          }
-        }
-      }
-    }, timeBetweenThreadChecks, timeBetweenThreadChecks);
-    options.executorService(pool);
-    options.processorFactory(new TProcessorFactory(processor));
-    if (address.getPort() == 0) {
-      address = HostAndPort.fromParts(address.getHostText(), transport.getPort());
-    }
-    return new ServerAddress(new CustomNonBlockingServer(options), address);
-  }
-
-  public static TServer createThreadPoolServer(TServerTransport transport, TProcessor processor)
{
-    TThreadPoolServer.Args options = new TThreadPoolServer.Args(transport);
-    options.protocolFactory(ThriftUtil.protocolFactory());
-    options.transportFactory(ThriftUtil.transportFactory());
-    options.processorFactory(new ClientInfoProcessorFactory(clientAddress, processor));
-    return new TThreadPoolServer(options);
-  }
-
-  public static ServerAddress createSslThreadPoolServer(HostAndPort address, TProcessor processor,
long socketTimeout, SslConnectionParams sslParams)
-      throws TTransportException {
-    org.apache.thrift.transport.TServerSocket transport;
-    try {
-      transport = ThriftUtil.getServerSocket(address.getPort(), (int) socketTimeout, InetAddress.getByName(address.getHostText()),
sslParams);
-    } catch (UnknownHostException e) {
-      throw new TTransportException(e);
-    }
-    if (address.getPort() == 0) {
-      address = HostAndPort.fromParts(address.getHostText(), transport.getServerSocket().getLocalPort());
-    }
-    return new ServerAddress(createThreadPoolServer(transport, processor), address);
-  }
-
-  public static ServerAddress startTServer(AccumuloConfiguration conf, HostAndPort address,
TProcessor processor, String serverName, String threadName, int numThreads, int numSTThreads,
-      long timeBetweenThreadChecks, long maxMessageSize, SslConnectionParams sslParams, long
sslSocketTimeout) throws TTransportException {
-    return startTServer(address, new TimedProcessor(conf, processor, serverName, threadName),
serverName, threadName, numThreads, numSTThreads,
-        timeBetweenThreadChecks, maxMessageSize, sslParams, sslSocketTimeout);
-  }
-
-  /**
-   * Start the appropriate Thrift server (SSL or non-blocking server) for the given parameters.
Non-null SSL parameters will cause an SSL server to be started.
-   *
-   * @return A ServerAddress encapsulating the Thrift server created and the host/port which
it is bound to.
-   */
-  public static ServerAddress startTServer(HostAndPort address, TimedProcessor processor,
String serverName, String threadName, int numThreads,
-    int numSTThreads, long timeBetweenThreadChecks, long maxMessageSize, SslConnectionParams
sslParams, long sslSocketTimeout) throws TTransportException {
-
-    ServerAddress serverAddress;
-    if (sslParams != null) {
-      serverAddress = createSslThreadPoolServer(address, processor, sslSocketTimeout, sslParams);
-    } else {
-      serverAddress = createNonBlockingServer(address, processor, serverName, threadName,
numThreads, numSTThreads, timeBetweenThreadChecks, maxMessageSize);
-    }
-    final TServer finalServer = serverAddress.server;
-    Runnable serveTask = new Runnable() {
-      @Override
-      public void run() {
-        try {
-          finalServer.serve();
-        } catch (Error e) {
-          Halt.halt("Unexpected error in TThreadPoolServer " + e + ", halting.");
-        }
-      }
-    };
-    serveTask = new LoggingRunnable(TServerUtils.log, serveTask);
-    Thread thread = new Daemon(serveTask, threadName);
-    thread.start();
-    // check for the special "bind to everything address"
-    if (serverAddress.address.getHostText().equals("0.0.0.0")) {
-      // can't get the address from the bind, so we'll do our best to invent our hostname
-      try {
-        serverAddress = new ServerAddress(finalServer, HostAndPort.fromParts(InetAddress.getLocalHost().getHostName(),
serverAddress.address.getPort()));
-      } catch (UnknownHostException e) {
-        throw new TTransportException(e);
-      }
-    }
-    return serverAddress;
-  }
-
-  // Existing connections will keep our thread running: reach in with reflection and insist
that they shutdown.
-  public static void stopTServer(TServer s) {
-    if (s == null)
-      return;
-    s.stop();
-    try {
-      Field f = s.getClass().getDeclaredField("executorService_");
-      f.setAccessible(true);
-      ExecutorService es = (ExecutorService) f.get(s);
-      es.shutdownNow();
-    } catch (Exception e) {
-      TServerUtils.log.error("Unable to call shutdownNow", e);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/base/src/main/java/org/apache/accumulo/server/thrift/TimedProcessor.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/thrift/TimedProcessor.java
b/server/base/src/main/java/org/apache/accumulo/server/thrift/TimedProcessor.java
deleted file mode 100644
index 56c235c..0000000
--- a/server/base/src/main/java/org/apache/accumulo/server/thrift/TimedProcessor.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.server.thrift;
-
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
-import org.apache.accumulo.server.metrics.Metrics;
-import org.apache.accumulo.server.metrics.MetricsFactory;
-import org.apache.accumulo.server.metrics.ThriftMetrics;
-import org.apache.thrift.TException;
-import org.apache.thrift.TProcessor;
-import org.apache.thrift.protocol.TProtocol;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A {@link TProcessor} which tracks the duration of an RPC and adds it to the metrics subsystem.
- */
-public class TimedProcessor implements TProcessor {
-  private static final Logger log = LoggerFactory.getLogger(TimedProcessor.class);
-
-  private final TProcessor other;
-  private final Metrics metrics;
-  private long idleStart = 0;
-
-  public TimedProcessor(AccumuloConfiguration conf, TProcessor next, String serverName, String
threadName) {
-    this.other = next;
-    // Register the metrics MBean
-    MetricsFactory factory = new MetricsFactory(conf);
-    metrics = factory.createThriftMetrics(serverName, threadName);
-    try {
-      metrics.register();
-    } catch (Exception e) {
-      log.error("Exception registering MBean with MBean Server", e);
-    }
-    idleStart = System.currentTimeMillis();
-  }
-
-  @Override
-  public boolean process(TProtocol in, TProtocol out) throws TException {
-    long now = 0;
-    final boolean metricsEnabled = metrics.isEnabled();
-    if (metricsEnabled) {
-      now = System.currentTimeMillis();
-      metrics.add(ThriftMetrics.idle, (now - idleStart));
-    }
-    try {
-      return other.process(in, out);
-    } finally {
-      if (metricsEnabled) {
-        idleStart = System.currentTimeMillis();
-        metrics.add(ThriftMetrics.execute, idleStart - now);
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
b/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
index 9646991..1e25e44 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
@@ -43,13 +43,13 @@ import org.apache.accumulo.core.data.thrift.TColumn;
 import org.apache.accumulo.core.data.thrift.TKeyExtent;
 import org.apache.accumulo.core.data.thrift.TRange;
 import org.apache.accumulo.core.metadata.MetadataServicer;
+import org.apache.accumulo.core.rpc.ThriftUtil;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
 import org.apache.accumulo.core.trace.Tracer;
 import org.apache.accumulo.core.trace.thrift.TInfo;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
index 337c055..75bf953 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
@@ -18,7 +18,7 @@ package org.apache.accumulo.server.util;
 
 import java.util.concurrent.ExecutorService;
 
-import org.apache.accumulo.server.thrift.TServerUtils;
+import org.apache.accumulo.server.rpc.TServerUtils;
 import org.apache.thrift.server.TServer;
 import org.apache.thrift.transport.TServerSocket;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
----------------------------------------------------------------------
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
index 774548e..5aee0c5 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
@@ -48,6 +48,7 @@ import org.apache.accumulo.core.replication.ReplicationTable;
 import org.apache.accumulo.core.replication.ReplicationTableOfflineException;
 import org.apache.accumulo.core.replication.StatusUtil;
 import org.apache.accumulo.core.replication.proto.Replication.Status;
+import org.apache.accumulo.core.rpc.ThriftUtil;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.tabletserver.log.LogEntry;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
@@ -56,7 +57,6 @@ import org.apache.accumulo.core.trace.Span;
 import org.apache.accumulo.core.trace.Trace;
 import org.apache.accumulo.core.trace.Tracer;
 import org.apache.accumulo.core.util.AddressUtil;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.ServerConstants;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
----------------------------------------------------------------------
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
index bbb6306..206b5db 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
@@ -91,9 +91,9 @@ import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.fs.VolumeManager.FileType;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
 import org.apache.accumulo.server.fs.VolumeUtil;
+import org.apache.accumulo.server.rpc.RpcWrapper;
+import org.apache.accumulo.server.rpc.TServerUtils;
 import org.apache.accumulo.server.tables.TableManager;
-import org.apache.accumulo.server.thrift.RpcWrapper;
-import org.apache.accumulo.server.thrift.TServerUtils;
 import org.apache.accumulo.server.util.Halt;
 import org.apache.accumulo.server.util.TabletIterator;
 import org.apache.accumulo.server.zookeeper.ZooLock;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
----------------------------------------------------------------------
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
index d99da6a..83b1d54 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
@@ -43,6 +43,7 @@ import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.Lo
 import org.apache.accumulo.core.replication.ReplicationTable;
 import org.apache.accumulo.core.replication.StatusUtil;
 import org.apache.accumulo.core.replication.proto.Replication.Status;
+import org.apache.accumulo.core.rpc.ThriftUtil;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.tabletserver.log.LogEntry;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
@@ -50,7 +51,6 @@ import org.apache.accumulo.core.trace.Span;
 import org.apache.accumulo.core.trace.Trace;
 import org.apache.accumulo.core.trace.Tracer;
 import org.apache.accumulo.core.trace.thrift.TInfo;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/master/src/main/java/org/apache/accumulo/master/Master.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 9f6a2c0..977bb1d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -117,14 +117,14 @@ import org.apache.accumulo.server.master.state.ZooStore;
 import org.apache.accumulo.server.master.state.ZooTabletStateStore;
 import org.apache.accumulo.server.metrics.Metrics;
 import org.apache.accumulo.server.replication.ZooKeeperInitialization;
+import org.apache.accumulo.server.rpc.RpcWrapper;
+import org.apache.accumulo.server.rpc.ServerAddress;
+import org.apache.accumulo.server.rpc.TServerUtils;
 import org.apache.accumulo.server.security.AuditedSecurityOperation;
 import org.apache.accumulo.server.security.SecurityOperation;
 import org.apache.accumulo.server.security.handler.ZKPermHandler;
 import org.apache.accumulo.server.tables.TableManager;
 import org.apache.accumulo.server.tables.TableObserver;
-import org.apache.accumulo.server.thrift.RpcWrapper;
-import org.apache.accumulo.server.thrift.ServerAddress;
-import org.apache.accumulo.server.thrift.TServerUtils;
 import org.apache.accumulo.server.util.DefaultMap;
 import org.apache.accumulo.server.util.Halt;
 import org.apache.accumulo.server.util.MetadataTableUtil;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index c761081..dd33a98 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@ -43,6 +43,7 @@ import org.apache.accumulo.core.master.thrift.MasterClientService;
 import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
 import org.apache.accumulo.core.master.thrift.TableInfo;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
+import org.apache.accumulo.core.rpc.ThriftUtil;
 import org.apache.accumulo.core.security.SecurityUtil;
 import org.apache.accumulo.core.tabletserver.thrift.ActiveScan;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Client;
@@ -53,7 +54,6 @@ import org.apache.accumulo.core.util.LoggingRunnable;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.ServerServices;
 import org.apache.accumulo.core.util.ServerServices.Service;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooLock.LockLossReason;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
index 7aefa1d..907d1f1 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
@@ -24,7 +24,7 @@ import java.util.TreeSet;
 
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.conf.SiteConfiguration;
-import org.apache.accumulo.core.util.TTimeoutTransport;
+import org.apache.accumulo.core.rpc.TTimeoutTransport;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.log4j.Logger;
 import org.apache.thrift.transport.TTransport;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
index ecb4ff7..e7ab43d 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
@@ -32,13 +32,13 @@ import org.apache.accumulo.core.master.thrift.DeadServer;
 import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
 import org.apache.accumulo.core.master.thrift.TableInfo;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
+import org.apache.accumulo.core.rpc.ThriftUtil;
 import org.apache.accumulo.core.tabletserver.thrift.ActionStats;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
 import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
 import org.apache.accumulo.core.trace.Tracer;
 import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.Duration;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.monitor.Monitor;
 import org.apache.accumulo.monitor.util.Table;
 import org.apache.accumulo.monitor.util.TableRow;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index d05f8d1..19d101e 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -107,6 +107,7 @@ import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
 import org.apache.accumulo.core.replication.ReplicationConstants;
 import org.apache.accumulo.core.replication.thrift.ReplicationServicer;
+import org.apache.accumulo.core.rpc.ThriftUtil;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.SecurityUtil;
 import org.apache.accumulo.core.security.thrift.TCredentials;
@@ -135,7 +136,6 @@ import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.ServerServices;
 import org.apache.accumulo.core.util.ServerServices.Service;
 import org.apache.accumulo.core.util.SimpleThreadPool;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
@@ -171,11 +171,11 @@ import org.apache.accumulo.server.metrics.Metrics;
 import org.apache.accumulo.server.problems.ProblemReport;
 import org.apache.accumulo.server.problems.ProblemReports;
 import org.apache.accumulo.server.replication.ZooKeeperInitialization;
+import org.apache.accumulo.server.rpc.RpcWrapper;
+import org.apache.accumulo.server.rpc.ServerAddress;
+import org.apache.accumulo.server.rpc.TServerUtils;
 import org.apache.accumulo.server.security.AuditedSecurityOperation;
 import org.apache.accumulo.server.security.SecurityOperation;
-import org.apache.accumulo.server.thrift.RpcWrapper;
-import org.apache.accumulo.server.thrift.ServerAddress;
-import org.apache.accumulo.server.thrift.TServerUtils;
 import org.apache.accumulo.server.util.FileSystemMonitor;
 import org.apache.accumulo.server.util.Halt;
 import org.apache.accumulo.server.util.MasterMetadataUtil;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/server/tserver/src/main/java/org/apache/accumulo/tserver/session/Session.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/Session.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/Session.java
index 3762a83..dfe38e4 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/Session.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/Session.java
@@ -17,7 +17,7 @@
 package org.apache.accumulo.tserver.session;
 
 import org.apache.accumulo.core.security.thrift.TCredentials;
-import org.apache.accumulo.server.thrift.TServerUtils;
+import org.apache.accumulo.server.rpc.TServerUtils;
 
 public class Session {
   public final String client;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/test/src/main/java/org/apache/accumulo/test/WrongTabletTest.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/WrongTabletTest.java b/test/src/main/java/org/apache/accumulo/test/WrongTabletTest.java
index 3cf4098..f6f2571 100644
--- a/test/src/main/java/org/apache/accumulo/test/WrongTabletTest.java
+++ b/test/src/main/java/org/apache/accumulo/test/WrongTabletTest.java
@@ -20,11 +20,11 @@ import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.impl.ClientContext;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Mutation;
+import org.apache.accumulo.core.rpc.ThriftUtil;
 import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.tabletserver.thrift.TDurability;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
 import org.apache.accumulo.core.trace.Tracer;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.server.conf.ServerConfigurationFactory;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java b/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
index 8e14bf2..eb84533 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
@@ -40,8 +40,8 @@ import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.ServerConfigurationFactory;
-import org.apache.accumulo.server.thrift.ServerAddress;
-import org.apache.accumulo.server.thrift.TServerUtils;
+import org.apache.accumulo.server.rpc.ServerAddress;
+import org.apache.accumulo.server.rpc.TServerUtils;
 import org.apache.accumulo.server.zookeeper.TransactionWatcher;
 import org.apache.accumulo.server.zookeeper.ZooLock;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
b/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
index b311358..2ebc2e3 100644
--- a/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
+++ b/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
@@ -69,7 +69,7 @@ import org.apache.accumulo.server.master.state.MetaDataStateStore;
 import org.apache.accumulo.server.master.state.MetaDataTableScanner;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletLocationState;
-import org.apache.accumulo.server.thrift.TServerUtils;
+import org.apache.accumulo.server.rpc.TServerUtils;
 import org.apache.accumulo.server.zookeeper.TransactionWatcher;
 import org.apache.hadoop.io.Text;
 import org.apache.thrift.TException;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/test/src/test/java/org/apache/accumulo/test/TotalQueuedIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/TotalQueuedIT.java b/test/src/test/java/org/apache/accumulo/test/TotalQueuedIT.java
index 8cb0290..586ab5e 100644
--- a/test/src/test/java/org/apache/accumulo/test/TotalQueuedIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/TotalQueuedIT.java
@@ -27,8 +27,8 @@ import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
+import org.apache.accumulo.core.rpc.ThriftUtil;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.minicluster.MemoryUnit;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/de1d3ee3/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
b/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
index f2733ce..7f42aa0 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
@@ -41,11 +41,11 @@ import org.apache.accumulo.core.metadata.schema.MetadataSchema;
 import org.apache.accumulo.core.protobuf.ProtobufUtil;
 import org.apache.accumulo.core.replication.ReplicationTable;
 import org.apache.accumulo.core.replication.proto.Replication.Status;
+import org.apache.accumulo.core.rpc.ThriftUtil;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Client;
 import org.apache.accumulo.core.trace.Tracer;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.test.functional.AbstractMacIT;
 import org.apache.accumulo.test.functional.ConfigurableMacIT;


Mime
View raw message