You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by dl...@apache.org on 2025/01/31 15:27:46 UTC
(accumulo) branch 3.1 updated (e0478b44df -> 9fee5991fb)
This is an automated email from the ASF dual-hosted git repository.
dlmarion pushed a change to branch 3.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git
from e0478b44df Merge remote-tracking branch 'upstream/2.1' into 3.1
add f8fb87291b Enable graceful shutdown of server processes (#5193)
new 9fee5991fb Merge branch '2.1' into 3.1
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../accumulo/core/lock/ServiceLockSupport.java | 30 +-
....java => ServerProcessServiceThriftClient.java} | 37 +-
.../core/rpc/clients/ThriftClientTypes.java | 3 +
.../core/util/threads/ThreadPoolNames.java | 1 +
core/src/main/scripts/generate-thrift.sh | 2 +-
core/src/main/spotbugs/exclude-filter.xml | 1 +
.../core/manager/thrift/ManagerClientService.java | 1271 ++++++++++++++++++++
.../core/process/thrift/ServerProcessService.java | 619 ++++++++++
core/src/main/thrift/manager.thrift | 9 +
.../process.thrift} | 14 +-
.../MiniAccumuloClusterControl.java | 64 +
.../org/apache/accumulo/server/AbstractServer.java | 66 +-
.../accumulo/server/manager/LiveTServerSet.java | 22 +-
.../accumulo/server/rpc/ThriftProcessorTypes.java | 41 +-
.../org/apache/accumulo/server/util/Admin.java | 33 +
.../server/zookeeper/DistributedWorkQueue.java | 26 +-
.../coordinator/CompactionCoordinator.java | 73 +-
.../org/apache/accumulo/compactor/Compactor.java | 325 ++---
.../apache/accumulo/gc/SimpleGarbageCollector.java | 221 ++--
.../java/org/apache/accumulo/manager/Manager.java | 38 +-
.../manager/ManagerClientServiceHandler.java | 12 +
.../accumulo/manager/recovery/RecoveryManager.java | 4 +-
.../apache/accumulo/monitor/EmbeddedWebServer.java | 2 +-
.../java/org/apache/accumulo/monitor/Monitor.java | 19 +-
.../org/apache/accumulo/tserver/ScanServer.java | 55 +-
.../org/apache/accumulo/tserver/TabletServer.java | 117 +-
.../org/apache/accumulo/tserver/log/LogSorter.java | 6 +-
.../apache/accumulo/tserver/ScanServerTest.java | 8 +-
.../accumulo/test/SelfStoppingScanServer.java | 5 +-
.../test/compaction/ExternalCompactionTServer.java | 3 +-
.../compaction/ExternalDoNothingCompactor.java | 6 +-
.../TestCompactionCoordinatorForOfflineTable.java | 3 +-
.../accumulo/test/fate/FlakyFateManager.java | 3 +-
.../test/functional/GracefulShutdownIT.java | 273 +++++
.../test/functional/HalfDeadServerWatcherIT.java | 4 +-
35 files changed, 3009 insertions(+), 407 deletions(-)
copy core/src/main/java/org/apache/accumulo/core/rpc/clients/{ManagerClient.java => ServerProcessServiceThriftClient.java} (60%)
create mode 100644 core/src/main/thrift-gen-java/org/apache/accumulo/core/process/thrift/ServerProcessService.java
copy core/src/main/{java/org/apache/accumulo/core/fate/StackOverflowException.java => thrift/process.thrift} (76%)
create mode 100644 test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java
(accumulo) 01/01: Merge branch '2.1' into 3.1
Posted by dl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dlmarion pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 9fee5991fbd219442cf2ef40a04757ac208945c3
Merge: e0478b44df f8fb87291b
Author: Dave Marion <dl...@apache.org>
AuthorDate: Fri Jan 31 15:27:34 2025 +0000
Merge branch '2.1' into 3.1
.../accumulo/core/lock/ServiceLockSupport.java | 30 +-
.../clients/ServerProcessServiceThriftClient.java | 55 +
.../core/rpc/clients/ThriftClientTypes.java | 3 +
.../core/util/threads/ThreadPoolNames.java | 1 +
core/src/main/scripts/generate-thrift.sh | 2 +-
core/src/main/spotbugs/exclude-filter.xml | 1 +
.../core/manager/thrift/ManagerClientService.java | 1271 ++++++++++++++++++++
.../core/process/thrift/ServerProcessService.java | 619 ++++++++++
core/src/main/thrift/manager.thrift | 9 +
core/src/main/thrift/process.thrift | 31 +
.../MiniAccumuloClusterControl.java | 64 +
.../org/apache/accumulo/server/AbstractServer.java | 66 +-
.../accumulo/server/manager/LiveTServerSet.java | 22 +-
.../accumulo/server/rpc/ThriftProcessorTypes.java | 41 +-
.../org/apache/accumulo/server/util/Admin.java | 33 +
.../server/zookeeper/DistributedWorkQueue.java | 26 +-
.../coordinator/CompactionCoordinator.java | 73 +-
.../org/apache/accumulo/compactor/Compactor.java | 325 ++---
.../apache/accumulo/gc/SimpleGarbageCollector.java | 221 ++--
.../java/org/apache/accumulo/manager/Manager.java | 38 +-
.../manager/ManagerClientServiceHandler.java | 12 +
.../accumulo/manager/recovery/RecoveryManager.java | 4 +-
.../apache/accumulo/monitor/EmbeddedWebServer.java | 2 +-
.../java/org/apache/accumulo/monitor/Monitor.java | 19 +-
.../org/apache/accumulo/tserver/ScanServer.java | 55 +-
.../org/apache/accumulo/tserver/TabletServer.java | 117 +-
.../org/apache/accumulo/tserver/log/LogSorter.java | 6 +-
.../apache/accumulo/tserver/ScanServerTest.java | 8 +-
.../accumulo/test/SelfStoppingScanServer.java | 5 +-
.../test/compaction/ExternalCompactionTServer.java | 3 +-
.../compaction/ExternalDoNothingCompactor.java | 6 +-
.../TestCompactionCoordinatorForOfflineTable.java | 3 +-
.../accumulo/test/fate/FlakyFateManager.java | 3 +-
.../test/functional/GracefulShutdownIT.java | 273 +++++
.../test/functional/HalfDeadServerWatcherIT.java | 4 +-
35 files changed, 3074 insertions(+), 377 deletions(-)
diff --cc core/src/main/java/org/apache/accumulo/core/rpc/clients/ServerProcessServiceThriftClient.java
index 0000000000,d512bd2766..de21d8d8bc
mode 000000,100644..100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/clients/ServerProcessServiceThriftClient.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/clients/ServerProcessServiceThriftClient.java
@@@ -1,0 -1,54 +1,55 @@@
+ /*
+ * 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
+ *
+ * https://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.core.rpc.clients;
+
+ import java.io.UncheckedIOException;
+ import java.net.UnknownHostException;
+
+ import org.apache.accumulo.core.clientImpl.ClientContext;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService.Client;
+ import org.apache.accumulo.core.rpc.ThriftUtil;
-import org.apache.accumulo.core.util.HostAndPort;
+ import org.apache.thrift.transport.TTransportException;
+ import org.slf4j.Logger;
+
++import com.google.common.net.HostAndPort;
++
+ public class ServerProcessServiceThriftClient extends ThriftClientTypes<Client> {
+
+ protected ServerProcessServiceThriftClient(String serviceName) {
+ super(serviceName, new Client.Factory());
+ }
+
+ public Client getServerProcessConnection(ClientContext context, Logger log, String hostname,
+ int port) {
+ HostAndPort serverProcess = HostAndPort.fromParts(hostname, port);
+ try {
+ // Manager requests can take a long time: don't ever time out
+ return ThriftUtil.getClientNoTimeout(this, serverProcess, context);
+ } catch (TTransportException tte) {
+ Throwable cause = tte.getCause();
+ if (cause instanceof UnknownHostException) {
+ // do not expect to recover from this
+ throw new UncheckedIOException((UnknownHostException) cause);
+ }
+ log.debug("Failed to connect to process at " + serverProcess + ", will retry... ", tte);
+ return null;
+ }
+
+ }
+ }
diff --cc core/src/main/java/org/apache/accumulo/core/rpc/clients/ThriftClientTypes.java
index d7f34c4846,5df2223928..5b9a5c203d
--- a/core/src/main/java/org/apache/accumulo/core/rpc/clients/ThriftClientTypes.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/clients/ThriftClientTypes.java
@@@ -52,12 -58,9 +52,15 @@@ public abstract class ThriftClientTypes
public static final TabletScanClientServiceThriftClient TABLET_SCAN =
new TabletScanClientServiceThriftClient("scan");
+ public static final TabletIngestClientServiceThriftClient TABLET_INGEST =
+ new TabletIngestClientServiceThriftClient("ingest");
+
+ public static final TabletManagementClientServiceThriftClient TABLET_MGMT =
+ new TabletManagementClientServiceThriftClient("tablet");
+
+ public static final ServerProcessServiceThriftClient SERVER_PROCESS =
+ new ServerProcessServiceThriftClient("process");
+
/**
* execute method with supplied client returning object of type R
*
diff --cc core/src/main/java/org/apache/accumulo/core/util/threads/ThreadPoolNames.java
index a27ae864ea,43a4a24b70..c2dd16e67e
--- a/core/src/main/java/org/apache/accumulo/core/util/threads/ThreadPoolNames.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/threads/ThreadPoolNames.java
@@@ -50,8 -56,10 +50,9 @@@ public enum ThreadPoolNames
SPLIT_POOL("accumulo.pool.table.ops.add.splits"),
TABLET_ASSIGNMENT_POOL("accumulo.pool.tablet.assignment.pool"),
TSERVER_ASSIGNMENT_POOL("accumulo.pool.tserver.assignment"),
- TSERVER_COMPACTION_MINOR_POOL("accumulo.pool.tserver.compaction.minor"),
TSERVER_MIGRATIONS_POOL("accumulo.pool.tserver.migrations"),
TSERVER_MINOR_COMPACTOR_POOL("accumulo.pool.tserver.minor.compactor"),
+ TSERVER_SHUTDOWN_UNLOAD_TABLET_POOL("accumulo.pool.tserver.shutdown.tablet.unload"),
TSERVER_SUMMARY_FILE_RETRIEVER_POOL("accumulo.pool.tserver.summary.file.retriever.pool"),
TSERVER_SUMMARY_PARTITION_POOL("accumulo.pool.tserver.summary.partition"),
TSERVER_SUMMARY_REMOTE_POOL("accumulo.pool.tserver.summary.remote"),
diff --cc core/src/main/scripts/generate-thrift.sh
index 0ad5911a33,2c9ad16132..1f787d4652
--- a/core/src/main/scripts/generate-thrift.sh
+++ b/core/src/main/scripts/generate-thrift.sh
@@@ -32,7 -32,7 +32,7 @@@
[[ -z $REQUIRED_THRIFT_VERSION ]] && REQUIRED_THRIFT_VERSION='0.17.0'
[[ -z $INCLUDED_MODULES ]] && INCLUDED_MODULES=()
[[ -z $BASE_OUTPUT_PACKAGE ]] && BASE_OUTPUT_PACKAGE='org.apache.accumulo.core'
- [[ -z $PACKAGES_TO_GENERATE ]] && PACKAGES_TO_GENERATE=(gc manager tabletserver securityImpl clientImpl dataImpl compaction tabletingest tablet tabletscan)
-[[ -z $PACKAGES_TO_GENERATE ]] && PACKAGES_TO_GENERATE=(process gc master manager tabletserver securityImpl clientImpl dataImpl replication trace compaction)
++[[ -z $PACKAGES_TO_GENERATE ]] && PACKAGES_TO_GENERATE=(process gc manager tabletserver securityImpl clientImpl dataImpl compaction tabletingest tablet tabletscan)
[[ -z $BUILD_DIR ]] && BUILD_DIR='target'
[[ -z $LANGUAGES_TO_GENERATE ]] && LANGUAGES_TO_GENERATE=(java)
[[ -z $FINAL_DIR ]] && FINAL_DIR='src/main'
diff --cc core/src/main/spotbugs/exclude-filter.xml
index ded70a98dc,f1776b3060..9ecf1f7117
--- a/core/src/main/spotbugs/exclude-filter.xml
+++ b/core/src/main/spotbugs/exclude-filter.xml
@@@ -32,10 -31,10 +32,11 @@@
<Package name="org.apache.accumulo.core.dataImpl.thrift" />
<Package name="org.apache.accumulo.core.gc.thrift" />
<Package name="org.apache.accumulo.core.manager.thrift" />
- <Package name="org.apache.accumulo.core.master.thrift" />
+ <Package name="org.apache.accumulo.core.process.thrift" />
- <Package name="org.apache.accumulo.core.replication.thrift" />
<Package name="org.apache.accumulo.core.securityImpl.thrift" />
+ <Package name="org.apache.accumulo.core.tablet.thrift" />
+ <Package name="org.apache.accumulo.core.tabletingest.thrift" />
+ <Package name="org.apache.accumulo.core.tabletscan.thrift" />
<Package name="org.apache.accumulo.core.tabletserver.thrift" />
<Package name="org.apache.accumulo.core.trace.thrift" />
</Or>
diff --cc core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/ManagerClientService.java
index b2c82b5038,60e46630d5..36e4b66b53
--- a/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/ManagerClientService.java
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/ManagerClientService.java
@@@ -29,89 -29,97 +29,93 @@@ public class ManagerClientService
public interface Iface {
- public long initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public long initiateFlush(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, long flushID, long maxLoops) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, [...]
+ public void waitForFlush(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, long flushID, long maxLoops) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceExcept [...]
- public void setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, ThriftPropertyException, org.apa [...]
+ public void setTableProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, ThriftPropertyException, or [...]
- public void modifyTableProperties(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, o [...]
+ public void modifyTableProperties(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceExcepti [...]
- public void removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void removeTableProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, ThriftPropertyException, org.apache [...]
+ public void setNamespaceProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, ThriftPropertyException, org.a [...]
- public void modifyNamespaceProperties(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org. [...]
+ public void modifyNamespaceProperties(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, [...]
- public void removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void removeNamespaceProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void setManagerGoalState(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, ManagerGoalState state) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void setManagerGoalState(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, ManagerGoalState state) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void shutdown(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, boolean stopTabletServers) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void shutdown(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, boolean stopTabletServers) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer, boolean force) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void shutdownTabletServer(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer, boolean force) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void tabletServerStopping(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
++ public void tabletServerStopping(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+
- public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, ThriftPropertyException, org.apache.thrift.TException;
+ public void setSystemProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, ThriftPropertyException, org.apache.thrift.TException;
- public void modifySystemProperties(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.accumulo.core.clientImpl.thrift.ThriftConcurrentModificationException, ThriftPropertyExcept [...]
+ public void modifySystemProperties(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.accumulo.core.clientImpl.thrift.ThriftConcurrentModificationException, ThriftPropertyE [...]
- public void removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void removeSystemProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public ManagerMonitorInfo getManagerStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public ManagerMonitorInfo getManagerStats(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void waitForBalance(org.apache.accumulo.core.trace.thrift.TInfo tinfo) throws org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void waitForBalance(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo) throws org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void reportSplitExtent(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String serverName, TabletSplit split) throws org.apache.thrift.TException;
+ public void reportSplitExtent(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String serverName, TabletSplit split) throws org.apache.thrift.TException;
- public void reportTabletStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String serverName, TabletLoadState status, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent tablet) throws org.apache.thrift.TException;
+ public void reportTabletStatus(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String serverName, TabletLoadState status, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent tablet) throws org.apache.thrift.TException;
- public java.util.List<java.lang.String> getActiveTservers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public java.util.List<java.lang.String> getActiveTservers(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public org.apache.accumulo.core.securityImpl.thrift.TDelegationToken getDelegationToken(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.securityImpl.thrift.TDelegationTokenConfig cfg) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
-
- public boolean drainReplicationTable(org.apache.accumulo.core.trace.thrift.TInfo tfino, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.util.Set<java.lang.String> logsToWatch) throws org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public org.apache.accumulo.core.securityImpl.thrift.TDelegationToken getDelegationToken(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.securityImpl.thrift.TDelegationTokenConfig cfg) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
}
public interface AsyncIface {
- public void initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
-
- public void waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, long flushID, long maxLoops, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void initiateFlush(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
- public void setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void waitForFlush(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, long flushID, long maxLoops, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void modifyTableProperties(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void setTableProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void modifyTableProperties(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void removeTableProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void modifyNamespaceProperties(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void setNamespaceProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void modifyNamespaceProperties(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setManagerGoalState(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, ManagerGoalState state, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void removeNamespaceProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void shutdown(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, boolean stopTabletServers, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void setManagerGoalState(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, ManagerGoalState state, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer, boolean force, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void shutdown(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, boolean stopTabletServers, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void tabletServerStopping(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void shutdownTabletServer(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer, boolean force, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
++ public void tabletServerStopping(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+
- public void modifySystemProperties(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void setSystemProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void modifySystemProperties(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties vProperties, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getManagerStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<ManagerMonitorInfo> resultHandler) throws org.apache.thrift.TException;
+ public void removeSystemProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void waitForBalance(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void getManagerStats(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<ManagerMonitorInfo> resultHandler) throws org.apache.thrift.TException;
- public void reportSplitExtent(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String serverName, TabletSplit split, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void waitForBalance(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void reportTabletStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String serverName, TabletLoadState status, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent tablet, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void reportSplitExtent(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String serverName, TabletSplit split, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getActiveTservers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
+ public void reportTabletStatus(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String serverName, TabletLoadState status, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent tablet, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getDelegationToken(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.securityImpl.thrift.TDelegationTokenConfig cfg, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.securityImpl.thrift.TDelegationToken> resultHandler) throws org.apache.thrift.TException;
+ public void getActiveTservers(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void drainReplicationTable(org.apache.accumulo.core.trace.thrift.TInfo tfino, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tableName, java.util.Set<java.lang.String> logsToWatch, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+ public void getDelegationToken(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.securityImpl.thrift.TDelegationTokenConfig cfg, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.securityImpl.thrift.TDelegationToken> resultHandler) throws org.apache.thrift.TException;
}
@@@ -511,8 -519,37 +515,37 @@@
return;
}
+ @Override
- public void tabletServerStopping(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
++ public void tabletServerStopping(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ {
+ send_tabletServerStopping(tinfo, credentials, tabletServer);
+ recv_tabletServerStopping();
+ }
+
- public void send_tabletServerStopping(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer) throws org.apache.thrift.TException
++ public void send_tabletServerStopping(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer) throws org.apache.thrift.TException
+ {
+ tabletServerStopping_args args = new tabletServerStopping_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setTabletServer(tabletServer);
+ sendBase("tabletServerStopping", args);
+ }
+
+ public void recv_tabletServerStopping() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ {
+ tabletServerStopping_result result = new tabletServerStopping_result();
+ receiveBase(result, "tabletServerStopping");
+ if (result.sec != null) {
+ throw result.sec;
+ }
+ if (result.tnase != null) {
+ throw result.tnase;
+ }
+ return;
+ }
+
@Override
- public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, ThriftPropertyException, org.apache.thrift.TException
+ public void setSystemProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, ThriftPropertyException, org.apache.thrift.TException
{
send_setSystemProperty(tinfo, credentials, property, value);
recv_setSystemProperty();
@@@ -1278,8 -1345,50 +1311,50 @@@
}
}
+ @Override
- public void tabletServerStopping(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
++ public void tabletServerStopping(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ tabletServerStopping_call method_call = new tabletServerStopping_call(tinfo, credentials, tabletServer, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class tabletServerStopping_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
- private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
++ private org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo;
+ private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials;
+ private java.lang.String tabletServer;
- public tabletServerStopping_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
++ public tabletServerStopping_call(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String tabletServer, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.tinfo = tinfo;
+ this.credentials = credentials;
+ this.tabletServer = tabletServer;
+ }
+
+ @Override
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("tabletServerStopping", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ tabletServerStopping_args args = new tabletServerStopping_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setTabletServer(tabletServer);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ @Override
+ public Void getResult() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new java.lang.IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_tabletServerStopping();
+ return null;
+ }
+ }
+
@Override
- public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ public void setSystemProperty(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
setSystemProperty_call method_call = new setSystemProperty_call(tinfo, credentials, property, value, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
@@@ -18727,6 -19097,1092 +18912,1092 @@@
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class tabletServerStopping_args implements org.apache.thrift.TBase<tabletServerStopping_args, tabletServerStopping_args._Fields>, java.io.Serializable, Cloneable, Comparable<tabletServerStopping_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("tabletServerStopping_args");
+
+ private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField TABLET_SERVER_FIELD_DESC = new org.apache.thrift.protocol.TField("tabletServer", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new tabletServerStopping_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new tabletServerStopping_argsTupleSchemeFactory();
+
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.thrift.TInfo tinfo; // required
++ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String tabletServer; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ TINFO((short)1, "tinfo"),
+ CREDENTIALS((short)2, "credentials"),
+ TABLET_SERVER((short)3, "tabletServer");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TINFO
+ return TINFO;
+ case 2: // CREDENTIALS
+ return CREDENTIALS;
+ case 3: // TABLET_SERVER
+ return TABLET_SERVER;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.trace.thrift.TInfo.class)));
++ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.TInfo.class)));
+ tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.securityImpl.thrift.TCredentials.class)));
+ tmpMap.put(_Fields.TABLET_SERVER, new org.apache.thrift.meta_data.FieldMetaData("tabletServer", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(tabletServerStopping_args.class, metaDataMap);
+ }
+
+ public tabletServerStopping_args() {
+ }
+
+ public tabletServerStopping_args(
- org.apache.accumulo.core.trace.thrift.TInfo tinfo,
++ org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
+ org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
+ java.lang.String tabletServer)
+ {
+ this();
+ this.tinfo = tinfo;
+ this.credentials = credentials;
+ this.tabletServer = tabletServer;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public tabletServerStopping_args(tabletServerStopping_args other) {
+ if (other.isSetTinfo()) {
- this.tinfo = new org.apache.accumulo.core.trace.thrift.TInfo(other.tinfo);
++ this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
+ }
+ if (other.isSetCredentials()) {
+ this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
+ }
+ if (other.isSetTabletServer()) {
+ this.tabletServer = other.tabletServer;
+ }
+ }
+
+ @Override
+ public tabletServerStopping_args deepCopy() {
+ return new tabletServerStopping_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.tinfo = null;
+ this.credentials = null;
+ this.tabletServer = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.trace.thrift.TInfo getTinfo() {
++ public org.apache.accumulo.core.clientImpl.thrift.TInfo getTinfo() {
+ return this.tinfo;
+ }
+
- public tabletServerStopping_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.thrift.TInfo tinfo) {
++ public tabletServerStopping_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo) {
+ this.tinfo = tinfo;
+ return this;
+ }
+
+ public void unsetTinfo() {
+ this.tinfo = null;
+ }
+
+ /** Returns true if field tinfo is set (has been assigned a value) and false otherwise */
+ public boolean isSetTinfo() {
+ return this.tinfo != null;
+ }
+
+ public void setTinfoIsSet(boolean value) {
+ if (!value) {
+ this.tinfo = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
+ return this.credentials;
+ }
+
+ public tabletServerStopping_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) {
+ this.credentials = credentials;
+ return this;
+ }
+
+ public void unsetCredentials() {
+ this.credentials = null;
+ }
+
+ /** Returns true if field credentials is set (has been assigned a value) and false otherwise */
+ public boolean isSetCredentials() {
+ return this.credentials != null;
+ }
+
+ public void setCredentialsIsSet(boolean value) {
+ if (!value) {
+ this.credentials = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getTabletServer() {
+ return this.tabletServer;
+ }
+
+ public tabletServerStopping_args setTabletServer(@org.apache.thrift.annotation.Nullable java.lang.String tabletServer) {
+ this.tabletServer = tabletServer;
+ return this;
+ }
+
+ public void unsetTabletServer() {
+ this.tabletServer = null;
+ }
+
+ /** Returns true if field tabletServer is set (has been assigned a value) and false otherwise */
+ public boolean isSetTabletServer() {
+ return this.tabletServer != null;
+ }
+
+ public void setTabletServerIsSet(boolean value) {
+ if (!value) {
+ this.tabletServer = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case TINFO:
+ if (value == null) {
+ unsetTinfo();
+ } else {
- setTinfo((org.apache.accumulo.core.trace.thrift.TInfo)value);
++ setTinfo((org.apache.accumulo.core.clientImpl.thrift.TInfo)value);
+ }
+ break;
+
+ case CREDENTIALS:
+ if (value == null) {
+ unsetCredentials();
+ } else {
+ setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
+ }
+ break;
+
+ case TABLET_SERVER:
+ if (value == null) {
+ unsetTabletServer();
+ } else {
+ setTabletServer((java.lang.String)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TINFO:
+ return getTinfo();
+
+ case CREDENTIALS:
+ return getCredentials();
+
+ case TABLET_SERVER:
+ return getTabletServer();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TINFO:
+ return isSetTinfo();
+ case CREDENTIALS:
+ return isSetCredentials();
+ case TABLET_SERVER:
+ return isSetTabletServer();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof tabletServerStopping_args)
+ return this.equals((tabletServerStopping_args)that);
+ return false;
+ }
+
+ public boolean equals(tabletServerStopping_args that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_tinfo = true && this.isSetTinfo();
+ boolean that_present_tinfo = true && that.isSetTinfo();
+ if (this_present_tinfo || that_present_tinfo) {
+ if (!(this_present_tinfo && that_present_tinfo))
+ return false;
+ if (!this.tinfo.equals(that.tinfo))
+ return false;
+ }
+
+ boolean this_present_credentials = true && this.isSetCredentials();
+ boolean that_present_credentials = true && that.isSetCredentials();
+ if (this_present_credentials || that_present_credentials) {
+ if (!(this_present_credentials && that_present_credentials))
+ return false;
+ if (!this.credentials.equals(that.credentials))
+ return false;
+ }
+
+ boolean this_present_tabletServer = true && this.isSetTabletServer();
+ boolean that_present_tabletServer = true && that.isSetTabletServer();
+ if (this_present_tabletServer || that_present_tabletServer) {
+ if (!(this_present_tabletServer && that_present_tabletServer))
+ return false;
+ if (!this.tabletServer.equals(that.tabletServer))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
+ if (isSetTinfo())
+ hashCode = hashCode * 8191 + tinfo.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetTabletServer()) ? 131071 : 524287);
+ if (isSetTabletServer())
+ hashCode = hashCode * 8191 + tabletServer.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(tabletServerStopping_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTinfo()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, other.tinfo);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCredentials()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetTabletServer(), other.isSetTabletServer());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTabletServer()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tabletServer, other.tabletServer);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("tabletServerStopping_args(");
+ boolean first = true;
+
+ sb.append("tinfo:");
+ if (this.tinfo == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tinfo);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("credentials:");
+ if (this.credentials == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.credentials);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("tabletServer:");
+ if (this.tabletServer == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tabletServer);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (tinfo != null) {
+ tinfo.validate();
+ }
+ if (credentials != null) {
+ credentials.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class tabletServerStopping_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public tabletServerStopping_argsStandardScheme getScheme() {
+ return new tabletServerStopping_argsStandardScheme();
+ }
+ }
+
+ private static class tabletServerStopping_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<tabletServerStopping_args> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, tabletServerStopping_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TINFO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.tinfo = new org.apache.accumulo.core.trace.thrift.TInfo();
++ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREDENTIALS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
+ struct.credentials.read(iprot);
+ struct.setCredentialsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TABLET_SERVER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.tabletServer = iprot.readString();
+ struct.setTabletServerIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, tabletServerStopping_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.tinfo != null) {
+ oprot.writeFieldBegin(TINFO_FIELD_DESC);
+ struct.tinfo.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.credentials != null) {
+ oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
+ struct.credentials.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tabletServer != null) {
+ oprot.writeFieldBegin(TABLET_SERVER_FIELD_DESC);
+ oprot.writeString(struct.tabletServer);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class tabletServerStopping_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public tabletServerStopping_argsTupleScheme getScheme() {
+ return new tabletServerStopping_argsTupleScheme();
+ }
+ }
+
+ private static class tabletServerStopping_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<tabletServerStopping_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, tabletServerStopping_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetTinfo()) {
+ optionals.set(0);
+ }
+ if (struct.isSetCredentials()) {
+ optionals.set(1);
+ }
+ if (struct.isSetTabletServer()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetTinfo()) {
+ struct.tinfo.write(oprot);
+ }
+ if (struct.isSetCredentials()) {
+ struct.credentials.write(oprot);
+ }
+ if (struct.isSetTabletServer()) {
+ oprot.writeString(struct.tabletServer);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, tabletServerStopping_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
- struct.tinfo = new org.apache.accumulo.core.trace.thrift.TInfo();
++ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
+ struct.credentials.read(iprot);
+ struct.setCredentialsIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.tabletServer = iprot.readString();
+ struct.setTabletServerIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class tabletServerStopping_result implements org.apache.thrift.TBase<tabletServerStopping_result, tabletServerStopping_result._Fields>, java.io.Serializable, Cloneable, Comparable<tabletServerStopping_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("tabletServerStopping_result");
+
+ private static final org.apache.thrift.protocol.TField SEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sec", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField TNASE_FIELD_DESC = new org.apache.thrift.protocol.TField("tnase", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new tabletServerStopping_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new tabletServerStopping_resultTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException tnase; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SEC((short)1, "sec"),
+ TNASE((short)2, "tnase");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // SEC
+ return SEC;
+ case 2: // TNASE
+ return TNASE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SEC, new org.apache.thrift.meta_data.FieldMetaData("sec", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException.class)));
+ tmpMap.put(_Fields.TNASE, new org.apache.thrift.meta_data.FieldMetaData("tnase", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(tabletServerStopping_result.class, metaDataMap);
+ }
+
+ public tabletServerStopping_result() {
+ }
+
+ public tabletServerStopping_result(
+ org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec,
+ org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException tnase)
+ {
+ this();
+ this.sec = sec;
+ this.tnase = tnase;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public tabletServerStopping_result(tabletServerStopping_result other) {
+ if (other.isSetSec()) {
+ this.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec);
+ }
+ if (other.isSetTnase()) {
+ this.tnase = new org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException(other.tnase);
+ }
+ }
+
+ @Override
+ public tabletServerStopping_result deepCopy() {
+ return new tabletServerStopping_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.sec = null;
+ this.tnase = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException getSec() {
+ return this.sec;
+ }
+
+ public tabletServerStopping_result setSec(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
+ this.sec = sec;
+ return this;
+ }
+
+ public void unsetSec() {
+ this.sec = null;
+ }
+
+ /** Returns true if field sec is set (has been assigned a value) and false otherwise */
+ public boolean isSetSec() {
+ return this.sec != null;
+ }
+
+ public void setSecIsSet(boolean value) {
+ if (!value) {
+ this.sec = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException getTnase() {
+ return this.tnase;
+ }
+
+ public tabletServerStopping_result setTnase(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException tnase) {
+ this.tnase = tnase;
+ return this;
+ }
+
+ public void unsetTnase() {
+ this.tnase = null;
+ }
+
+ /** Returns true if field tnase is set (has been assigned a value) and false otherwise */
+ public boolean isSetTnase() {
+ return this.tnase != null;
+ }
+
+ public void setTnaseIsSet(boolean value) {
+ if (!value) {
+ this.tnase = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case SEC:
+ if (value == null) {
+ unsetSec();
+ } else {
+ setSec((org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)value);
+ }
+ break;
+
+ case TNASE:
+ if (value == null) {
+ unsetTnase();
+ } else {
+ setTnase((org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SEC:
+ return getSec();
+
+ case TNASE:
+ return getTnase();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SEC:
+ return isSetSec();
+ case TNASE:
+ return isSetTnase();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof tabletServerStopping_result)
+ return this.equals((tabletServerStopping_result)that);
+ return false;
+ }
+
+ public boolean equals(tabletServerStopping_result that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_sec = true && this.isSetSec();
+ boolean that_present_sec = true && that.isSetSec();
+ if (this_present_sec || that_present_sec) {
+ if (!(this_present_sec && that_present_sec))
+ return false;
+ if (!this.sec.equals(that.sec))
+ return false;
+ }
+
+ boolean this_present_tnase = true && this.isSetTnase();
+ boolean that_present_tnase = true && that.isSetTnase();
+ if (this_present_tnase || that_present_tnase) {
+ if (!(this_present_tnase && that_present_tnase))
+ return false;
+ if (!this.tnase.equals(that.tnase))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
+ if (isSetSec())
+ hashCode = hashCode * 8191 + sec.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetTnase()) ? 131071 : 524287);
+ if (isSetTnase())
+ hashCode = hashCode * 8191 + tnase.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(tabletServerStopping_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetSec(), other.isSetSec());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSec()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, other.sec);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetTnase(), other.isSetTnase());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTnase()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tnase, other.tnase);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("tabletServerStopping_result(");
+ boolean first = true;
+
+ sb.append("sec:");
+ if (this.sec == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sec);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("tnase:");
+ if (this.tnase == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tnase);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class tabletServerStopping_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public tabletServerStopping_resultStandardScheme getScheme() {
+ return new tabletServerStopping_resultStandardScheme();
+ }
+ }
+
+ private static class tabletServerStopping_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<tabletServerStopping_result> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, tabletServerStopping_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // SEC
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TNASE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.tnase = new org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException();
+ struct.tnase.read(iprot);
+ struct.setTnaseIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, tabletServerStopping_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.sec != null) {
+ oprot.writeFieldBegin(SEC_FIELD_DESC);
+ struct.sec.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tnase != null) {
+ oprot.writeFieldBegin(TNASE_FIELD_DESC);
+ struct.tnase.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class tabletServerStopping_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public tabletServerStopping_resultTupleScheme getScheme() {
+ return new tabletServerStopping_resultTupleScheme();
+ }
+ }
+
+ private static class tabletServerStopping_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<tabletServerStopping_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, tabletServerStopping_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetSec()) {
+ optionals.set(0);
+ }
+ if (struct.isSetTnase()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSec()) {
+ struct.sec.write(oprot);
+ }
+ if (struct.isSetTnase()) {
+ struct.tnase.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, tabletServerStopping_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.tnase = new org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException();
+ struct.tnase.read(iprot);
+ struct.setTnaseIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
diff --cc core/src/main/thrift/manager.thrift
index a334e0e692,139e55fc1e..aea174bbf2
--- a/core/src/main/thrift/manager.thrift
+++ b/core/src/main/thrift/manager.thrift
@@@ -351,9 -290,18 +351,18 @@@ service ManagerClientService
1:client.ThriftSecurityException sec
2:client.ThriftNotActiveServiceException tnase
)
+
+ void tabletServerStopping(
- 1:trace.TInfo tinfo
++ 1:client.TInfo tinfo
+ 2:security.TCredentials credentials
+ 3:string tabletServer
+ ) throws (
+ 1:client.ThriftSecurityException sec
+ 2:client.ThriftNotActiveServiceException tnase
+ )
void setSystemProperty(
- 1:trace.TInfo tinfo
+ 1:client.TInfo tinfo
2:security.TCredentials credentials
3:string property
4:string value
diff --cc minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterControl.java
index 31ffd833f2,e34a8ae297..b8368c9e61
--- a/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterControl.java
@@@ -528,4 -529,69 +529,67 @@@ public class MiniAccumuloClusterContro
stop(server, hostname);
}
+ public void refreshProcesses(ServerType type) {
+ switch (type) {
+ case COMPACTION_COORDINATOR:
+ if (!coordinatorProcess.isAlive()) {
+ coordinatorProcess = null;
+ }
+ break;
+ case COMPACTOR:
+ compactorProcesses.removeIf(process -> !process.isAlive());
+ break;
+ case GARBAGE_COLLECTOR:
+ if (!gcProcess.isAlive()) {
+ gcProcess = null;
+ }
+ break;
+ case MANAGER:
- case MASTER:
+ if (!managerProcess.isAlive()) {
+ managerProcess = null;
+ }
+ break;
+ case MONITOR:
+ if (!monitor.isAlive()) {
+ monitor = null;
+ }
+ break;
+ case SCAN_SERVER:
+ scanServerProcesses.removeIf(process -> !process.isAlive());
+ break;
+ case TABLET_SERVER:
+ tabletServerProcesses.removeIf(process -> !process.isAlive());
+ break;
+ case ZOOKEEPER:
+ if (!zooKeeperProcess.isAlive()) {
+ zooKeeperProcess = null;
+ }
+ break;
+ default:
+ throw new IllegalArgumentException("Unhandled type: " + type);
+ }
+ }
+
+ public Set<Process> getProcesses(ServerType type) {
+ switch (type) {
+ case COMPACTION_COORDINATOR:
+ return coordinatorProcess == null ? Set.of() : Set.of(coordinatorProcess);
+ case COMPACTOR:
+ return Set.copyOf(compactorProcesses);
+ case GARBAGE_COLLECTOR:
+ return gcProcess == null ? Set.of() : Set.of(gcProcess);
+ case MANAGER:
- case MASTER:
+ return managerProcess == null ? Set.of() : Set.of(managerProcess);
+ case MONITOR:
+ return monitor == null ? Set.of() : Set.of(monitor);
+ case SCAN_SERVER:
+ return Set.copyOf(scanServerProcesses);
+ case TABLET_SERVER:
+ return Set.copyOf(tabletServerProcesses);
+ case ZOOKEEPER:
+ return zooKeeperProcess == null ? Set.of() : Set.of(zooKeeperProcess);
+ default:
+ throw new IllegalArgumentException("Unhandled type: " + type);
+ }
+ }
}
diff --cc server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java
index 3cc20c1e22,69378845e3..115cbb424f
--- a/server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java
@@@ -18,25 -18,24 +18,29 @@@
*/
package org.apache.accumulo.server;
-import java.util.Objects;
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+
import java.util.OptionalInt;
-import java.util.concurrent.TimeUnit;
+import java.util.concurrent.ScheduledFuture;
+ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.classloader.ClassLoaderUtil;
+import org.apache.accumulo.core.cli.ConfigOpts;
+ import org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException;
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.core.fate.zookeeper.ServiceLock;
+import org.apache.accumulo.core.lock.ServiceLock;
import org.apache.accumulo.core.metrics.MetricsProducer;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
+ import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
import org.apache.accumulo.core.trace.TraceUtil;
import org.apache.accumulo.core.util.Halt;
+import org.apache.accumulo.core.util.Timer;
+import org.apache.accumulo.core.util.threads.ThreadPools;
import org.apache.accumulo.core.util.threads.Threads;
+import org.apache.accumulo.server.mem.LowMemoryDetector;
import org.apache.accumulo.server.metrics.ProcessMetrics;
import org.apache.accumulo.server.security.SecurityUtil;
import org.slf4j.Logger;
@@@ -53,19 -53,21 +58,21 @@@ public abstract class AbstractServe
private final String hostname;
private final Logger log;
private final ProcessMetrics processMetrics;
- protected final long idleReportingPeriodNanos;
- private volatile long idlePeriodStartNanos = 0L;
+ protected final long idleReportingPeriodMillis;
+ private volatile Timer idlePeriodTimer = null;
private volatile Thread serverThread;
private volatile Thread verificationThread;
+ private final AtomicBoolean shutdownRequested = new AtomicBoolean(false);
+ private final AtomicBoolean shutdownComplete = new AtomicBoolean(false);
- protected AbstractServer(String appName, ServerOpts opts, String[] args) {
- this.log = LoggerFactory.getLogger(getClass().getName());
+ protected AbstractServer(String appName, ConfigOpts opts, String[] args) {
this.applicationName = appName;
opts.parseArgs(appName, args);
- this.hostname = Objects.requireNonNull(opts.getAddress());
var siteConfig = opts.getSiteConfiguration();
+ this.hostname = siteConfig.get(Property.GENERAL_PROCESS_BIND_ADDRESS);
SecurityUtil.serverLogin(siteConfig);
context = new ServerContext(siteConfig);
+ log = LoggerFactory.getLogger(getClass());
log.info("Version " + Constants.VERSION);
log.info("Instance " + context.getInstanceID());
context.init(appName);
diff --cc server/base/src/main/java/org/apache/accumulo/server/manager/LiveTServerSet.java
index 60adab9bc0,572c5954c1..9b7057b689
--- a/server/base/src/main/java/org/apache/accumulo/server/manager/LiveTServerSet.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/manager/LiveTServerSet.java
@@@ -27,8 -28,8 +27,9 @@@ import java.util.HashSet
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
+ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
+import java.util.function.Supplier;
import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.clientImpl.thrift.ClientService;
diff --cc server/base/src/main/java/org/apache/accumulo/server/rpc/ThriftProcessorTypes.java
index 7e497c3145,6b2aa9a2c8..59f4e154f5
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/ThriftProcessorTypes.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/ThriftProcessorTypes.java
@@@ -24,11 -24,12 +24,12 @@@ import org.apache.accumulo.core.compact
import org.apache.accumulo.core.gc.thrift.GCMonitorService;
import org.apache.accumulo.core.manager.thrift.FateService;
import org.apache.accumulo.core.manager.thrift.ManagerClientService;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
-import org.apache.accumulo.core.replication.thrift.ReplicationCoordinator;
-import org.apache.accumulo.core.replication.thrift.ReplicationServicer;
import org.apache.accumulo.core.rpc.clients.ThriftClientTypes;
-import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
-import org.apache.accumulo.core.tabletserver.thrift.TabletScanClientService;
+import org.apache.accumulo.core.tablet.thrift.TabletManagementClientService;
+import org.apache.accumulo.core.tabletingest.thrift.TabletIngestClientService;
+import org.apache.accumulo.core.tabletscan.thrift.TabletScanClientService;
+import org.apache.accumulo.core.tabletserver.thrift.TabletServerClientService;
import org.apache.accumulo.core.trace.TraceUtil;
import org.apache.accumulo.server.ServerContext;
import org.apache.accumulo.server.client.ClientServiceHandler;
@@@ -86,20 -93,19 +87,27 @@@ public class ThriftProcessorTypes<C ext
new ThriftProcessorTypes<>(ThriftClientTypes.TABLET_SERVER);
@VisibleForTesting
- public static final ThriftProcessorTypes<TabletScanClientService.Client> TABLET_SERVER_SCAN =
+ public static final ThriftProcessorTypes<TabletScanClientService.Client> TABLET_SCAN =
new ThriftProcessorTypes<>(ThriftClientTypes.TABLET_SCAN);
+ public static final ThriftProcessorTypes<TabletIngestClientService.Client> TABLET_INGEST =
+ new ThriftProcessorTypes<>(ThriftClientTypes.TABLET_INGEST);
+
+ public static final ThriftProcessorTypes<TabletManagementClientService.Client> TABLET_MGMT =
+ new ThriftProcessorTypes<>(ThriftClientTypes.TABLET_MGMT);
+
- public static TMultiplexedProcessor getCompactorTProcessor(ClientServiceHandler clientHandler,
+ public static final ThriftProcessorTypes<ServerProcessService.Client> SERVER_PROCESS =
+ new ThriftProcessorTypes<>(ThriftClientTypes.SERVER_PROCESS);
+
+ public static TMultiplexedProcessor getCompactorTProcessor(
- ServerProcessService.Iface processHandler, CompactorService.Iface serviceHandler,
- ServerContext context) {
++ ServerProcessService.Iface processHandler, ClientServiceHandler clientHandler,
+ CompactorService.Iface serviceHandler, ServerContext context) {
TMultiplexedProcessor muxProcessor = new TMultiplexedProcessor();
+ muxProcessor.registerProcessor(CLIENT.getServiceName(), CLIENT.getTProcessor(
+ ClientService.Processor.class, ClientService.Iface.class, clientHandler, context));
+ muxProcessor.registerProcessor(SERVER_PROCESS.getServiceName(),
+ SERVER_PROCESS.getTProcessor(ServerProcessService.Processor.class,
+ ServerProcessService.Iface.class, processHandler, context));
muxProcessor.registerProcessor(COMPACTOR.getServiceName(), COMPACTOR.getTProcessor(
CompactorService.Processor.class, CompactorService.Iface.class, serviceHandler, context));
return muxProcessor;
@@@ -133,23 -150,45 +152,31 @@@
return muxProcessor;
}
- public static TMultiplexedProcessor getScanServerTProcessor(ClientServiceHandler clientHandler,
- public static TMultiplexedProcessor getReplicationCoordinatorTProcessor(
- ReplicationCoordinator.Iface serviceHandler, ServerContext context) {
- TMultiplexedProcessor muxProcessor = new TMultiplexedProcessor();
- muxProcessor.registerProcessor(REPLICATION_COORDINATOR.getServiceName(),
- REPLICATION_COORDINATOR.getTProcessor(ReplicationCoordinator.Processor.class,
- ReplicationCoordinator.Iface.class, serviceHandler, context));
- return muxProcessor;
- }
-
- public static TMultiplexedProcessor getReplicationClientTProcessor(
- ReplicationServicer.Iface serviceHandler, ServerContext context) {
- TMultiplexedProcessor muxProcessor = new TMultiplexedProcessor();
- muxProcessor.registerProcessor(REPLICATION_SERVICER.getServiceName(),
- REPLICATION_SERVICER.getTProcessor(ReplicationServicer.Processor.class,
- ReplicationServicer.Iface.class, serviceHandler, context));
- return muxProcessor;
- }
-
+ public static TMultiplexedProcessor getScanServerTProcessor(
- ServerProcessService.Iface processHandler, TabletScanClientService.Iface tserverHandler,
- ServerContext context) {
++ ServerProcessService.Iface processHandler, ClientServiceHandler clientHandler,
+ TabletScanClientService.Iface tserverHandler, ServerContext context) {
TMultiplexedProcessor muxProcessor = new TMultiplexedProcessor();
+ muxProcessor.registerProcessor(CLIENT.getServiceName(), CLIENT.getTProcessor(
+ ClientService.Processor.class, ClientService.Iface.class, clientHandler, context));
+ muxProcessor.registerProcessor(SERVER_PROCESS.getServiceName(),
+ SERVER_PROCESS.getTProcessor(ServerProcessService.Processor.class,
+ ServerProcessService.Iface.class, processHandler, context));
- muxProcessor.registerProcessor(TABLET_SERVER_SCAN.getServiceName(),
- TABLET_SERVER_SCAN.getTProcessor(TabletScanClientService.Processor.class,
+ muxProcessor.registerProcessor(TABLET_SCAN.getServiceName(),
+ TABLET_SCAN.getTProcessor(TabletScanClientService.Processor.class,
TabletScanClientService.Iface.class, tserverHandler, context));
return muxProcessor;
}
- public static TMultiplexedProcessor getTabletServerTProcessor(ClientServiceHandler clientHandler,
+ public static TMultiplexedProcessor getTabletServerTProcessor(
+ ServerProcessService.Iface processHandler, ClientServiceHandler clientHandler,
- TabletClientService.Iface tserverHandler, TabletScanClientService.Iface tserverScanHandler,
- ServerContext context) {
+ TabletServerClientService.Iface tserverHandler,
+ TabletScanClientService.Iface tserverScanHandler,
+ TabletIngestClientService.Iface tserverIngestHandler,
+ TabletManagementClientService.Iface tserverMgmtHandler, ServerContext context) {
TMultiplexedProcessor muxProcessor = new TMultiplexedProcessor();
+ muxProcessor.registerProcessor(SERVER_PROCESS.getServiceName(),
+ SERVER_PROCESS.getTProcessor(ServerProcessService.Processor.class,
+ ServerProcessService.Iface.class, processHandler, context));
muxProcessor.registerProcessor(CLIENT.getServiceName(), CLIENT.getTProcessor(
ClientService.Processor.class, ClientService.Iface.class, clientHandler, context));
muxProcessor.registerProcessor(TABLET_SERVER.getServiceName(),
diff --cc server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
index 51670687e5,e3fb627dba..047c2c47d9
--- a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
@@@ -61,10 -58,12 +61,11 @@@ import org.apache.accumulo.core.fate.Ad
import org.apache.accumulo.core.fate.FateTxId;
import org.apache.accumulo.core.fate.ReadOnlyTStore;
import org.apache.accumulo.core.fate.ZooStore;
-import org.apache.accumulo.core.fate.zookeeper.ServiceLock;
import org.apache.accumulo.core.fate.zookeeper.ZooCache;
-import org.apache.accumulo.core.fate.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.core.lock.ServiceLock;
import org.apache.accumulo.core.manager.thrift.FateService;
-import org.apache.accumulo.core.metadata.MetadataTable;
+import org.apache.accumulo.core.metadata.AccumuloTable;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
import org.apache.accumulo.core.rpc.ThriftUtil;
import org.apache.accumulo.core.rpc.clients.ThriftClientTypes;
import org.apache.accumulo.core.security.Authorizations;
@@@ -79,16 -79,9 +80,17 @@@ import org.apache.accumulo.core.util.ta
import org.apache.accumulo.server.ServerContext;
import org.apache.accumulo.server.cli.ServerUtilOpts;
import org.apache.accumulo.server.security.SecurityUtil;
+import org.apache.accumulo.server.util.checkCommand.CheckRunner;
+import org.apache.accumulo.server.util.checkCommand.MetadataTableCheckRunner;
+import org.apache.accumulo.server.util.checkCommand.RootMetadataCheckRunner;
+import org.apache.accumulo.server.util.checkCommand.RootTableCheckRunner;
+import org.apache.accumulo.server.util.checkCommand.SystemConfigCheckRunner;
+import org.apache.accumulo.server.util.checkCommand.SystemFilesCheckRunner;
+import org.apache.accumulo.server.util.checkCommand.TableLocksCheckRunner;
+import org.apache.accumulo.server.util.checkCommand.UserFilesCheckRunner;
import org.apache.accumulo.server.util.fateCommand.FateSummaryReport;
import org.apache.accumulo.start.spi.KeywordExecutable;
+ import org.apache.thrift.TException;
import org.apache.zookeeper.KeeperException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@@ -455,8 -394,28 +467,10 @@@ public class Admin implements KeywordEx
if (ping(context, pingCommand.args) != 0) {
rc = 4;
}
- } else if (cl.getParsedCommand().equals("checkTablets")) {
- System.out.println("\n*** Looking for offline tablets ***\n");
- if (FindOfflineTablets.findOffline(context, checkTabletsCommand.tableName) != 0) {
- rc = 5;
- }
- System.out.println("\n*** Looking for missing files ***\n");
- if (checkTabletsCommand.tableName == null) {
- if (RemoveEntriesForMissingFiles.checkAllTables(context, checkTabletsCommand.fixFiles)
- != 0) {
- rc = 6;
- }
- } else {
- if (RemoveEntriesForMissingFiles.checkTable(context, checkTabletsCommand.tableName,
- checkTabletsCommand.fixFiles) != 0) {
- rc = 6;
- }
- }
-
} else if (cl.getParsedCommand().equals("stop")) {
stopTabletServer(context, stopOpts.args, stopOpts.force);
+ } else if (cl.getParsedCommand().equals("signalShutdown")) {
+ signalGracefulShutdown(context, gracefulShutdownCommand.address);
} else if (cl.getParsedCommand().equals("dumpConfig")) {
printConfig(context, dumpConfigCommand);
} else if (cl.getParsedCommand().equals("volumes")) {
diff --cc server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
index f6a7143322,c916090982..5617213b13
--- a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
@@@ -168,19 -175,19 +174,19 @@@ public class DistributedWorkQueue
void process(String workID, byte[] data);
}
- public DistributedWorkQueue(String path, AccumuloConfiguration config, ServerContext context) {
+ public DistributedWorkQueue(String path, AccumuloConfiguration config, AbstractServer server) {
// Preserve the old delay and period
- this(path, config, context, RANDOM.get().nextInt(toIntExact(MINUTES.toMillis(1))),
- this(path, config, server, random.nextInt(toIntExact(MINUTES.toMillis(1))),
++ this(path, config, server, RANDOM.get().nextInt(toIntExact(MINUTES.toMillis(1))),
MINUTES.toMillis(1));
}
- public DistributedWorkQueue(String path, AccumuloConfiguration config, ServerContext context,
+ public DistributedWorkQueue(String path, AccumuloConfiguration config, AbstractServer server,
long timerInitialDelay, long timerPeriod) {
this.path = path;
- this.context = context;
+ this.server = server;
this.timerInitialDelay = timerInitialDelay;
this.timerPeriod = timerPeriod;
- zoo = context.getZooSession().asReaderWriter();
- zoo = server.getContext().getZooReaderWriter();
++ zoo = server.getContext().getZooSession().asReaderWriter();
}
public ServerContext getContext() {
diff --cc server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
index 70e024022b,5aad919206..63f7753231
--- a/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
+++ b/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
@@@ -76,9 -72,10 +77,8 @@@ import org.apache.accumulo.core.securit
import org.apache.accumulo.core.tabletserver.thrift.TCompactionQueueSummary;
import org.apache.accumulo.core.tabletserver.thrift.TCompactionStats;
import org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob;
-import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
+import org.apache.accumulo.core.tabletserver.thrift.TabletServerClientService;
import org.apache.accumulo.core.trace.TraceUtil;
- import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.accumulo.core.trace.thrift.TInfo;
-import org.apache.accumulo.core.util.HostAndPort;
import org.apache.accumulo.core.util.compaction.ExternalCompactionUtil;
import org.apache.accumulo.core.util.compaction.RunningCompaction;
import org.apache.accumulo.core.util.threads.ThreadPools;
@@@ -138,11 -137,7 +138,8 @@@ public class CompactionCoordinator exte
private ServiceLock coordinatorLock;
- // Exposed for tests
- protected volatile Boolean shutdown = false;
-
private final ScheduledThreadPoolExecutor schedExecutor;
+ private final ExecutorService summariesExecutor;
private final LoadingCache<String,Integer> compactorCounts;
@@@ -216,13 -217,13 +213,14 @@@
final String lockPath = getContext().getZooKeeperRoot() + Constants.ZCOORDINATOR_LOCK;
final UUID zooLockUUID = UUID.randomUUID();
- coordinatorLock = new ServiceLock(getContext().getZooReaderWriter().getZooKeeper(),
- ServiceLock.path(lockPath), zooLockUUID);
+ coordinatorLock =
+ new ServiceLock(getContext().getZooSession(), ServiceLock.path(lockPath), zooLockUUID);
+ HAServiceLockWatcher coordinatorLockWatcher =
+ new HAServiceLockWatcher("coordinator", () -> getShutdownComplete().get());
while (true) {
- HAServiceLockWatcher coordinatorLockWatcher = new HAServiceLockWatcher("coordinator");
- coordinatorLock.lock(coordinatorLockWatcher, coordinatorClientAddress.getBytes(UTF_8));
+ coordinatorLock.lock(coordinatorLockWatcher,
+ new ServiceLockData(zooLockUUID, coordinatorClientAddress, ThriftService.COORDINATOR));
coordinatorLockWatcher.waitForChange();
if (coordinatorLockWatcher.isLockAcquired()) {
@@@ -244,7 -245,10 +242,7 @@@
* @throws UnknownHostException host unknown
*/
protected ServerAddress startCoordinatorClientService() throws UnknownHostException {
- var processor = ThriftProcessorTypes.getCoordinatorTProcessor(this, getContext());
+ var processor = ThriftProcessorTypes.getCoordinatorTProcessor(this, this, getContext());
- @SuppressWarnings("deprecation")
- var maxMessageSizeProperty = getConfiguration().resolve(Property.RPC_MAX_MESSAGE_SIZE,
- Property.GENERAL_MAX_MESSAGE_SIZE);
ServerAddress sp = TServerUtils.startServer(getContext(), getHostname(),
Property.COMPACTION_COORDINATOR_CLIENTPORT, processor, this.getClass().getSimpleName(),
"Thrift Client Server", Property.COMPACTION_COORDINATOR_THRIFTCLIENT_PORTSEARCH,
@@@ -305,37 -308,56 +303,58 @@@
startDeadCompactionDetector();
LOG.info("Starting loop to check tservers for compaction summaries");
- while (!shutdown) {
- long start = System.currentTimeMillis();
-
- updateSummaries();
-
- long now = System.currentTimeMillis();
-
- Map<String,Set<HostAndPort>> idleCompactors = getIdleCompactors();
- TIME_COMPACTOR_LAST_CHECKED.forEach((queue, lastCheckTime) -> {
- if ((now - lastCheckTime) > getMissingCompactorWarningTime()
- && QUEUE_SUMMARIES.isCompactionsQueued(queue) && idleCompactors.containsKey(queue)) {
- LOG.warn("No compactors have checked in with coordinator for queue {} in {}ms", queue,
- getMissingCompactorWarningTime());
+ while (!isShutdownRequested()) {
+ if (Thread.currentThread().isInterrupted()) {
+ LOG.info("Server process thread has been interrupted, shutting down");
+ break;
+ }
+ try {
+ long start = System.currentTimeMillis();
+
+ updateSummaries();
+
+ long now = System.currentTimeMillis();
+
- Map<String,List<HostAndPort>> idleCompactors = getIdleCompactors();
++ Map<String,Set<HostAndPort>> idleCompactors = getIdleCompactors();
+ TIME_COMPACTOR_LAST_CHECKED.forEach((queue, lastCheckTime) -> {
+ if ((now - lastCheckTime) > getMissingCompactorWarningTime()
+ && QUEUE_SUMMARIES.isCompactionsQueued(queue) && idleCompactors.containsKey(queue)) {
+ LOG.warn("No compactors have checked in with coordinator for queue {} in {}ms", queue,
+ getMissingCompactorWarningTime());
+ }
+ });
+
+ long checkInterval = getTServerCheckInterval();
+ long duration = (System.currentTimeMillis() - start);
+ if (checkInterval - duration > 0) {
+ LOG.debug("Waiting {}ms for next tserver check", (checkInterval - duration));
+ Thread.sleep(checkInterval - duration);
}
- });
-
- long checkInterval = getTServerCheckInterval();
- long duration = (System.currentTimeMillis() - start);
- if (checkInterval - duration > 0) {
- LOG.debug("Waiting {}ms for next tserver check", (checkInterval - duration));
- UtilWaitThread.sleep(checkInterval - duration);
+ } catch (InterruptedException e) {
+ LOG.info("Interrupt Exception received, shutting down");
+ gracefulShutdown(getContext().rpcCreds());
}
}
-
- summariesExecutor.shutdownNow();
+ LOG.info("Shutting down");
++ summariesExecutor.shutdownNow();
+
+ LOG.debug("Stopping Thrift Servers");
+ if (coordinatorAddress.server != null) {
+ coordinatorAddress.server.stop();
+ }
+ getShutdownComplete().set(true);
+ LOG.info("stop requested. exiting ... ");
+ try {
+ coordinatorLock.unlock();
+ } catch (Exception e) {
+ LOG.warn("Failed to release Coordinator lock", e);
+ }
+
}
- private Map<String,List<HostAndPort>> getIdleCompactors() {
+ private Map<String,Set<HostAndPort>> getIdleCompactors() {
- Map<String,List<HostAndPort>> allCompactors =
+ Map<String,Set<HostAndPort>> allCompactors =
ExternalCompactionUtil.getCompactorAddrs(getContext());
Set<String> emptyQueues = new HashSet<>();
diff --cc server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
index b44b6a88e8,109f287ffa..eb926da7cf
--- a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
+++ b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
@@@ -160,16 -169,12 +162,13 @@@ public class Compactor extends Abstract
private ServiceLock compactorLock;
private ServerAddress compactorAddress = null;
+ private final PausedCompactionMetrics pausedMetrics = new PausedCompactionMetrics();
- // Exposed for tests
- protected volatile boolean shutdown = false;
-
private final AtomicBoolean compactionRunning = new AtomicBoolean(false);
- protected Compactor(CompactorServerOpts opts, String[] args) {
+ protected Compactor(ConfigOpts opts, String[] args) {
super("compactor", opts, args);
- queueName = opts.getQueueName();
+ queueName = super.getConfiguration().get(Property.COMPACTOR_QUEUE_NAME);
ClusterConfigParser.validateGroupNames(Set.of(queueName));
}
@@@ -268,12 -284,15 +267,12 @@@
throw e;
}
- compactorLock = new ServiceLock(getContext().getZooReaderWriter().getZooKeeper(),
- ServiceLock.path(zPath), compactorId);
-
+ compactorLock =
+ new ServiceLock(getContext().getZooSession(), ServiceLock.path(zPath), compactorId);
- LockWatcher lw = new ServiceLockWatcher("compactor", () -> false,
+ LockWatcher lw = new ServiceLockWatcher("compactor", () -> getShutdownComplete().get(),
- (name) -> gcLogger.logGCInfo(getConfiguration()));
+ (name) -> getContext().getLowMemoryDetector().logGCInfo(getConfiguration()));
try {
- byte[] lockContent =
- new ServerServices(hostPort, Service.COMPACTOR_CLIENT).toString().getBytes(UTF_8);
for (int i = 0; i < 25; i++) {
zoo.putPersistentData(zPath, new byte[0], NodeExistsPolicy.SKIP);
@@@ -306,10 -319,10 +305,10 @@@
* @throws UnknownHostException host unknown
*/
protected ServerAddress startCompactorClientService() throws UnknownHostException {
-
- var processor = ThriftProcessorTypes.getCompactorTProcessor(this, this, getContext());
- @SuppressWarnings("deprecation")
- var maxMessageSizeProperty = getConfiguration().resolve(Property.RPC_MAX_MESSAGE_SIZE,
- Property.GENERAL_MAX_MESSAGE_SIZE);
+ ClientServiceHandler clientHandler =
+ new ClientServiceHandler(getContext(), new TransactionWatcher(getContext()));
- var processor = ThriftProcessorTypes.getCompactorTProcessor(clientHandler, this, getContext());
++ var processor =
++ ThriftProcessorTypes.getCompactorTProcessor(this, clientHandler, this, getContext());
ServerAddress sp = TServerUtils.startServer(getContext(), getHostname(),
Property.COMPACTOR_CLIENTPORT, processor, this.getClass().getSimpleName(),
"Thrift Client Server", Property.COMPACTOR_PORTSEARCH, Property.COMPACTOR_MINTHREADS,
@@@ -875,7 -893,8 +879,8 @@@
LOG.warn("Failed to close filesystem : {}", e.getMessage(), e);
}
- gcLogger.logGCInfo(getConfiguration());
+ getContext().getLowMemoryDetector().logGCInfo(getConfiguration());
+ getShutdownComplete().set(true);
LOG.info("stop requested. exiting ... ");
try {
if (null != compactorLock) {
diff --cc server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
index be415df136,7d7096a860..a9446397ed
--- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
@@@ -35,15 -34,19 +35,16 @@@ import org.apache.accumulo.core.conf.Pr
import org.apache.accumulo.core.gc.thrift.GCMonitorService.Iface;
import org.apache.accumulo.core.gc.thrift.GCStatus;
import org.apache.accumulo.core.gc.thrift.GcCycleStats;
-import org.apache.accumulo.core.metadata.MetadataTable;
-import org.apache.accumulo.core.metadata.RootTable;
+import org.apache.accumulo.core.lock.ServiceLock;
+import org.apache.accumulo.core.lock.ServiceLockData;
+import org.apache.accumulo.core.lock.ServiceLockData.ThriftService;
+import org.apache.accumulo.core.lock.ServiceLockSupport.HAServiceLockWatcher;
+import org.apache.accumulo.core.metadata.AccumuloTable;
import org.apache.accumulo.core.metadata.schema.Ample.DataLevel;
import org.apache.accumulo.core.metrics.MetricsInfo;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
import org.apache.accumulo.core.trace.TraceUtil;
-import org.apache.accumulo.core.trace.thrift.TInfo;
-import org.apache.accumulo.core.util.HostAndPort;
-import org.apache.accumulo.core.util.ServerServices;
-import org.apache.accumulo.core.util.ServerServices.Service;
import org.apache.accumulo.core.util.threads.ThreadPools;
import org.apache.accumulo.gc.metrics.GcCycleMetrics;
import org.apache.accumulo.gc.metrics.GcMetrics;
@@@ -179,124 -193,156 +181,140 @@@ public class SimpleGarbageCollector ext
}
});
- while (true) {
- Span outerSpan = TraceUtil.startSpan(this.getClass(), "gc");
- try (Scope outerScope = outerSpan.makeCurrent()) {
- Span innerSpan = TraceUtil.startSpan(this.getClass(), "loop");
- try (Scope innerScope = innerSpan.makeCurrent()) {
- final long tStart = System.nanoTime();
+ while (!isShutdownRequested()) {
+ if (Thread.currentThread().isInterrupted()) {
+ LOG.info("Server process thread has been interrupted, shutting down");
+ break;
+ }
+ try {
+ Span outerSpan = TraceUtil.startSpan(this.getClass(), "gc");
+ try (Scope outerScope = outerSpan.makeCurrent()) {
+ Span innerSpan = TraceUtil.startSpan(this.getClass(), "loop");
+ try (Scope innerScope = innerSpan.makeCurrent()) {
+ final long tStart = System.nanoTime();
+ try {
+ System.gc(); // make room
+
+ status.current.started = System.currentTimeMillis();
+ var rootGC = new GCRun(DataLevel.ROOT, getContext());
+ var mdGC = new GCRun(DataLevel.METADATA, getContext());
+ var userGC = new GCRun(DataLevel.USER, getContext());
+
+ log.info("Starting Root table Garbage Collection.");
+ status.current.bulks += new GarbageCollectionAlgorithm().collect(rootGC);
+ incrementStatsForRun(rootGC);
+ logStats();
+
+ log.info("Starting Metadata table Garbage Collection.");
+ status.current.bulks += new GarbageCollectionAlgorithm().collect(mdGC);
+ incrementStatsForRun(mdGC);
+ logStats();
+
+ log.info("Starting User table Garbage Collection.");
+ status.current.bulks += new GarbageCollectionAlgorithm().collect(userGC);
+ incrementStatsForRun(userGC);
+ logStats();
+
+ } catch (Exception e) {
+ TraceUtil.setException(innerSpan, e, false);
+ log.error("{}", e.getMessage(), e);
+ } finally {
+ status.current.finished = System.currentTimeMillis();
+ status.last = status.current;
+ gcCycleMetrics.setLastCollect(status.current);
+ status.current = new GcCycleStats();
+ }
+
+ final long tStop = System.nanoTime();
+ log.info(String.format("Collect cycle took %.2f seconds",
+ (TimeUnit.NANOSECONDS.toMillis(tStop - tStart) / 1000.0)));
+
- /*
- * We want to prune references to fully-replicated WALs from the replication table which
- * are no longer referenced in the metadata table before running
- * GarbageCollectWriteAheadLogs to ensure we delete as many files as possible.
- */
- Span replSpan = TraceUtil.startSpan(this.getClass(), "replicationClose");
- try (Scope replScope = replSpan.makeCurrent()) {
- @SuppressWarnings("deprecation")
- Runnable closeWals =
- new org.apache.accumulo.gc.replication.CloseWriteAheadLogReferences(getContext());
- closeWals.run();
- } catch (Exception e) {
- TraceUtil.setException(replSpan, e, false);
- log.error("Error trying to close write-ahead logs for replication table", e);
- } finally {
- replSpan.end();
- }
-
+ // Clean up any unused write-ahead logs
+ Span walSpan = TraceUtil.startSpan(this.getClass(), "walogs");
+ try (Scope walScope = walSpan.makeCurrent()) {
- GarbageCollectWriteAheadLogs walogCollector = new GarbageCollectWriteAheadLogs(
- getContext(), fs, liveTServerSet, isUsingTrash());
++ GarbageCollectWriteAheadLogs walogCollector =
++ new GarbageCollectWriteAheadLogs(getContext(), fs, liveTServerSet);
+ log.info("Beginning garbage collection of write-ahead logs");
+ walogCollector.collect(status);
+ gcCycleMetrics.setLastWalCollect(status.lastLog);
+ } catch (Exception e) {
+ TraceUtil.setException(walSpan, e, false);
+ log.error("{}", e.getMessage(), e);
+ } finally {
+ walSpan.end();
+ }
+ } catch (Exception e) {
+ TraceUtil.setException(innerSpan, e, true);
+ throw e;
+ } finally {
+ innerSpan.end();
+ }
+
+ // we just made a lot of metadata changes: flush them out
try {
- System.gc(); // make room
+ AccumuloClient accumuloClient = getContext();
- status.current.started = System.currentTimeMillis();
- var rootGC = new GCRun(DataLevel.ROOT, getContext());
- var mdGC = new GCRun(DataLevel.METADATA, getContext());
- var userGC = new GCRun(DataLevel.USER, getContext());
+ final long actionStart = System.nanoTime();
- log.info("Starting Root table Garbage Collection.");
- status.current.bulks += new GarbageCollectionAlgorithm().collect(rootGC);
- incrementStatsForRun(rootGC);
- logStats();
+ String action = getConfiguration().get(Property.GC_USE_FULL_COMPACTION);
+ log.debug("gc post action {} started", action);
- log.info("Starting Metadata table Garbage Collection.");
- status.current.bulks += new GarbageCollectionAlgorithm().collect(mdGC);
- incrementStatsForRun(mdGC);
- logStats();
+ switch (action) {
+ case "compact":
- accumuloClient.tableOperations().compact(MetadataTable.NAME, null, null, true,
- true);
- accumuloClient.tableOperations().compact(RootTable.NAME, null, null, true, true);
++ accumuloClient.tableOperations().compact(AccumuloTable.METADATA.name(), null, null,
++ true, true);
++ accumuloClient.tableOperations().compact(AccumuloTable.ROOT.name(), null, null,
++ true, true);
+ break;
+ case "flush":
- accumuloClient.tableOperations().flush(MetadataTable.NAME, null, null, true);
- accumuloClient.tableOperations().flush(RootTable.NAME, null, null, true);
++ accumuloClient.tableOperations().flush(AccumuloTable.METADATA.name(), null, null,
++ true);
++ accumuloClient.tableOperations().flush(AccumuloTable.ROOT.name(), null, null, true);
+ break;
+ default:
+ log.trace("'none - no action' or invalid value provided: {}", action);
+ }
- log.info("Starting User table Garbage Collection.");
- status.current.bulks += new GarbageCollectionAlgorithm().collect(userGC);
- incrementStatsForRun(userGC);
- logStats();
+ final long actionComplete = System.nanoTime();
- } catch (Exception e) {
- TraceUtil.setException(innerSpan, e, false);
- log.error("{}", e.getMessage(), e);
- } finally {
- status.current.finished = System.currentTimeMillis();
- status.last = status.current;
- gcCycleMetrics.setLastCollect(status.current);
- status.current = new GcCycleStats();
- }
+ gcCycleMetrics.setPostOpDurationNanos(actionComplete - actionStart);
+
+ log.info("gc post action {} completed in {} seconds", action, String.format("%.2f",
+ (TimeUnit.NANOSECONDS.toMillis(actionComplete - actionStart) / 1000.0)));
- final long tStop = System.nanoTime();
- log.info(String.format("Collect cycle took %.2f seconds",
- (TimeUnit.NANOSECONDS.toMillis(tStop - tStart) / 1000.0)));
-
- // Clean up any unused write-ahead logs
- Span walSpan = TraceUtil.startSpan(this.getClass(), "walogs");
- try (Scope walScope = walSpan.makeCurrent()) {
- GarbageCollectWriteAheadLogs walogCollector =
- new GarbageCollectWriteAheadLogs(getContext(), fs, liveTServerSet);
- log.info("Beginning garbage collection of write-ahead logs");
- walogCollector.collect(status);
- gcCycleMetrics.setLastWalCollect(status.lastLog);
} catch (Exception e) {
- TraceUtil.setException(walSpan, e, false);
- log.error("{}", e.getMessage(), e);
- } finally {
- walSpan.end();
+ TraceUtil.setException(outerSpan, e, false);
+ log.warn("{}", e.getMessage(), e);
}
} catch (Exception e) {
- TraceUtil.setException(innerSpan, e, true);
+ TraceUtil.setException(outerSpan, e, true);
throw e;
} finally {
- innerSpan.end();
+ outerSpan.end();
}
-
- // we just made a lot of metadata changes: flush them out
try {
- AccumuloClient accumuloClient = getContext();
-
- final long actionStart = System.nanoTime();
-
- String action = getConfiguration().get(Property.GC_USE_FULL_COMPACTION);
- log.debug("gc post action {} started", action);
-
- switch (action) {
- case "compact":
- accumuloClient.tableOperations().compact(AccumuloTable.METADATA.tableName(), null,
- null, true, true);
- accumuloClient.tableOperations().compact(AccumuloTable.ROOT.tableName(), null, null,
- true, true);
- break;
- case "flush":
- accumuloClient.tableOperations().flush(AccumuloTable.METADATA.tableName(), null, null,
- true);
- accumuloClient.tableOperations().flush(AccumuloTable.ROOT.tableName(), null, null,
- true);
- break;
- default:
- log.trace("'none - no action' or invalid value provided: {}", action);
- }
-
- final long actionComplete = System.nanoTime();
-
- gcCycleMetrics.setPostOpDurationNanos(actionComplete - actionStart);
- log.info("gc post action {} completed in {} seconds", action, String.format("%.2f",
- (TimeUnit.NANOSECONDS.toMillis(actionComplete - actionStart) / 1000.0)));
-
- } catch (Exception e) {
- TraceUtil.setException(outerSpan, e, false);
+ gcCycleMetrics.incrementRunCycleCount();
+ long gcDelay = getConfiguration().getTimeInMillis(Property.GC_CYCLE_DELAY);
+ log.debug("Sleeping for {} milliseconds", gcDelay);
+ Thread.sleep(gcDelay);
+ } catch (InterruptedException e) {
log.warn("{}", e.getMessage(), e);
+ throw e;
}
- } catch (Exception e) {
- TraceUtil.setException(outerSpan, e, true);
- throw e;
- } finally {
- outerSpan.end();
- }
- try {
-
- gcCycleMetrics.incrementRunCycleCount();
- long gcDelay = getConfiguration().getTimeInMillis(Property.GC_CYCLE_DELAY);
- log.debug("Sleeping for {} milliseconds", gcDelay);
- Thread.sleep(gcDelay);
} catch (InterruptedException e) {
- log.warn("{}", e.getMessage(), e);
- return;
+ log.info("Interrupt Exception received, shutting down");
+ gracefulShutdown(getContext().rpcCreds());
}
}
+ getShutdownComplete().set(true);
+ log.info("stop requested. exiting ... ");
+ try {
+ gcLock.unlock();
+ } catch (Exception e) {
+ log.warn("Failed to release GarbageCollector lock", e);
+ }
+
}
private void incrementStatsForRun(GCRun gcRun) {
@@@ -335,8 -384,9 +353,9 @@@
var path = ServiceLock.path(getContext().getZooKeeperRoot() + Constants.ZGC_LOCK);
UUID zooLockUUID = UUID.randomUUID();
- gcLock = new ServiceLock(getContext().getZooReaderWriter().getZooKeeper(), path, zooLockUUID);
+ gcLock = new ServiceLock(getContext().getZooSession(), path, zooLockUUID);
- HAServiceLockWatcher gcLockWatcher = new HAServiceLockWatcher("gc");
+ HAServiceLockWatcher gcLockWatcher =
+ new HAServiceLockWatcher("gc", () -> getShutdownComplete().get());
while (true) {
gcLock.lock(gcLockWatcher,
@@@ -363,10 -413,13 +382,10 @@@
}
private HostAndPort startStatsService() {
- var processor = ThriftProcessorTypes.getGcTProcessor(this, getContext());
+ var processor = ThriftProcessorTypes.getGcTProcessor(this, this, getContext());
IntStream port = getConfiguration().getPortStream(Property.GC_PORT);
HostAndPort[] addresses = TServerUtils.getHostAndPorts(getHostname(), port);
- @SuppressWarnings("deprecation")
- var maxMessageSizeProperty = getConfiguration().resolve(Property.RPC_MAX_MESSAGE_SIZE,
- Property.GENERAL_MAX_MESSAGE_SIZE);
- long maxMessageSize = getConfiguration().getAsBytes(maxMessageSizeProperty);
+ long maxMessageSize = getConfiguration().getAsBytes(Property.RPC_MAX_MESSAGE_SIZE);
ServerAddress server = TServerUtils.startTServer(getConfiguration(),
getContext().getThriftServerType(), processor, this.getClass().getSimpleName(),
"GC Monitor Service", 2, ThreadPools.DEFAULT_TIMEOUT_MILLISECS, 1000, maxMessageSize,
diff --cc server/manager/src/main/java/org/apache/accumulo/manager/Manager.java
index 012c509a4f,aa47e713e4..1fa3de8c88
--- a/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java
+++ b/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java
@@@ -97,6 -96,8 +97,7 @@@ import org.apache.accumulo.core.metadat
import org.apache.accumulo.core.metadata.schema.TabletMetadata;
import org.apache.accumulo.core.metrics.MetricsInfo;
import org.apache.accumulo.core.metrics.MetricsProducer;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
-import org.apache.accumulo.core.replication.thrift.ReplicationCoordinator;
import org.apache.accumulo.core.spi.balancer.BalancerEnvironment;
import org.apache.accumulo.core.spi.balancer.SimpleLoadBalancer;
import org.apache.accumulo.core.spi.balancer.TabletBalancer;
@@@ -1243,12 -1244,16 +1244,12 @@@ public class Manager extends AbstractSe
ServerAddress sa;
var processor =
- ThriftProcessorTypes.getManagerTProcessor(fateServiceHandler, haProxy, getContext());
+ ThriftProcessorTypes.getManagerTProcessor(this, fateServiceHandler, haProxy, getContext());
try {
- @SuppressWarnings("deprecation")
- var maxMessageSizeProperty = getConfiguration().resolve(Property.RPC_MAX_MESSAGE_SIZE,
- Property.GENERAL_MAX_MESSAGE_SIZE);
sa = TServerUtils.startServer(context, getHostname(), Property.MANAGER_CLIENTPORT, processor,
"Manager", "Manager Client Service Handler", null, Property.MANAGER_MINTHREADS,
- Property.MANAGER_MINTHREADS_TIMEOUT, Property.MANAGER_THREADCHECK,
- maxMessageSizeProperty);
+ Property.MANAGER_MINTHREADS_TIMEOUT, Property.MANAGER_THREADCHECK);
} catch (UnknownHostException e) {
throw new IllegalStateException("Unable to start server on host " + getHostname(), e);
}
@@@ -1458,12 -1499,27 +1472,18 @@@
throw new IllegalStateException("Exception waiting on watcher", e);
}
}
- log.info("exiting");
+ getShutdownComplete().set(true);
+ log.info("stop requested. exiting ... ");
+ try {
+ managerLock.unlock();
+ } catch (Exception e) {
+ log.warn("Failed to release Manager lock", e);
+ }
}
- @Deprecated
- private void initializeZkForReplication(ZooReaderWriter zReaderWriter, String zroot) {
- try {
- org.apache.accumulo.server.replication.ZooKeeperInitialization
- .ensureZooKeeperInitialized(zReaderWriter, zroot);
- } catch (KeeperException | InterruptedException e) {
- throw new IllegalStateException("Exception while ensuring ZooKeeper is initialized", e);
- }
- }
-
- protected Fate<Manager> initializeFateInstance(TStore<Manager> store) {
- return new Fate<>(this, store, TraceRepo::toLogString);
+ protected Fate<Manager> initializeFateInstance(TStore<Manager> store,
+ AccumuloConfiguration conf) {
+ return new Fate<>(this, store, TraceRepo::toLogString, conf);
}
/**
@@@ -1571,14 -1664,13 +1591,16 @@@
getHostname() + ":" + getConfiguration().getPort(Property.MANAGER_CLIENTPORT)[0];
UUID zooLockUUID = UUID.randomUUID();
+ ServiceLockData sld =
+ new ServiceLockData(zooLockUUID, managerClientAddress, ThriftService.MANAGER);
+
managerLock = new ServiceLock(zooKeeper, zManagerLoc, zooLockUUID);
+ HAServiceLockWatcher managerLockWatcher =
+ new HAServiceLockWatcher("manager", () -> getShutdownComplete().get());
+
while (true) {
- HAServiceLockWatcher managerLockWatcher = new HAServiceLockWatcher("manager");
- managerLock.lock(managerLockWatcher, managerClientAddress.getBytes(UTF_8));
+ managerLock.lock(managerLockWatcher, sld);
managerLockWatcher.waitForChange();
diff --cc server/manager/src/main/java/org/apache/accumulo/manager/recovery/RecoveryManager.java
index f09fc8c1c3,b1117eba3f..bf5dbe67ad
--- a/server/manager/src/main/java/org/apache/accumulo/manager/recovery/RecoveryManager.java
+++ b/server/manager/src/main/java/org/apache/accumulo/manager/recovery/RecoveryManager.java
@@@ -75,11 -75,11 +75,11 @@@ public class RecoveryManager
executor =
ThreadPools.getServerThreadPools().createScheduledExecutorService(4, "Walog sort starter");
- zooCache = new ZooCache(manager.getContext().getZooReader(), null);
+ zooCache = new ZooCache(manager.getContext().getZooSession());
try {
List<String> workIDs =
- new DistributedWorkQueue(manager.getZooKeeperRoot() + Constants.ZRECOVERY,
+ new DistributedWorkQueue(manager.getContext().getZooKeeperRoot() + Constants.ZRECOVERY,
- manager.getConfiguration(), manager.getContext()).getWorkQueued();
+ manager.getConfiguration(), manager).getWorkQueued();
sortsQueued.addAll(workIDs);
} catch (Exception e) {
log.warn("{}", e.getMessage(), e);
@@@ -131,8 -131,8 +131,8 @@@
private void initiateSort(String sortId, String source, final String destination)
throws KeeperException, InterruptedException {
String work = source + "|" + destination;
- new DistributedWorkQueue(manager.getZooKeeperRoot() + Constants.ZRECOVERY,
+ new DistributedWorkQueue(manager.getContext().getZooKeeperRoot() + Constants.ZRECOVERY,
- manager.getConfiguration(), manager.getContext()).addWork(sortId, work.getBytes(UTF_8));
+ manager.getConfiguration(), manager).addWork(sortId, work.getBytes(UTF_8));
synchronized (this) {
sortsQueued.add(sortId);
diff --cc server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index 2fe6e2d2b7,fdd077713d..b2e60a04bc
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@@ -720,12 -841,12 +736,13 @@@ public class Monitor extends AbstractSe
// Get a ZooLock for the monitor
UUID zooLockUUID = UUID.randomUUID();
- monitorLock = new ServiceLock(zoo.getZooKeeper(), monitorLockPath, zooLockUUID);
+ monitorLock = new ServiceLock(context.getZooSession(), monitorLockPath, zooLockUUID);
+ HAServiceLockWatcher monitorLockWatcher =
+ new HAServiceLockWatcher("monitor", () -> isShutdownRequested());
while (true) {
- HAServiceLockWatcher monitorLockWatcher = new HAServiceLockWatcher("monitor");
- monitorLock.lock(monitorLockWatcher, new byte[0]);
+ monitorLock.lock(monitorLockWatcher, new ServiceLockData(zooLockUUID,
+ monitorLocation.getHost() + ":" + monitorLocation.getPort(), ThriftService.NONE));
monitorLockWatcher.waitForChange();
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServer.java
index 1d76c2596b,245302e14f..2ebaab6fe3
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServer.java
@@@ -79,18 -74,20 +79,19 @@@ import org.apache.accumulo.core.metadat
import org.apache.accumulo.core.metadata.StoredTabletFile;
import org.apache.accumulo.core.metadata.schema.Ample;
import org.apache.accumulo.core.metadata.schema.TabletMetadata;
+import org.apache.accumulo.core.metadata.schema.TabletsMetadata;
import org.apache.accumulo.core.metrics.MetricsInfo;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
-import org.apache.accumulo.core.spi.scan.ScanServerSelector;
-import org.apache.accumulo.core.tabletserver.thrift.ActiveScan;
+import org.apache.accumulo.core.tabletscan.thrift.ActiveScan;
+import org.apache.accumulo.core.tabletscan.thrift.ScanServerBusyException;
+import org.apache.accumulo.core.tabletscan.thrift.TSampleNotPresentException;
+import org.apache.accumulo.core.tabletscan.thrift.TSamplerConfiguration;
+import org.apache.accumulo.core.tabletscan.thrift.TabletScanClientService;
+import org.apache.accumulo.core.tabletscan.thrift.TooManyFilesException;
import org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException;
import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
-import org.apache.accumulo.core.tabletserver.thrift.ScanServerBusyException;
-import org.apache.accumulo.core.tabletserver.thrift.TSampleNotPresentException;
-import org.apache.accumulo.core.tabletserver.thrift.TSamplerConfiguration;
-import org.apache.accumulo.core.tabletserver.thrift.TabletScanClientService;
-import org.apache.accumulo.core.tabletserver.thrift.TooManyFilesException;
-import org.apache.accumulo.core.trace.thrift.TInfo;
-import org.apache.accumulo.core.util.HostAndPort;
+import org.apache.accumulo.core.util.Timer;
import org.apache.accumulo.core.util.UtilWaitThread;
import org.apache.accumulo.core.util.threads.ThreadPools;
import org.apache.accumulo.server.AbstractServer;
@@@ -129,11 -126,22 +130,11 @@@ import com.github.benmanes.caffeine.cac
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets;
+import com.google.common.net.HostAndPort;
public class ScanServer extends AbstractServer
- implements TabletScanClientService.Iface, TabletHostingServer {
+ implements TabletScanClientService.Iface, TabletHostingServer, ServerProcessService.Iface {
- public static class ScanServerOpts extends ServerOpts {
- @Parameter(required = false, names = {"-g", "--group"},
- description = "Optional group name that will be made available to the ScanServerSelector client plugin. If not specified will be set to '"
- + ScanServerSelector.DEFAULT_SCAN_SERVER_GROUP_NAME
- + "'. Groups support at least two use cases : dedicating resources to scans and/or using different hardware for scans.")
- private String groupName = ScanServerSelector.DEFAULT_SCAN_SERVER_GROUP_NAME;
-
- public String getGroupName() {
- return groupName;
- }
- }
-
private static final Logger log = LoggerFactory.getLogger(ScanServer.class);
private static class TabletMetadataLoader implements CacheLoader<KeyExtent,TabletMetadata> {
@@@ -197,8 -200,8 +198,7 @@@
private final SessionManager sessionManager;
private final TabletServerResourceManager resourceManager;
HostAndPort clientAddress;
- private final GarbageCollectionLogger gcLogger = new GarbageCollectionLogger();
- protected volatile boolean serverStopRequested = false;
private ServiceLock scanServerLock;
protected TabletServerScanMetrics scanMetrics;
private ScanServerMetrics scanServerMetrics;
@@@ -301,11 -304,11 +301,11 @@@
// This class implements TabletClientService.Iface and then delegates calls. Be sure
// to set up the ThriftProcessor using this class, not the delegate.
- TProcessor processor = ThriftProcessorTypes.getScanServerTProcessor(this, this, getContext());
+ ClientServiceHandler clientHandler =
+ new ClientServiceHandler(context, new TransactionWatcher(context));
+ TProcessor processor =
- ThriftProcessorTypes.getScanServerTProcessor(clientHandler, this, getContext());
++ ThriftProcessorTypes.getScanServerTProcessor(this, clientHandler, this, getContext());
- @SuppressWarnings("deprecation")
- var maxMessageSizeProperty = getConfiguration().resolve(Property.RPC_MAX_MESSAGE_SIZE,
- Property.GENERAL_MAX_MESSAGE_SIZE);
ServerAddress sp = TServerUtils.startServer(getContext(), getHostname(),
Property.SSERV_CLIENTPORT, processor, this.getClass().getSimpleName(),
"Thrift Client Server", Property.SSERV_PORTSEARCH, Property.SSERV_MINTHREADS,
@@@ -344,10 -347,14 +344,10 @@@
}
serverLockUUID = UUID.randomUUID();
- scanServerLock = new ServiceLock(zoo.getZooKeeper(), zLockPath, serverLockUUID);
+ scanServerLock = new ServiceLock(getContext().getZooSession(), zLockPath, serverLockUUID);
- LockWatcher lw = new ServiceLockWatcher("scan server", () -> serverStopRequested,
+ LockWatcher lw = new ServiceLockWatcher("scan server", () -> getShutdownComplete().get(),
- (name) -> gcLogger.logGCInfo(getConfiguration()));
-
- // Don't use the normal ServerServices lock content, instead put the server UUID here.
- byte[] lockContent = (serverLockUUID.toString() + "," + groupName).getBytes(UTF_8);
+ (name) -> context.getLowMemoryDetector().logGCInfo(getConfiguration()));
- // wait for 120 seconds with 5 second delay
for (int i = 0; i < 120 / 5; i++) {
zoo.putPersistentData(zLockPath.toString(), new byte[0], NodeExistsPolicy.SKIP);
@@@ -402,18 -402,38 +402,38 @@@
ServiceLock lock = announceExistence();
try {
- while (!serverStopRequested) {
- UtilWaitThread.sleep(1000);
- updateIdleStatus(
- sessionManager.getActiveScans().isEmpty() && tabletMetadataCache.estimatedSize() == 0);
+ while (!isShutdownRequested()) {
+ if (Thread.currentThread().isInterrupted()) {
+ LOG.info("Server process thread has been interrupted, shutting down");
+ break;
+ }
+ try {
+ Thread.sleep(1000);
+ updateIdleStatus(sessionManager.getActiveScans().isEmpty()
+ && tabletMetadataCache.estimatedSize() == 0);
+ } catch (InterruptedException e) {
+ LOG.info("Interrupt Exception received, shutting down");
+ gracefulShutdown(getContext().rpcCreds());
+ }
}
} finally {
- LOG.info("Stopping Thrift Servers");
+ // Wait for scans to got to zero
+ while (!sessionManager.getActiveScans().isEmpty()) {
+ LOG.debug("Waiting on {} active scans to complete.",
+ sessionManager.getActiveScans().size());
+ UtilWaitThread.sleep(1000);
+ }
+
+ LOG.debug("Stopping Thrift Servers");
address.server.stop();
- LOG.info("Removing server scan references");
- this.getContext().getAmple().scanServerRefs().delete(clientAddress.toString(),
- serverLockUUID);
+ try {
- LOG.debug("Removing server scan references");
- this.getContext().getAmple().deleteScanServerFileReferences(clientAddress.toString(),
++ LOG.info("Removing server scan references");
++ this.getContext().getAmple().scanServerRefs().delete(clientAddress.toString(),
+ serverLockUUID);
+ } catch (Exception e) {
+ LOG.warn("Failed to remove scan server refs from metadata location", e);
+ }
try {
LOG.debug("Closing filesystems");
@@@ -430,7 -450,8 +450,8 @@@
tmCacheExecutor.shutdownNow();
}
- gcLogger.logGCInfo(getConfiguration());
+ context.getLowMemoryDetector().logGCInfo(getConfiguration());
+ getShutdownComplete().set(true);
LOG.info("stop requested. exiting ... ");
try {
if (null != lock) {
@@@ -926,9 -946,14 +947,14 @@@
long busyTimeout) throws ThriftSecurityException, NotServingTabletException,
TooManyFilesException, TSampleNotPresentException, TException {
+ if (isShutdownRequested()) {
+ // Prevent scans from starting if shutting down
+ throw new ScanServerBusyException();
+ }
+
KeyExtent extent = getKeyExtent(textent);
- if (extent.isMeta() && !isSystemUser(credentials)) {
+ if (extent.isSystemTable() && !isSystemUser(credentials)) {
throw new TException(
"Only the system user can perform eventual consistency scans on the root and metadata tables");
}
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 53af48d733,2d4749b90b..333e35d542
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@@ -77,37 -80,41 +79,43 @@@ import org.apache.accumulo.core.fate.zo
import org.apache.accumulo.core.fate.zookeeper.ZooReaderWriter;
import org.apache.accumulo.core.fate.zookeeper.ZooUtil.NodeExistsPolicy;
import org.apache.accumulo.core.file.blockfile.cache.impl.BlockCacheConfiguration;
+import org.apache.accumulo.core.lock.ServiceLock;
+import org.apache.accumulo.core.lock.ServiceLock.LockWatcher;
+import org.apache.accumulo.core.lock.ServiceLockData;
+import org.apache.accumulo.core.lock.ServiceLockData.ServiceDescriptor;
+import org.apache.accumulo.core.lock.ServiceLockData.ServiceDescriptors;
+import org.apache.accumulo.core.lock.ServiceLockData.ThriftService;
+import org.apache.accumulo.core.lock.ServiceLockSupport.ServiceLockWatcher;
+import org.apache.accumulo.core.manager.thrift.BulkImportState;
+import org.apache.accumulo.core.manager.thrift.Compacting;
import org.apache.accumulo.core.manager.thrift.ManagerClientService;
-import org.apache.accumulo.core.master.thrift.BulkImportState;
-import org.apache.accumulo.core.master.thrift.Compacting;
-import org.apache.accumulo.core.master.thrift.TableInfo;
-import org.apache.accumulo.core.master.thrift.TabletServerStatus;
-import org.apache.accumulo.core.metadata.MetadataTable;
-import org.apache.accumulo.core.metadata.RootTable;
+import org.apache.accumulo.core.manager.thrift.TableInfo;
+import org.apache.accumulo.core.manager.thrift.TabletServerStatus;
+import org.apache.accumulo.core.metadata.AccumuloTable;
import org.apache.accumulo.core.metadata.TServerInstance;
+ import org.apache.accumulo.core.metadata.schema.Ample.DataLevel;
+import org.apache.accumulo.core.metadata.schema.TabletMetadata;
import org.apache.accumulo.core.metadata.schema.TabletsMetadata;
import org.apache.accumulo.core.metrics.MetricsInfo;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
import org.apache.accumulo.core.rpc.ThriftUtil;
import org.apache.accumulo.core.rpc.clients.ThriftClientTypes;
import org.apache.accumulo.core.spi.fs.VolumeChooserEnvironment;
++import org.apache.accumulo.core.tablet.thrift.TUnloadTabletGoal;
import org.apache.accumulo.core.tabletserver.log.LogEntry;
-import org.apache.accumulo.core.tabletserver.thrift.TUnloadTabletGoal;
import org.apache.accumulo.core.trace.TraceUtil;
import org.apache.accumulo.core.util.ComparablePair;
+ import org.apache.accumulo.core.util.Halt;
-import org.apache.accumulo.core.util.HostAndPort;
import org.apache.accumulo.core.util.MapCounter;
import org.apache.accumulo.core.util.Pair;
import org.apache.accumulo.core.util.Retry;
import org.apache.accumulo.core.util.Retry.RetryFactory;
-import org.apache.accumulo.core.util.ServerServices;
-import org.apache.accumulo.core.util.ServerServices.Service;
import org.apache.accumulo.core.util.UtilWaitThread;
+ import org.apache.accumulo.core.util.threads.ThreadPoolNames;
-import org.apache.accumulo.core.util.threads.ThreadPools;
import org.apache.accumulo.core.util.threads.Threads;
++import org.apache.accumulo.core.util.time.SteadyTime;
import org.apache.accumulo.server.AbstractServer;
-import org.apache.accumulo.server.GarbageCollectionLogger;
import org.apache.accumulo.server.ServerContext;
-import org.apache.accumulo.server.ServerOpts;
import org.apache.accumulo.server.TabletLevel;
import org.apache.accumulo.server.client.ClientServiceHandler;
import org.apache.accumulo.server.compaction.CompactionWatcher;
@@@ -167,11 -175,15 +175,12 @@@ import com.google.common.net.HostAndPor
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.context.Scope;
- public class TabletServer extends AbstractServer implements TabletHostingServer {
+ public class TabletServer extends AbstractServer
+ implements TabletHostingServer, ServerProcessService.Iface {
- private static final SecureRandom random = new SecureRandom();
private static final Logger log = LoggerFactory.getLogger(TabletServer.class);
- private static final long TIME_BETWEEN_GC_CHECKS = TimeUnit.SECONDS.toMillis(5);
private static final long TIME_BETWEEN_LOCATOR_CACHE_CLEARS = TimeUnit.HOURS.toMillis(1);
- final GarbageCollectionLogger gcLogger = new GarbageCollectionLogger();
final ZooCache managerLockCache;
final TabletServerLogger logger;
@@@ -596,9 -620,8 +602,9 @@@
thriftClientHandler = newTabletClientHandler(watcher, writeTracker);
scanClientHandler = newThriftScanClientHandler(writeTracker);
- TProcessor processor = ThriftProcessorTypes.getTabletServerTProcessor(this, clientHandler,
- thriftClientHandler, scanClientHandler, getContext());
+ TProcessor processor =
- ThriftProcessorTypes.getTabletServerTProcessor(clientHandler, thriftClientHandler,
++ ThriftProcessorTypes.getTabletServerTProcessor(this, clientHandler, thriftClientHandler,
+ scanClientHandler, thriftClientHandler, thriftClientHandler, getContext());
HostAndPort address = startServer(clientAddress.getHost(), processor);
log.info("address = {}", address);
return address;
@@@ -630,12 -685,13 +636,12 @@@
throw e;
}
- tabletServerLock = new ServiceLock(zoo.getZooKeeper(), zLockPath, UUID.randomUUID());
+ UUID tabletServerUUID = UUID.randomUUID();
+ tabletServerLock = new ServiceLock(getContext().getZooSession(), zLockPath, tabletServerUUID);
- LockWatcher lw = new ServiceLockWatcher("tablet server", () -> serverStopRequested,
+ LockWatcher lw = new ServiceLockWatcher("tablet server", () -> getShutdownComplete().get(),
- (name) -> gcLogger.logGCInfo(getConfiguration()));
+ (name) -> context.getLowMemoryDetector().logGCInfo(getConfiguration()));
- byte[] lockContent = new ServerServices(getClientAddressString(), Service.TSERV_CLIENT)
- .toString().getBytes(UTF_8);
for (int i = 0; i < 120 / 5; i++) {
zoo.putPersistentData(zLockPath.toString(), new byte[0], NodeExistsPolicy.SKIP);
@@@ -723,8 -784,22 +729,8 @@@
throw new RuntimeException(e);
}
- @SuppressWarnings("deprecation")
- ThreadPoolExecutor distWorkQThreadPool = ThreadPools.getServerThreadPools()
- .createExecutorService(getConfiguration(), Property.TSERV_WORKQ_THREADS, true);
-
- // TODO: Remove when Property.TSERV_WORKQ_THREADS is removed
- DistributedWorkQueue bulkFailedCopyQ = new DistributedWorkQueue(
- getContext().getZooKeeperRoot() + Constants.ZBULK_FAILED_COPYQ, getConfiguration(), this);
- try {
- bulkFailedCopyQ.startProcessing(new BulkFailedCopyProcessor(getContext()),
- distWorkQThreadPool);
- } catch (Exception e1) {
- throw new RuntimeException("Failed to start distributed work queue for copying ", e1);
- }
-
try {
- logSorter.startWatchingForRecoveryLogs();
+ logSorter.startWatchingForRecoveryLogs(this);
} catch (Exception ex) {
log.error("Error setting watches for recoveries");
throw new RuntimeException(ex);
@@@ -850,20 -933,82 +860,77 @@@
}
}
- // wait for shutdown
- // if the main thread exits oldServer the manager listener, the JVM will
- // kill the other threads and finalize objects. We want the shutdown that is
- // running in the manager listener thread to complete oldServer this happens.
- // consider making other threads daemon threads so that objects don't
- // get prematurely finalized
- synchronized (this) {
- while (!shutdownComplete) {
+ // Tell the Manager we are shutting down so that it doesn't try
+ // to assign tablets.
+ ManagerClientService.Client iface = managerConnection(getManagerAddress());
+ try {
+ iface.tabletServerStopping(TraceUtil.traceInfo(), getContext().rpcCreds(),
+ getClientAddressString());
+ } catch (TException e) {
+ LOG.error("Error informing Manager that we are shutting down, halting server", e);
+ Halt.halt("Error informing Manager that we are shutting down, exiting!", -1);
+ } finally {
+ returnManagerConnection(iface);
+ }
+
- log.debug("Stopping Replication Server");
- if (this.replServer != null) {
- this.replServer.stop();
- }
-
+ // Best-effort attempt at unloading tablets.
+ log.debug("Unloading tablets");
+ final List<Future<?>> futures = new ArrayList<>();
+ final ThreadPoolExecutor tpe = getContext().threadPools()
+ .getPoolBuilder(ThreadPoolNames.TSERVER_SHUTDOWN_UNLOAD_TABLET_POOL).numCoreThreads(8)
+ .numMaxThreads(16).build();
+
+ iface = managerConnection(getManagerAddress());
+ boolean managerDown = false;
+
+ try {
+ for (DataLevel level : new DataLevel[] {DataLevel.USER, DataLevel.METADATA, DataLevel.ROOT}) {
+ getOnlineTablets().keySet().forEach(ke -> {
+ if (DataLevel.of(ke.tableId()) == level) {
- futures.add(
- tpe.submit(new UnloadTabletHandler(this, ke, TUnloadTabletGoal.UNASSIGNED, 5000)));
++ futures.add(tpe.submit(new UnloadTabletHandler(this, ke, TUnloadTabletGoal.UNASSIGNED,
++ SteadyTime.from(System.currentTimeMillis(), TimeUnit.MILLISECONDS))));
+ }
+ });
+ while (!futures.isEmpty()) {
+ Iterator<Future<?>> unloads = futures.iterator();
+ while (unloads.hasNext()) {
+ Future<?> f = unloads.next();
+ if (f.isDone()) {
+ if (!managerDown) {
+ ManagerMessage mm = managerMessages.poll();
+ try {
+ mm.send(getContext().rpcCreds(), getClientAddressString(), iface);
+ } catch (TException e) {
+ managerDown = true;
+ LOG.debug("Error sending message to Manager during tablet unloading, msg: {}",
+ e.getMessage());
+ }
+ }
+ unloads.remove();
+ }
+ }
+ log.debug("Waiting on {} {} tablets to close.", futures.size(), level);
+ UtilWaitThread.sleep(1000);
+ }
+ log.debug("All {} tablets unloaded", level);
+ }
+ } finally {
+ if (!managerDown) {
try {
- this.wait(1000);
- } catch (InterruptedException e) {
- log.error(e.toString());
+ ManagerMessage mm = managerMessages.poll();
+ do {
+ if (mm != null) {
+ mm.send(getContext().rpcCreds(), getClientAddressString(), iface);
+ }
+ mm = managerMessages.poll();
+ } while (mm != null);
+ } catch (TException e) {
+ LOG.debug("Error sending message to Manager during tablet unloading, msg: {}",
+ e.getMessage());
}
}
+ returnManagerConnection(iface);
+ tpe.shutdown();
}
log.debug("Stopping Thrift Servers");
@@@ -878,10 -1023,10 +945,10 @@@
log.warn("Failed to close filesystem : {}", e.getMessage(), e);
}
- gcLogger.logGCInfo(getConfiguration());
+ context.getLowMemoryDetector().logGCInfo(getConfiguration());
+ getShutdownComplete().set(true);
log.info("TServerInfo: stop requested. exiting ... ");
-
try {
tabletServerLock.unlock();
} catch (Exception e) {
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java
index ec86d82a25,442b2f85f9..1810e04791
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java
@@@ -291,8 -294,11 +292,9 @@@ public class LogSorter
}
}
- public void startWatchingForRecoveryLogs() throws KeeperException, InterruptedException {
+ public void startWatchingForRecoveryLogs(AbstractServer server)
+ throws KeeperException, InterruptedException {
- @SuppressWarnings("deprecation")
- int threadPoolSize = this.conf.getCount(this.conf
- .resolve(Property.TSERV_WAL_SORT_MAX_CONCURRENT, Property.TSERV_RECOVERY_MAX_CONCURRENT));
+ int threadPoolSize = this.conf.getCount(Property.TSERV_WAL_SORT_MAX_CONCURRENT);
ThreadPoolExecutor threadPool =
ThreadPools.getServerThreadPools().getPoolBuilder(TSERVER_WAL_SORT_CONCURRENT_POOL)
.numCoreThreads(threadPoolSize).enableThreadPoolMetrics().build();
diff --cc server/tserver/src/test/java/org/apache/accumulo/tserver/ScanServerTest.java
index bbe8ffb3fc,5a08040872..567b6382e3
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/ScanServerTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/ScanServerTest.java
@@@ -45,10 -43,13 +45,11 @@@ import org.apache.accumulo.core.dataImp
import org.apache.accumulo.core.dataImpl.thrift.TColumn;
import org.apache.accumulo.core.dataImpl.thrift.TKeyExtent;
import org.apache.accumulo.core.dataImpl.thrift.TRange;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
+import org.apache.accumulo.core.tabletscan.thrift.TSamplerConfiguration;
import org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException;
import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
-import org.apache.accumulo.core.tabletserver.thrift.TSamplerConfiguration;
-import org.apache.accumulo.core.trace.thrift.TInfo;
-import org.apache.accumulo.core.util.HostAndPort;
import org.apache.accumulo.tserver.ScanServer.ScanReservation;
import org.apache.accumulo.tserver.session.ScanSession.TabletResolver;
import org.apache.accumulo.tserver.tablet.SnapshotTablet;
@@@ -57,11 -58,9 +58,11 @@@ import org.apache.accumulo.tserver.tabl
import org.apache.thrift.TException;
import org.junit.jupiter.api.Test;
+import com.google.common.net.HostAndPort;
+
public class ScanServerTest {
- public class TestScanServer extends ScanServer {
+ public class TestScanServer extends ScanServer implements ServerProcessService.Iface {
private KeyExtent extent;
private TabletResolver resolver;
diff --cc test/src/main/java/org/apache/accumulo/test/SelfStoppingScanServer.java
index 73284dc8c5,49b40af7f5..e8b9c6be6d
--- a/test/src/main/java/org/apache/accumulo/test/SelfStoppingScanServer.java
+++ b/test/src/main/java/org/apache/accumulo/test/SelfStoppingScanServer.java
@@@ -20,10 -20,10 +20,11 @@@ package org.apache.accumulo.test
import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.accumulo.core.cli.ConfigOpts;
+import org.apache.accumulo.core.clientImpl.thrift.TInfo;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
+import org.apache.accumulo.core.tabletscan.thrift.TabletScanClientService;
import org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException;
-import org.apache.accumulo.core.tabletserver.thrift.TabletScanClientService;
-import org.apache.accumulo.core.trace.thrift.TInfo;
import org.apache.accumulo.tserver.ScanServer;
import org.apache.accumulo.tserver.TabletHostingServer;
import org.apache.thrift.TException;
diff --cc test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionTServer.java
index 63fa29e156,0edd803d19..0e3d7aa6d0
--- a/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionTServer.java
+++ b/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionTServer.java
@@@ -18,15 -18,16 +18,16 @@@
*/
package org.apache.accumulo.test.compaction;
+import org.apache.accumulo.core.cli.ConfigOpts;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
-import org.apache.accumulo.server.ServerOpts;
import org.apache.accumulo.server.zookeeper.TransactionWatcher;
import org.apache.accumulo.tserver.TabletClientHandler;
import org.apache.accumulo.tserver.TabletServer;
import org.apache.accumulo.tserver.WriteTracker;
- public class ExternalCompactionTServer extends TabletServer {
+ public class ExternalCompactionTServer extends TabletServer implements ServerProcessService.Iface {
- ExternalCompactionTServer(ServerOpts opts, String[] args) {
+ ExternalCompactionTServer(ConfigOpts opts, String[] args) {
super(opts, args);
}
diff --cc test/src/main/java/org/apache/accumulo/test/compaction/TestCompactionCoordinatorForOfflineTable.java
index 8788d43236,48e86a5b67..5587b468e6
--- a/test/src/main/java/org/apache/accumulo/test/compaction/TestCompactionCoordinatorForOfflineTable.java
+++ b/test/src/main/java/org/apache/accumulo/test/compaction/TestCompactionCoordinatorForOfflineTable.java
@@@ -29,7 -28,9 +29,8 @@@ import org.apache.accumulo.core.dataImp
import org.apache.accumulo.core.metadata.schema.ExternalCompactionFinalState;
import org.apache.accumulo.core.metadata.schema.ExternalCompactionFinalState.FinalState;
import org.apache.accumulo.core.metadata.schema.ExternalCompactionId;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
import org.apache.accumulo.server.ServerContext;
-import org.apache.accumulo.server.ServerOpts;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --cc test/src/main/java/org/apache/accumulo/test/fate/FlakyFateManager.java
index 9b4cd325c2,691a21b8e9..4da9979998
--- a/test/src/main/java/org/apache/accumulo/test/fate/FlakyFateManager.java
+++ b/test/src/main/java/org/apache/accumulo/test/fate/FlakyFateManager.java
@@@ -20,17 -20,17 +20,18 @@@ package org.apache.accumulo.test.fate
import java.io.IOException;
+import org.apache.accumulo.core.cli.ConfigOpts;
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.fate.Fate;
import org.apache.accumulo.core.fate.TStore;
+ import org.apache.accumulo.core.process.thrift.ServerProcessService;
import org.apache.accumulo.manager.Manager;
import org.apache.accumulo.manager.tableOps.TraceRepo;
-import org.apache.accumulo.server.ServerOpts;
import org.slf4j.LoggerFactory;
- public class FlakyFateManager extends Manager {
+ public class FlakyFateManager extends Manager implements ServerProcessService.Iface {
- protected FlakyFateManager(ServerOpts opts, String[] args) throws IOException {
+ protected FlakyFateManager(ConfigOpts opts, String[] args) throws IOException {
super(opts, args);
}
diff --cc test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java
index 0000000000,a638459e56..c8e4eec16f
mode 000000,100644..100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java
@@@ -1,0 -1,274 +1,273 @@@
+ /*
+ * 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
+ *
+ * https://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.test.functional;
+
-import static java.nio.charset.StandardCharsets.UTF_8;
+ import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
+ import static org.junit.jupiter.api.Assertions.assertTrue;
+
+ import java.util.List;
+ import java.util.Map;
+ import java.util.Map.Entry;
++import java.util.Optional;
+ import java.util.Set;
+ import java.util.stream.IntStream;
+
+ import org.apache.accumulo.compactor.Compactor;
+ import org.apache.accumulo.coordinator.CompactionCoordinator;
+ import org.apache.accumulo.core.Constants;
+ import org.apache.accumulo.core.client.Accumulo;
+ import org.apache.accumulo.core.client.AccumuloClient;
+ import org.apache.accumulo.core.client.BatchWriter;
+ import org.apache.accumulo.core.client.IteratorSetting;
+ import org.apache.accumulo.core.client.Scanner;
+ import org.apache.accumulo.core.client.ScannerBase.ConsistencyLevel;
+ import org.apache.accumulo.core.client.admin.CompactionConfig;
+ import org.apache.accumulo.core.client.admin.NewTableConfiguration;
+ import org.apache.accumulo.core.conf.ClientProperty;
+ import org.apache.accumulo.core.conf.Property;
+ import org.apache.accumulo.core.data.Key;
+ import org.apache.accumulo.core.data.Mutation;
+ import org.apache.accumulo.core.data.Range;
+ import org.apache.accumulo.core.data.TableId;
+ import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.fate.zookeeper.ServiceLock;
-import org.apache.accumulo.core.fate.zookeeper.ServiceLock.ServiceLockPath;
++import org.apache.accumulo.core.lock.ServiceLock;
++import org.apache.accumulo.core.lock.ServiceLock.ServiceLockPath;
++import org.apache.accumulo.core.lock.ServiceLockData;
++import org.apache.accumulo.core.lock.ServiceLockData.ThriftService;
+ import org.apache.accumulo.core.metadata.schema.TabletsMetadata;
+ import org.apache.accumulo.core.security.Authorizations;
+ import org.apache.accumulo.core.spi.compaction.DefaultCompactionPlanner;
+ import org.apache.accumulo.core.spi.compaction.SimpleCompactionDispatcher;
-import org.apache.accumulo.core.util.HostAndPort;
-import org.apache.accumulo.core.util.ServerServices;
-import org.apache.accumulo.core.util.ServerServices.Service;
+ import org.apache.accumulo.harness.MiniClusterConfigurationCallback;
+ import org.apache.accumulo.harness.SharedMiniClusterBase;
+ import org.apache.accumulo.minicluster.ServerType;
+ import org.apache.accumulo.miniclusterImpl.MiniAccumuloClusterControl;
+ import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
+ import org.apache.accumulo.server.ServerContext;
+ import org.apache.accumulo.server.util.Admin;
+ import org.apache.accumulo.test.compaction.ExternalCompactionTestUtils;
+ import org.apache.accumulo.test.util.Wait;
+ import org.apache.accumulo.tserver.ScanServer;
+ import org.apache.hadoop.conf.Configuration;
+ import org.junit.jupiter.api.AfterAll;
+ import org.junit.jupiter.api.BeforeAll;
+ import org.junit.jupiter.api.Test;
+
++import com.google.common.net.HostAndPort;
++
+ public class GracefulShutdownIT extends SharedMiniClusterBase {
+
+ private static final String GROUP_NAME = "graceful";
+
+ // @formatter:off
+ private static final String clientConfiguration =
+ "["+
+ " {"+
+ " \"isDefault\": true,"+
+ " \"maxBusyTimeout\": \"5m\","+
+ " \"busyTimeoutMultiplier\": 8,"+
+ " \"group\":" + GROUP_NAME + "," +
+ " \"scanTypeActivations\": [graceful],"+
+ " \"attemptPlans\": ["+
+ " {"+
+ " \"servers\": \"3\","+
+ " \"busyTimeout\": \"33ms\","+
+ " \"salt\": \"one\""+
+ " }"+
+ " ]"+
+ " }"+
+ "]";
+ // @formatter:on
+
+ private static class GracefulShutdownITConfig implements MiniClusterConfigurationCallback {
+
+ @Override
+ public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration coreSite) {
+ cfg.setNumCompactors(0);
+ cfg.setNumScanServers(0);
+ cfg.setNumTservers(2);
+ cfg.setProperty(Property.COMPACTION_COORDINATOR_FINALIZER_COMPLETION_CHECK_INTERVAL, "5s");
+ cfg.setProperty(Property.COMPACTION_COORDINATOR_DEAD_COMPACTOR_CHECK_INTERVAL, "5s");
+ cfg.setProperty(Property.COMPACTION_COORDINATOR_TSERVER_COMPACTION_CHECK_INTERVAL, "3s");
+ cfg.setProperty(Property.COMPACTION_COORDINATOR_THRIFTCLIENT_PORTSEARCH, "true");
+ cfg.setProperty(Property.COMPACTOR_CANCEL_CHECK_INTERVAL, "5s");
+ cfg.setProperty(Property.COMPACTOR_PORTSEARCH, "true");
+ cfg.setProperty("tserver.compaction.major.service." + GROUP_NAME + ".planner",
+ DefaultCompactionPlanner.class.getName());
+ cfg.setProperty("tserver.compaction.major.service." + GROUP_NAME + ".planner.opts.executors",
+ "[{'name':'all', 'type': 'external', 'queue': '" + GROUP_NAME + "'}]");
+ cfg.setClientProperty(ClientProperty.SCAN_SERVER_SELECTOR_OPTS_PREFIX.getKey() + "profiles",
+ clientConfiguration);
+ // Timeout scan sessions after being idle for 3 seconds
+ cfg.setProperty(Property.TSERV_SESSION_MAXIDLE, "3s");
+ }
+ }
+
+ @BeforeAll
+ public static void startup() throws Exception {
+ SharedMiniClusterBase.startMiniClusterWithConfig(new GracefulShutdownITConfig());
+ }
+
+ @AfterAll
+ public static void shutdown() throws Exception {
+ SharedMiniClusterBase.stopMiniCluster();
+ }
+
+ @Test
+ public void testGracefulShutdown() throws Exception {
+
+ // Start ScanServers and Compactors using named groups
+ final MiniAccumuloClusterControl control = getCluster().getClusterControl();
+
+ try (final AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ final ServerContext ctx = getCluster().getServerContext();
+ final String tableName = getUniqueNames(1)[0];
+
+ final NewTableConfiguration ntc = new NewTableConfiguration();
+ ntc.setProperties(Map.of(Property.TABLE_MAJC_RATIO.getKey(), "10",
+ "table.compaction.dispatcher", SimpleCompactionDispatcher.class.getName(),
+ "table.compaction.dispatcher.opts.service", GROUP_NAME));
+
+ client.tableOperations().create(tableName, ntc);
+ final TableId tid = ctx.getTableId(tableName);
+
+ // Insert 10 rows, flush after every row to create 10 files
+ try (BatchWriter writer = client.createBatchWriter(tableName)) {
+ for (int i : IntStream.rangeClosed(1, 10).toArray()) {
+ String val = i + "";
+ Mutation m = new Mutation(val);
+ m.put(val, val, val);
+ writer.addMutation(m);
+ writer.flush();
+ client.tableOperations().flush(tableName, null, null, true);
+ }
+ }
+ long numFiles = getNumFilesForTable(ctx, tid);
+ assertEquals(10, numFiles);
+ client.instanceOperations().waitForBalance();
+
+ // Restart Garbage Collector
+ final ServiceLockPath gcLockPath =
+ ServiceLock.path(ctx.getZooKeeperRoot() + Constants.ZGC_LOCK);
- byte[] data = ServiceLock.getLockData(ctx.getZooReaderWriter().getZooKeeper(), gcLockPath);
- assertNotNull(data);
- final HostAndPort gcAddress =
- new ServerServices(new String(data, UTF_8)).getAddress(Service.GC_CLIENT);
++ Optional<ServiceLockData> data = ServiceLock.getLockData(ctx.getZooSession(), gcLockPath);
++ assertTrue(data.isPresent());
++ final HostAndPort gcAddress = data.orElseThrow().getAddress(ThriftService.GC);
+ assertTrue(!control.getProcesses(ServerType.GARBAGE_COLLECTOR).isEmpty());
+ // Don't call `new Admin().execute(new String[] {"signalShutdown", "-h ", host, "-p ",
+ // Integer.toString(port)})`
+ // because this poisons the SingletonManager and puts it into SERVER mode
+ Admin.signalGracefulShutdown(ctx, gcAddress.toString());
+ Wait.waitFor(() -> {
+ control.refreshProcesses(ServerType.GARBAGE_COLLECTOR);
+ return control.getProcesses(ServerType.GARBAGE_COLLECTOR).isEmpty();
+ });
+
+ // Restart Tablet Server
+ final List<String> tservers = client.instanceOperations().getTabletServers();
+ assertEquals(2, tservers.size());
+ final HostAndPort tserverAddress = HostAndPort.fromString(tservers.get(0));
+ Admin.signalGracefulShutdown(ctx, tserverAddress.toString());
+ Wait.waitFor(() -> {
+ control.refreshProcesses(ServerType.TABLET_SERVER);
+ return control.getProcesses(ServerType.TABLET_SERVER).size() == 1;
+ });
+ client.instanceOperations().waitForBalance();
+ control.start(ServerType.TABLET_SERVER);
+ Wait.waitFor(() -> control.getProcesses(ServerType.TABLET_SERVER).size() == 2);
+ client.instanceOperations().waitForBalance();
+
+ // Restart Manager
+ final List<String> managers = client.instanceOperations().getManagerLocations();
+ assertEquals(1, managers.size());
+ final HostAndPort managerAddress = HostAndPort.fromString(managers.get(0));
+ Admin.signalGracefulShutdown(ctx, managerAddress.toString());
+ Wait.waitFor(() -> {
+ control.refreshProcesses(ServerType.MANAGER);
+ return control.getProcesses(ServerType.MANAGER).isEmpty();
+ });
+ control.start(ServerType.MANAGER);
+ Wait.waitFor(() -> control.getProcesses(ServerType.MANAGER).size() == 1);
+ client.instanceOperations().waitForBalance();
+
+ // Compact table and shutdown compactor
+ control.startCoordinator(CompactionCoordinator.class);
+ getCluster().getConfig().setNumCompactors(1);
+ control.startCompactors(Compactor.class, 1, GROUP_NAME);
+ Wait.waitFor(() -> client.instanceOperations().getCompactors().size() == 1);
+ final Set<String> compactors = client.instanceOperations().getCompactors();
+ final HostAndPort compactorAddress = HostAndPort.fromString(compactors.iterator().next());
+
+ final CompactionConfig cc = new CompactionConfig();
+ final IteratorSetting is = new IteratorSetting(100, SlowIterator.class);
+ SlowIterator.setSeekSleepTime(is, 1000);
+ SlowIterator.setSleepTime(is, 1000);
+ cc.setIterators(List.of(is));
+ cc.setWait(false);
+
+ final long numFiles2 = getNumFilesForTable(ctx, tid);
+ assertEquals(numFiles2, numFiles);
+ assertEquals(0, ExternalCompactionTestUtils.getRunningCompactions(ctx).getCompactionsSize());
+ client.tableOperations().compact(tableName, cc);
+ Wait.waitFor(
+ () -> ExternalCompactionTestUtils.getRunningCompactions(ctx).getCompactionsSize() > 0);
+ Admin.signalGracefulShutdown(ctx, compactorAddress.toString());
+ Wait.waitFor(() -> {
+ control.refreshProcesses(ServerType.COMPACTOR);
+ return control.getProcesses(ServerType.COMPACTOR).isEmpty();
+ });
+ final long numFiles3 = getNumFilesForTable(ctx, tid);
+ assertTrue(numFiles3 < numFiles2);
+ assertEquals(1, numFiles3);
+
+ getCluster().getConfig().setNumScanServers(1);
+ control.startScanServer(ScanServer.class, 1, GROUP_NAME);
+ Wait.waitFor(() -> client.instanceOperations().getScanServers().size() == 1);
+ final Set<String> sservers = client.instanceOperations().getScanServers();
+ final HostAndPort sserver = HostAndPort.fromString(sservers.iterator().next());
+ try (final Scanner scanner = client.createScanner(tableName, Authorizations.EMPTY)) {
+ scanner.setRange(new Range());
+ scanner.setConsistencyLevel(ConsistencyLevel.EVENTUAL);
+ scanner.setExecutionHints(Map.of("scan_type", "graceful"));
+ scanner.addScanIterator(is); // add the slow iterator
+ scanner.setBatchSize(1);
+ int count = 0;
+ for (Entry<Key,Value> e : scanner) {
+ count++;
+ if (count == 2) {
+ Admin.signalGracefulShutdown(ctx, sserver.toString());
+ }
+ }
+ assertEquals(10, count);
+ Wait.waitFor(() -> {
+ control.refreshProcesses(ServerType.SCAN_SERVER);
+ return control.getProcesses(ServerType.SCAN_SERVER).isEmpty();
+ });
+
+ }
+
+ }
+
+ }
+
+ long getNumFilesForTable(ServerContext ctx, TableId tid) {
+ try (TabletsMetadata tablets = ctx.getAmple().readTablets().forTable(tid).build()) {
+ return tablets.stream().mapToLong(tm -> tm.getFiles().size()).sum();
+ }
+ }
+ }