This is an automated email from the ASF dual-hosted git repository.
dlmarion pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new f8bb900 Deprecate replication classes, properties, etc. (#2335)
f8bb900 is described below
commit f8bb900ae080fe0f54dfe04f9e1ad8c4dd2e7930
Author: Dave Marion <[email protected]>
AuthorDate: Fri Nov 12 17:10:23 2021 -0500
Deprecate replication classes, properties, etc. (#2335)
---
.../accumulo/core/client/AccumuloClient.java | 1 +
.../core/client/admin/ReplicationOperations.java | 1 +
.../client/replication/PeerExistsException.java | 1 +
.../client/replication/PeerNotFoundException.java | 1 +
.../accumulo/core/clientImpl/ClientContext.java | 2 +
.../core/clientImpl/ReplicationOperationsImpl.java | 1 +
.../org/apache/accumulo/core/conf/Property.java | 28 ++++
.../replication/AccumuloReplicationReplayer.java | 1 +
.../replication/ReplicationConfigurationUtil.java | 1 +
.../core/replication/ReplicationConstants.java | 1 +
.../core/replication/ReplicationSchema.java | 3 +
.../core/replication/ReplicationTable.java | 1 +
.../ReplicationTableOfflineException.java | 1 +
.../core/replication/ReplicationTarget.java | 1 +
.../org/apache/accumulo/core/util/Validators.java | 4 +-
.../org/apache/accumulo/core/data/TableIdTest.java | 8 +-
.../core/metadata/MetadataServicerTest.java | 15 ++-
.../ReplicationConfigurationUtilTest.java | 1 +
.../core/replication/ReplicationSchemaTest.java | 1 +
.../core/replication/ReplicationTargetTest.java | 1 +
.../apache/accumulo/core/util/ValidatorsTest.java | 17 ++-
.../miniclusterImpl/MiniAccumuloConfigImpl.java | 8 +-
.../org/apache/accumulo/server/fs/VolumeUtil.java | 1 +
.../apache/accumulo/server/init/Initialize.java | 49 +++++--
.../DistributedWorkQueueWorkAssignerHelper.java | 1 +
.../accumulo/server/replication/ReplicaSystem.java | 1 +
.../server/replication/ReplicaSystemFactory.java | 1 +
.../server/replication/ReplicaSystemHelper.java | 1 +
.../server/replication/ReplicationUtil.java | 1 +
.../server/replication/StatusCombiner.java | 2 +
.../server/replication/StatusFormatter.java | 1 +
.../accumulo/server/replication/StatusUtil.java | 1 +
.../accumulo/server/replication/WorkAssigner.java | 1 +
.../replication/ZooKeeperInitialization.java | 7 +-
.../server/replication/proto/Replication.java | 3 +-
.../server/security/SecurityOperation.java | 5 +-
.../accumulo/server/util/ReplicationTableUtil.java | 5 +-
.../server/replication/ReplicationUtilTest.java | 1 +
.../server/replication/StatusCombinerTest.java | 1 +
.../server/replication/StatusUtilTest.java | 1 +
.../server/replication/proto/StatusTest.java | 1 +
.../server/util/ReplicationTableUtilTest.java | 1 +
.../accumulo/server/util/TServerUtilsTest.java | 4 +-
.../accumulo/gc/GarbageCollectWriteAheadLogs.java | 1 +
.../accumulo/gc/GarbageCollectionAlgorithm.java | 4 +-
.../apache/accumulo/gc/SimpleGarbageCollector.java | 2 +
.../replication/CloseWriteAheadLogReferences.java | 1 +
.../gc/GarbageCollectWriteAheadLogsTest.java | 20 ++-
.../apache/accumulo/gc/GarbageCollectionTest.java | 1 +
.../java/org/apache/accumulo/manager/Manager.java | 23 ++--
.../manager/ManagerClientServiceHandler.java | 2 +
.../accumulo/manager/metrics/ManagerMetrics.java | 4 +-
.../manager/metrics/ReplicationMetrics.java | 1 +
.../DistributedWorkQueueWorkAssigner.java | 1 +
.../manager/replication/FinishedWorkUpdater.java | 1 +
.../replication/ManagerReplicationCoordinator.java | 1 +
.../RemoveCompleteReplicationRecords.java | 1 +
.../manager/replication/ReplicationDriver.java | 1 +
.../replication/SequentialWorkAssigner.java | 1 +
.../accumulo/manager/replication/StatusMaker.java | 1 +
.../manager/replication/UnorderedWorkAssigner.java | 1 +
.../accumulo/manager/replication/WorkDriver.java | 1 +
.../accumulo/manager/replication/WorkMaker.java | 1 +
.../manager/metrics/ReplicationMetricsTest.java | 1 +
...DistributedWorkQueueWorkAssignerHelperTest.java | 1 +
.../ManagerReplicationCoordinatorTest.java | 1 +
.../replication/SequentialWorkAssignerTest.java | 1 +
.../replication/UnorderedWorkAssignerTest.java | 1 +
.../manager/replication/WorkMakerTest.java | 1 +
.../rest/replication/ReplicationInformation.java | 1 +
.../rest/replication/ReplicationResource.java | 1 +
.../org/apache/accumulo/tserver/TabletServer.java | 31 +++--
.../accumulo/tserver/log/TabletServerLogger.java | 7 +-
.../tserver/replication/AccumuloReplicaSystem.java | 146 +--------------------
.../BatchWriterReplicationReplayer.java | 1 +
.../tserver/replication/ReplicationProcessor.java | 1 +
.../replication/ReplicationServicerHandler.java | 1 +
.../tserver/replication/ReplicationStats.java | 64 +++++++++
.../tserver/replication/ReplicationWorker.java | 1 +
.../tserver/replication/WalClientExecReturn.java | 97 ++++++++++++++
.../tserver/replication/WalReplication.java | 63 +++++++++
.../accumulo/tserver/tablet/DatafileManager.java | 6 +-
.../org/apache/accumulo/tserver/tablet/Tablet.java | 8 +-
.../replication/AccumuloReplicaSystemTest.java | 8 +-
.../BatchWriterReplicationReplayerTest.java | 1 +
.../replication/ReplicationProcessorTest.java | 1 +
.../test/ManagerRepairsDualAssignmentIT.java | 6 +-
.../CloseWriteAheadLogReferencesIT.java | 1 +
.../test/replication/CyclicReplicationIT.java | 1 +
.../test/replication/FinishedWorkUpdaterIT.java | 1 +
...GarbageCollectorCommunicatesWithTServersIT.java | 1 +
.../test/replication/KerberosReplicationIT.java | 1 +
.../test/replication/MockReplicaSystem.java | 1 +
.../replication/MultiInstanceReplicationIT.java | 1 +
.../replication/MultiTserverReplicationIT.java | 1 +
.../RemoveCompleteReplicationRecordsIT.java | 1 +
.../accumulo/test/replication/ReplicationIT.java | 1 +
.../replication/ReplicationOperationsImplIT.java | 1 +
.../test/replication/SequentialWorkAssignerIT.java | 1 +
.../test/replication/StatusCombinerMacIT.java | 1 +
.../accumulo/test/replication/StatusMakerIT.java | 1 +
.../test/replication/UnorderedWorkAssignerIT.java | 1 +
.../UnorderedWorkAssignerReplicationIT.java | 1 +
.../UnusedWalDoesntCloseReplicationStatusIT.java | 1 +
.../accumulo/test/replication/WorkMakerIT.java | 1 +
105 files changed, 509 insertions(+), 216 deletions(-)
diff --git
a/core/src/main/java/org/apache/accumulo/core/client/AccumuloClient.java
b/core/src/main/java/org/apache/accumulo/core/client/AccumuloClient.java
index 020e936..1cf9d18 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/AccumuloClient.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/AccumuloClient.java
@@ -323,6 +323,7 @@ public interface AccumuloClient extends AutoCloseable {
*
* @return an object to modify replication configuration
*/
+ @Deprecated(since = "2.1.0")
ReplicationOperations replicationOperations();
/**
diff --git
a/core/src/main/java/org/apache/accumulo/core/client/admin/ReplicationOperations.java
b/core/src/main/java/org/apache/accumulo/core/client/admin/ReplicationOperations.java
index 2ee63eb..3c815da 100644
---
a/core/src/main/java/org/apache/accumulo/core/client/admin/ReplicationOperations.java
+++
b/core/src/main/java/org/apache/accumulo/core/client/admin/ReplicationOperations.java
@@ -31,6 +31,7 @@ import
org.apache.accumulo.core.client.replication.PeerNotFoundException;
*
* @since 1.7.0
*/
+@Deprecated
public interface ReplicationOperations {
/**
diff --git
a/core/src/main/java/org/apache/accumulo/core/client/replication/PeerExistsException.java
b/core/src/main/java/org/apache/accumulo/core/client/replication/PeerExistsException.java
index 9654f9f..1a02d31 100644
---
a/core/src/main/java/org/apache/accumulo/core/client/replication/PeerExistsException.java
+++
b/core/src/main/java/org/apache/accumulo/core/client/replication/PeerExistsException.java
@@ -21,6 +21,7 @@ package org.apache.accumulo.core.client.replication;
/**
* The peer already exists
*/
+@Deprecated(since = "2.1.0")
public class PeerExistsException extends Exception {
private static final long serialVersionUID = 1L;
diff --git
a/core/src/main/java/org/apache/accumulo/core/client/replication/PeerNotFoundException.java
b/core/src/main/java/org/apache/accumulo/core/client/replication/PeerNotFoundException.java
index 07d36b2..d82e4d8 100644
---
a/core/src/main/java/org/apache/accumulo/core/client/replication/PeerNotFoundException.java
+++
b/core/src/main/java/org/apache/accumulo/core/client/replication/PeerNotFoundException.java
@@ -21,6 +21,7 @@ package org.apache.accumulo.core.client.replication;
/**
* The peer already exists
*/
+@Deprecated(since = "2.1.0")
public class PeerNotFoundException extends Exception {
private static final long serialVersionUID = 1L;
diff --git
a/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
b/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
index 9e3fdce..99f2413 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
@@ -121,6 +121,7 @@ public class ClientContext implements AccumuloClient {
private TableOperationsImpl tableops = null;
private NamespaceOperations namespaceops = null;
private InstanceOperations instanceops = null;
+ @SuppressWarnings("deprecation")
private ReplicationOperations replicationops = null;
private final SingletonReservation singletonReservation;
@@ -683,6 +684,7 @@ public class ClientContext implements AccumuloClient {
}
@Override
+ @Deprecated
public synchronized ReplicationOperations replicationOperations() {
ensureOpen();
if (replicationops == null) {
diff --git
a/core/src/main/java/org/apache/accumulo/core/clientImpl/ReplicationOperationsImpl.java
b/core/src/main/java/org/apache/accumulo/core/clientImpl/ReplicationOperationsImpl.java
index 7b143cb..dfaf742 100644
---
a/core/src/main/java/org/apache/accumulo/core/clientImpl/ReplicationOperationsImpl.java
+++
b/core/src/main/java/org/apache/accumulo/core/clientImpl/ReplicationOperationsImpl.java
@@ -48,6 +48,7 @@ import org.apache.hadoop.io.Text;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Deprecated
public class ReplicationOperationsImpl implements ReplicationOperations {
private static final Logger log =
LoggerFactory.getLogger(ReplicationOperationsImpl.class);
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 00326e3..4b8323a 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -353,16 +353,20 @@ public enum Property {
"The number of threads used to run fault-tolerant executions (FATE)."
+ " These are primarily table operations like merge.",
"1.4.3"),
+ @Deprecated(since = "2.1.0")
MANAGER_REPLICATION_SCAN_INTERVAL("manager.replication.status.scan.interval",
"30s",
PropertyType.TIMEDURATION,
"Amount of time to sleep before scanning the status section of the "
+ "replication table for new data",
"1.7.0"),
+ @Deprecated(since = "2.1.0")
MANAGER_REPLICATION_COORDINATOR_PORT("manager.replication.coordinator.port",
"10001",
PropertyType.PORT, "Port for the replication coordinator service",
"1.7.0"),
+ @Deprecated(since = "2.1.0")
MANAGER_REPLICATION_COORDINATOR_MINTHREADS("manager.replication.coordinator.minthreads",
"4",
PropertyType.COUNT, "Minimum number of threads dedicated to answering
coordinator requests",
"1.7.0"),
+ @Deprecated(since = "2.1.0")
MANAGER_REPLICATION_COORDINATOR_THREADCHECK("manager.replication.coordinator.threadcheck.time",
"5s", PropertyType.TIMEDURATION,
"The time between adjustments of the coordinator thread pool", "1.7.0"),
@@ -716,11 +720,14 @@ public enum Property {
+ " warning along with the current stack trace. Meant to help debug
stuck"
+ " assignments",
"1.6.2"),
+ @Deprecated(since = "2.1.0")
TSERV_REPLICATION_REPLAYERS("tserver.replication.replayer.", null,
PropertyType.PREFIX,
"Allows configuration of implementation used to apply replicated data",
"1.7.0"),
+ @Deprecated(since = "2.1.0")
TSERV_REPLICATION_DEFAULT_HANDLER("tserver.replication.default.replayer",
"org.apache.accumulo.tserver.replication.BatchWriterReplicationReplayer",
PropertyType.CLASSNAME, "Default AccumuloReplicationReplayer
implementation", "1.7.0"),
+ @Deprecated(since = "2.1.0")
TSERV_REPLICATION_BW_REPLAYER_MEMORY("tserver.replication.batchwriter.replayer.memory",
"50M",
PropertyType.BYTES, "Memory to provide to batchwriter to replay
mutations for replication",
"1.7.0"),
@@ -1108,8 +1115,10 @@ public enum Property {
@ReplacedBy(property = TABLE_CLASSLOADER_CONTEXT)
TABLE_CLASSPATH("table.classpath.context", "", PropertyType.STRING, "Per
table classpath context",
"1.5.0"),
+ @Deprecated(since = "2.1.0")
TABLE_REPLICATION("table.replication", "false", PropertyType.BOOLEAN,
"Is replication enabled for the given table", "1.7.0"),
+ @Deprecated(since = "2.1.0")
TABLE_REPLICATION_TARGET("table.replication.target.", null,
PropertyType.PREFIX,
"Enumerate a mapping of other systems which this table should replicate"
+ " their data to. The key suffix is the identifying cluster name
and the"
@@ -1196,51 +1205,69 @@ public enum Property {
"1.5.0"),
// General properties for configuring replication
+ @Deprecated(since = "2.1.0")
REPLICATION_PREFIX("replication.", null, PropertyType.PREFIX,
"Properties in this category affect the replication of data to other
Accumulo instances.",
"1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_PEERS("replication.peer.", null, PropertyType.PREFIX,
"Properties in this category control what systems data can be replicated
to", "1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_PEER_USER("replication.peer.user.", null, PropertyType.PREFIX,
"The username to provide when authenticating with the given peer",
"1.7.0"),
@Sensitive
+ @Deprecated(since = "2.1.0")
REPLICATION_PEER_PASSWORD("replication.peer.password.", null,
PropertyType.PREFIX,
"The password to provide when authenticating with the given peer",
"1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_PEER_KEYTAB("replication.peer.keytab.", null,
PropertyType.PREFIX,
"The keytab to use when authenticating with the given peer", "1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_NAME("replication.name", "", PropertyType.STRING,
"Name of this cluster with respect to replication. Used to identify this"
+ " instance from other peers",
"1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_MAX_WORK_QUEUE("replication.max.work.queue", "1000",
PropertyType.COUNT,
"Upper bound of the number of files queued for replication", "1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_WORK_ASSIGNMENT_SLEEP("replication.work.assignment.sleep", "30s",
PropertyType.TIMEDURATION, "Amount of time to sleep between replication
work assignment",
"1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_WORKER_THREADS("replication.worker.threads", "4",
PropertyType.COUNT,
"Size of the threadpool that each tabletserver devotes to replicating
data", "1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_RECEIPT_SERVICE_PORT("replication.receipt.service.port",
"10002", PropertyType.PORT,
"Listen port used by thrift service in tserver listening for
replication", "1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_WORK_ATTEMPTS("replication.work.attempts", "10",
PropertyType.COUNT,
"Number of attempts to try to replicate some data before giving up and"
+ " letting it naturally be retried later",
"1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_MIN_THREADS("replication.receiver.min.threads", "1",
PropertyType.COUNT,
"Minimum number of threads for replication", "1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_THREADCHECK("replication.receiver.threadcheck.time", "30s",
PropertyType.TIMEDURATION,
"The time between adjustments of the replication thread pool.", "1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_MAX_UNIT_SIZE("replication.max.unit.size", "64M",
PropertyType.BYTES,
"Maximum size of data to send in a replication message", "1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_WORK_ASSIGNER("replication.work.assigner",
"org.apache.accumulo.manager.replication.UnorderedWorkAssigner",
PropertyType.CLASSNAME,
"Replication WorkAssigner implementation to use", "1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_DRIVER_DELAY("replication.driver.delay", "0s",
PropertyType.TIMEDURATION,
"Amount of time to wait before the replication work loop begins in the
manager.", "1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_WORK_PROCESSOR_DELAY("replication.work.processor.delay", "0s",
PropertyType.TIMEDURATION,
"Amount of time to wait before first checking for replication work, not"
+ " useful outside of tests",
"1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_WORK_PROCESSOR_PERIOD("replication.work.processor.period", "0s",
PropertyType.TIMEDURATION,
"Amount of time to wait before re-checking for replication work, not"
@@ -1249,6 +1276,7 @@ public enum Property {
@Deprecated(since = "2.1.0", forRemoval = true)
REPLICATION_TRACE_PERCENT("replication.trace.percent", "0.1",
PropertyType.FRACTION,
"The sampling percentage to use for replication traces", "1.7.0"),
+ @Deprecated(since = "2.1.0")
REPLICATION_RPC_TIMEOUT("replication.rpc.timeout", "2m",
PropertyType.TIMEDURATION,
"Amount of time for a single replication RPC call to last before failing"
+ " the attempt. See replication.work.attempts.",
diff --git
a/core/src/main/java/org/apache/accumulo/core/replication/AccumuloReplicationReplayer.java
b/core/src/main/java/org/apache/accumulo/core/replication/AccumuloReplicationReplayer.java
index 97545a1..fe31b98 100644
---
a/core/src/main/java/org/apache/accumulo/core/replication/AccumuloReplicationReplayer.java
+++
b/core/src/main/java/org/apache/accumulo/core/replication/AccumuloReplicationReplayer.java
@@ -24,6 +24,7 @@ import org.apache.accumulo.core.clientImpl.ClientContext;
import org.apache.accumulo.core.replication.thrift.RemoteReplicationException;
import org.apache.accumulo.core.replication.thrift.WalEdits;
+@Deprecated(since = "2.1.0")
public interface AccumuloReplicationReplayer {
long replicateLog(ClientContext context, String tableName, WalEdits data)
diff --git
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationConfigurationUtil.java
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationConfigurationUtil.java
index ba77318..e56ef5b 100644
---
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationConfigurationUtil.java
+++
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationConfigurationUtil.java
@@ -25,6 +25,7 @@ import org.apache.accumulo.core.dataImpl.KeyExtent;
/**
* Encapsulates configuration semantics around replication
*/
+@Deprecated
public class ReplicationConfigurationUtil {
/**
diff --git
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationConstants.java
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationConstants.java
index 4534638..795e065 100644
---
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationConstants.java
+++
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationConstants.java
@@ -18,6 +18,7 @@
*/
package org.apache.accumulo.core.replication;
+@Deprecated
public class ReplicationConstants {
// Constants for replication information in zookeeper
diff --git
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationSchema.java
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationSchema.java
index 626ed34..9589fc8 100644
---
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationSchema.java
+++
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationSchema.java
@@ -51,6 +51,7 @@ public class ReplicationSchema {
* </code>
* </pre>
*/
+ @Deprecated
public static class WorkSection {
public static final Text NAME = new Text("work");
private static final ByteSequence BYTE_SEQ_NAME = new
ArrayByteSequence("work");
@@ -94,6 +95,7 @@ public class ReplicationSchema {
* </code>
* </pre>
*/
+ @Deprecated
public static class StatusSection {
public static final Text NAME = new Text("repl");
private static final ByteSequence BYTE_SEQ_NAME = new
ArrayByteSequence("repl");
@@ -152,6 +154,7 @@ public class ReplicationSchema {
* </code>
* </pre>
*/
+ @Deprecated
public static class OrderSection {
public static final Text NAME = new Text("order");
public static final Text ROW_SEPARATOR = new Text(new byte[] {0});
diff --git
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
index e26a2ad..1117cb5 100644
---
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
+++
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
@@ -42,6 +42,7 @@ import org.apache.hadoop.io.Text;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Deprecated
public class ReplicationTable {
private static final Logger log =
LoggerFactory.getLogger(ReplicationTable.class);
diff --git
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTableOfflineException.java
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTableOfflineException.java
index 169fe9c..33e594b 100644
---
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTableOfflineException.java
+++
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTableOfflineException.java
@@ -20,6 +20,7 @@ package org.apache.accumulo.core.replication;
import org.apache.accumulo.core.client.TableOfflineException;
+@Deprecated
public class ReplicationTableOfflineException extends Exception {
private static final long serialVersionUID = 1L;
diff --git
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTarget.java
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTarget.java
index 65f31b5..085a7d3 100644
---
a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTarget.java
+++
b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTarget.java
@@ -34,6 +34,7 @@ import org.apache.hadoop.io.WritableUtils;
/**
* Container for where some work needs to be replicated
*/
+@Deprecated
public class ReplicationTarget implements Writable {
private String peerName;
diff --git a/core/src/main/java/org/apache/accumulo/core/util/Validators.java
b/core/src/main/java/org/apache/accumulo/core/util/Validators.java
index 777e308..ba5964c 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/Validators.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/Validators.java
@@ -176,7 +176,9 @@ public class Validators {
public static final Validator<TableId> VALID_TABLE_ID = new Validator<>(id
-> {
if (id == null)
return Optional.of("Table id must not be null");
- if (RootTable.ID.equals(id) || MetadataTable.ID.equals(id) ||
ReplicationTable.ID.equals(id)
+ @SuppressWarnings("deprecation")
+ TableId replicationId = ReplicationTable.ID;
+ if (RootTable.ID.equals(id) || MetadataTable.ID.equals(id) ||
replicationId.equals(id)
|| VALID_ID_PATTERN.matcher(id.canonical()).matches())
return Validator.OK;
return Optional
diff --git a/core/src/test/java/org/apache/accumulo/core/data/TableIdTest.java
b/core/src/test/java/org/apache/accumulo/core/data/TableIdTest.java
index 4810b43..8ff40c8 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/TableIdTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/TableIdTest.java
@@ -53,10 +53,14 @@ public class TableIdTest {
@Test
public void testCacheNoDuplicates() {
+
+ @SuppressWarnings("deprecation")
+ TableId REPL_TABLE_ID = ReplicationTable.ID;
+
// the next two lines just preloads the built-ins, since they now exist in
a separate class from
// TableId, and aren't preloaded when the TableId class is referenced
assertNotSame(RootTable.ID, MetadataTable.ID);
- assertNotSame(RootTable.ID, ReplicationTable.ID);
+ assertNotSame(RootTable.ID, REPL_TABLE_ID);
String tableString = "table-" + name.getMethodName();
long initialSize = cacheCount();
@@ -70,7 +74,7 @@ public class TableIdTest {
builtInTableId = TableId.of("+r");
assertSame(RootTable.ID, builtInTableId);
builtInTableId = TableId.of("+rep");
- assertSame(ReplicationTable.ID, builtInTableId);
+ assertSame(REPL_TABLE_ID, builtInTableId);
table1 = TableId.of(tableString);
assertEquals(initialSize + 1, cacheCount());
assertEquals(tableString, table1.canonical());
diff --git
a/core/src/test/java/org/apache/accumulo/core/metadata/MetadataServicerTest.java
b/core/src/test/java/org/apache/accumulo/core/metadata/MetadataServicerTest.java
index c04fc03..d30d045 100644
---
a/core/src/test/java/org/apache/accumulo/core/metadata/MetadataServicerTest.java
+++
b/core/src/test/java/org/apache/accumulo/core/metadata/MetadataServicerTest.java
@@ -41,12 +41,17 @@ public class MetadataServicerTest {
private static final TableId userTableId = TableId.of("tableId");
private static ClientContext context;
+ @SuppressWarnings("deprecation")
+ private static final TableId REPL_TABLE_ID = ReplicationTable.ID;
+ @SuppressWarnings("deprecation")
+ private static final String REPL_TABLE_NAME = ReplicationTable.NAME;
+
@BeforeClass
public static void setupContext() {
HashMap<String,String> tableNameToIdMap = new HashMap<>();
tableNameToIdMap.put(RootTable.NAME, RootTable.ID.canonical());
tableNameToIdMap.put(MetadataTable.NAME, MetadataTable.ID.canonical());
- tableNameToIdMap.put(ReplicationTable.NAME,
ReplicationTable.ID.canonical());
+ tableNameToIdMap.put(REPL_TABLE_NAME, REPL_TABLE_ID.canonical());
tableNameToIdMap.put(userTableName, userTableId.canonical());
context = EasyMock.createMock(ClientContext.class);
@@ -75,11 +80,11 @@ public class MetadataServicerTest {
assertEquals(RootTable.NAME, ((TableMetadataServicer)
ms).getServicingTableName());
assertEquals(MetadataTable.ID, ms.getServicedTableId());
- ms = MetadataServicer.forTableId(context, ReplicationTable.ID);
+ ms = MetadataServicer.forTableId(context, REPL_TABLE_ID);
assertTrue(ms instanceof ServicerForUserTables);
assertTrue(ms instanceof TableMetadataServicer);
assertEquals(MetadataTable.NAME, ((TableMetadataServicer)
ms).getServicingTableName());
- assertEquals(ReplicationTable.ID, ms.getServicedTableId());
+ assertEquals(REPL_TABLE_ID, ms.getServicedTableId());
ms = MetadataServicer.forTableId(context, userTableId);
assertTrue(ms instanceof ServicerForUserTables);
@@ -98,11 +103,11 @@ public class MetadataServicerTest {
assertEquals(RootTable.NAME, ((TableMetadataServicer)
ms).getServicingTableName());
assertEquals(MetadataTable.ID, ms.getServicedTableId());
- ms = MetadataServicer.forTableName(context, ReplicationTable.NAME);
+ ms = MetadataServicer.forTableName(context, REPL_TABLE_NAME);
assertTrue(ms instanceof ServicerForUserTables);
assertTrue(ms instanceof TableMetadataServicer);
assertEquals(MetadataTable.NAME, ((TableMetadataServicer)
ms).getServicingTableName());
- assertEquals(ReplicationTable.ID, ms.getServicedTableId());
+ assertEquals(REPL_TABLE_ID, ms.getServicedTableId());
ms = MetadataServicer.forTableName(context, userTableName);
assertTrue(ms instanceof ServicerForUserTables);
diff --git
a/core/src/test/java/org/apache/accumulo/core/replication/ReplicationConfigurationUtilTest.java
b/core/src/test/java/org/apache/accumulo/core/replication/ReplicationConfigurationUtilTest.java
index 9397ee8..ff49857 100644
---
a/core/src/test/java/org/apache/accumulo/core/replication/ReplicationConfigurationUtilTest.java
+++
b/core/src/test/java/org/apache/accumulo/core/replication/ReplicationConfigurationUtilTest.java
@@ -35,6 +35,7 @@ import org.apache.hadoop.io.Text;
import org.junit.Before;
import org.junit.Test;
+@Deprecated
public class ReplicationConfigurationUtilTest {
private AccumuloConfiguration conf;
diff --git
a/core/src/test/java/org/apache/accumulo/core/replication/ReplicationSchemaTest.java
b/core/src/test/java/org/apache/accumulo/core/replication/ReplicationSchemaTest.java
index caaaf2b..3584f8d 100644
---
a/core/src/test/java/org/apache/accumulo/core/replication/ReplicationSchemaTest.java
+++
b/core/src/test/java/org/apache/accumulo/core/replication/ReplicationSchemaTest.java
@@ -29,6 +29,7 @@ import
org.apache.accumulo.core.replication.ReplicationSchema.WorkSection;
import org.apache.hadoop.io.Text;
import org.junit.Test;
+@Deprecated
public class ReplicationSchemaTest {
@Test
diff --git
a/core/src/test/java/org/apache/accumulo/core/replication/ReplicationTargetTest.java
b/core/src/test/java/org/apache/accumulo/core/replication/ReplicationTargetTest.java
index a39d868..42a39ee 100644
---
a/core/src/test/java/org/apache/accumulo/core/replication/ReplicationTargetTest.java
+++
b/core/src/test/java/org/apache/accumulo/core/replication/ReplicationTargetTest.java
@@ -27,6 +27,7 @@ import org.apache.hadoop.io.DataOutputBuffer;
import org.apache.hadoop.io.Text;
import org.junit.Test;
+@Deprecated
public class ReplicationTargetTest {
@Test
diff --git
a/core/src/test/java/org/apache/accumulo/core/util/ValidatorsTest.java
b/core/src/test/java/org/apache/accumulo/core/util/ValidatorsTest.java
index fdbf328..6a18c4e 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/ValidatorsTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/ValidatorsTest.java
@@ -36,6 +36,11 @@ import org.junit.Test;
public class ValidatorsTest {
+ @SuppressWarnings("deprecation")
+ private static final TableId REPL_TABLE_ID = ReplicationTable.ID;
+ @SuppressWarnings("deprecation")
+ private static final String REPL_TABLE_NAME = ReplicationTable.NAME;
+
private static <T> void checkNull(Consumer<T> nullConsumer) {
var e = assertThrows(IllegalArgumentException.class, () ->
nullConsumer.accept(null));
assertTrue(e.getMessage().endsWith("must not be null"));
@@ -56,7 +61,7 @@ public class ValidatorsTest {
public void test_CAN_CLONE_TABLE() {
Validator<TableId> v = Validators.CAN_CLONE_TABLE;
checkNull(v::validate);
- assertAllValidate(v, List.of(ReplicationTable.ID, TableId.of("id1")));
+ assertAllValidate(v, List.of(REPL_TABLE_ID, TableId.of("id1")));
assertAllThrow(v, List.of(RootTable.ID, MetadataTable.ID));
}
@@ -118,14 +123,14 @@ public class ValidatorsTest {
Validator<String> v = Validators.NOT_BUILTIN_TABLE;
checkNull(v::validate);
assertAllValidate(v, List.of("root", "metadata", "user", "ns1.table2"));
- assertAllThrow(v, List.of(RootTable.NAME, MetadataTable.NAME,
ReplicationTable.NAME));
+ assertAllThrow(v, List.of(RootTable.NAME, MetadataTable.NAME,
REPL_TABLE_NAME));
}
@Test
public void test_NOT_METADATA_TABLE() {
Validator<String> v = Validators.NOT_METADATA_TABLE;
checkNull(v::validate);
- assertAllValidate(v, List.of("root", "metadata", "user", "ns1.table2",
ReplicationTable.NAME));
+ assertAllValidate(v, List.of("root", "metadata", "user", "ns1.table2",
REPL_TABLE_NAME));
assertAllThrow(v, List.of(RootTable.NAME, MetadataTable.NAME));
}
@@ -134,7 +139,7 @@ public class ValidatorsTest {
Validator<TableId> v = Validators.NOT_ROOT_TABLE_ID;
checkNull(v::validate);
assertAllValidate(v,
- List.of(TableId.of(""), MetadataTable.ID, ReplicationTable.ID,
TableId.of(" #0(U!$. ")));
+ List.of(TableId.of(""), MetadataTable.ID, REPL_TABLE_ID, TableId.of("
#0(U!$. ")));
assertAllThrow(v, List.of(RootTable.ID));
}
@@ -142,8 +147,8 @@ public class ValidatorsTest {
public void test_VALID_TABLE_ID() {
Validator<TableId> v = Validators.VALID_TABLE_ID;
checkNull(v::validate);
- assertAllValidate(v, List.of(RootTable.ID, MetadataTable.ID,
ReplicationTable.ID,
- TableId.of("111"), TableId.of("aaaa"), TableId.of("r2d2")));
+ assertAllValidate(v, List.of(RootTable.ID, MetadataTable.ID,
REPL_TABLE_ID, TableId.of("111"),
+ TableId.of("aaaa"), TableId.of("r2d2")));
assertAllThrow(v, List.of(TableId.of(""), TableId.of("#0(U!$"),
TableId.of(" #0(U!$. "),
TableId.of("."), TableId.of(" "), TableId.of("C3P0")));
}
diff --git
a/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloConfigImpl.java
b/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloConfigImpl.java
index 6df2767..1885bdc 100644
---
a/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloConfigImpl.java
+++
b/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloConfigImpl.java
@@ -162,8 +162,12 @@ public class MiniAccumuloConfigImpl {
mergePropWithRandomPort(Property.TSERV_CLIENTPORT.getKey());
mergePropWithRandomPort(Property.MONITOR_PORT.getKey());
mergePropWithRandomPort(Property.GC_PORT.getKey());
-
mergePropWithRandomPort(Property.REPLICATION_RECEIPT_SERVICE_PORT.getKey());
-
mergePropWithRandomPort(Property.MANAGER_REPLICATION_COORDINATOR_PORT.getKey());
+ @SuppressWarnings("deprecation")
+ Property p = Property.REPLICATION_RECEIPT_SERVICE_PORT;
+ mergePropWithRandomPort(p.getKey());
+ @SuppressWarnings("deprecation")
+ Property p2 = Property.MANAGER_REPLICATION_COORDINATOR_PORT;
+ mergePropWithRandomPort(p2.getKey());
if (isUseCredentialProvider()) {
updateConfigForCredentialProvider();
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
index aed46a6..313d305 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
@@ -180,6 +180,7 @@ public class VolumeUtil {
MetadataTableUtil.updateTabletVolumes(extent, logsToRemove, logsToAdd,
filesToRemove,
filesToAdd, zooLock, context);
if (replicate) {
+ @SuppressWarnings("deprecation")
Status status = StatusUtil.fileClosed();
log.debug("Tablet directory switched, need to record old log files {}
{}", logsToRemove,
ProtobufUtil.toString(status));
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
index 2dac484..91eb7b6 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
@@ -135,9 +135,12 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@SuppressFBWarnings(value = "DM_EXIT", justification = "CLI utility can exit")
@AutoService(KeywordExecutable.class)
public class Initialize implements KeywordExecutable {
+
private static final Logger log = LoggerFactory.getLogger(Initialize.class);
private static final String DEFAULT_ROOT_USER = "root";
private static final String TABLE_TABLETS_TABLET_DIR = "table_info";
+ @SuppressWarnings("deprecation")
+ private static final TableId REPLICATION_TABLE = ReplicationTable.ID;
private static ZooReaderWriter zoo = null;
@@ -213,8 +216,10 @@ public class Initialize implements KeywordExecutable {
// race condition where a tserver compacts away Status updates because it
didn't see the
// Combiner
// configured
+ @SuppressWarnings("deprecation")
+ Class<StatusCombiner> statusCombinerClass = StatusCombiner.class;
IteratorSetting setting =
- new IteratorSetting(9, ReplicationTableUtil.COMBINER_NAME,
StatusCombiner.class);
+ new IteratorSetting(9, ReplicationTableUtil.COMBINER_NAME,
statusCombinerClass);
Combiner.setColumns(setting, Collections.singletonList(new
Column(ReplicationSection.COLF)));
for (IteratorScope scope : IteratorScope.values()) {
String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX,
@@ -226,10 +231,16 @@ public class Initialize implements KeywordExecutable {
}
// add combiners to replication table
- setting = new IteratorSetting(30, ReplicationTable.COMBINER_NAME,
StatusCombiner.class);
+ @SuppressWarnings("deprecation")
+ String replicationCombinerName = ReplicationTable.COMBINER_NAME;
+ setting = new IteratorSetting(30, replicationCombinerName,
statusCombinerClass);
setting.setPriority(30);
+ @SuppressWarnings("deprecation")
+ Text statusSectionName = StatusSection.NAME;
+ @SuppressWarnings("deprecation")
+ Text workSectionName = WorkSection.NAME;
Combiner.setColumns(setting,
- Arrays.asList(new Column(StatusSection.NAME), new
Column(WorkSection.NAME)));
+ Arrays.asList(new Column(statusSectionName), new
Column(workSectionName)));
for (IteratorScope scope : EnumSet.allOf(IteratorScope.class)) {
String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX,
scope.name().toLowerCase(), setting.getName());
@@ -240,15 +251,19 @@ public class Initialize implements KeywordExecutable {
setting.getPriority() + "," + setting.getIteratorClass());
}
// add locality groups to replication table
- for (Entry<String,Set<Text>> g :
ReplicationTable.LOCALITY_GROUPS.entrySet()) {
+ @SuppressWarnings("deprecation")
+ Map<String,Set<Text>> replicationLocalityGroups =
ReplicationTable.LOCALITY_GROUPS;
+ for (Entry<String,Set<Text>> g : replicationLocalityGroups.entrySet()) {
initialReplicationTableConf.put(Property.TABLE_LOCALITY_GROUP_PREFIX +
g.getKey(),
LocalityGroupUtil.encodeColumnFamilies(g.getValue()));
}
initialReplicationTableConf.put(Property.TABLE_LOCALITY_GROUPS.getKey(),
- Joiner.on(",").join(ReplicationTable.LOCALITY_GROUPS.keySet()));
+ Joiner.on(",").join(replicationLocalityGroups.keySet()));
// add formatter to replication table
+ @SuppressWarnings("deprecation")
+ String replicationFormatterClassName =
ReplicationUtil.STATUS_FORMATTER_CLASS_NAME;
initialReplicationTableConf.put(Property.TABLE_FORMATTER_CLASS.getKey(),
- ReplicationUtil.STATUS_FORMATTER_CLASS_NAME);
+ replicationFormatterClassName);
}
static boolean checkInit(VolumeManager fs, SiteConfiguration sconf,
Configuration hadoopConf)
@@ -467,11 +482,11 @@ public class Initialize implements KeywordExecutable {
String tableMetadataTabletDirUri =
fs.choose(chooserEnv, context.getBaseUris()) +
Constants.HDFS_TABLES_DIR + Path.SEPARATOR
+ MetadataTable.ID + Path.SEPARATOR + tableMetadataTabletDirName;
- chooserEnv = new VolumeChooserEnvironmentImpl(Scope.INIT,
ReplicationTable.ID, null, context);
+ chooserEnv = new VolumeChooserEnvironmentImpl(Scope.INIT,
REPLICATION_TABLE, null, context);
String replicationTableDefaultTabletDirName =
ServerColumnFamily.DEFAULT_TABLET_DIR_NAME;
String replicationTableDefaultTabletDirUri =
fs.choose(chooserEnv, context.getBaseUris()) +
Constants.HDFS_TABLES_DIR + Path.SEPARATOR
- + ReplicationTable.ID + Path.SEPARATOR +
replicationTableDefaultTabletDirName;
+ + REPLICATION_TABLE + Path.SEPARATOR +
replicationTableDefaultTabletDirName;
chooserEnv = new VolumeChooserEnvironmentImpl(Scope.INIT,
MetadataTable.ID, null, context);
String defaultMetadataTabletDirName =
ServerColumnFamily.DEFAULT_TABLET_DIR_NAME;
String defaultMetadataTabletDirUri =
@@ -488,7 +503,7 @@ public class Initialize implements KeywordExecutable {
// tablet
String metadataFileName = tableMetadataTabletDirUri + Path.SEPARATOR +
"0_1." + ext;
Tablet replicationTablet =
- new Tablet(ReplicationTable.ID, replicationTableDefaultTabletDirName,
null, null);
+ new Tablet(REPLICATION_TABLE, replicationTableDefaultTabletDirName,
null, null);
createMetadataFile(fs, metadataFileName, siteConfig, replicationTablet);
// populate the root tablet with info about the metadata table's two
initial tablets
@@ -602,8 +617,10 @@ public class Initialize implements KeywordExecutable {
RootTable.NAME, TableState.ONLINE, NodeExistsPolicy.FAIL);
TableManager.prepareNewTableState(zoo, uuid, MetadataTable.ID,
Namespace.ACCUMULO.id(),
MetadataTable.NAME, TableState.ONLINE, NodeExistsPolicy.FAIL);
- TableManager.prepareNewTableState(zoo, uuid, ReplicationTable.ID,
Namespace.ACCUMULO.id(),
- ReplicationTable.NAME, TableState.OFFLINE, NodeExistsPolicy.FAIL);
+ @SuppressWarnings("deprecation")
+ String replicationTableName = ReplicationTable.NAME;
+ TableManager.prepareNewTableState(zoo, uuid, REPLICATION_TABLE,
Namespace.ACCUMULO.id(),
+ replicationTableName, TableState.OFFLINE, NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZTSERVERS,
EMPTY_BYTE_ARRAY,
NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZPROBLEMS,
EMPTY_BYTE_ARRAY,
@@ -636,9 +653,13 @@ public class Initialize implements KeywordExecutable {
NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + Constants.ZMONITOR_LOCK,
EMPTY_BYTE_ARRAY,
NodeExistsPolicy.FAIL);
- zoo.putPersistentData(zkInstanceRoot + ReplicationConstants.ZOO_BASE,
EMPTY_BYTE_ARRAY,
+ @SuppressWarnings("deprecation")
+ String replicationZBase = ReplicationConstants.ZOO_BASE;
+ zoo.putPersistentData(zkInstanceRoot + replicationZBase, EMPTY_BYTE_ARRAY,
NodeExistsPolicy.FAIL);
- zoo.putPersistentData(zkInstanceRoot + ReplicationConstants.ZOO_TSERVERS,
EMPTY_BYTE_ARRAY,
+ @SuppressWarnings("deprecation")
+ String replicationZServers = ReplicationConstants.ZOO_TSERVERS;
+ zoo.putPersistentData(zkInstanceRoot + replicationZServers,
EMPTY_BYTE_ARRAY,
NodeExistsPolicy.FAIL);
zoo.putPersistentData(zkInstanceRoot + WalStateManager.ZWALS,
EMPTY_BYTE_ARRAY,
NodeExistsPolicy.FAIL);
@@ -814,7 +835,7 @@ public class Initialize implements KeywordExecutable {
// add configuration to the replication table
for (Entry<String,String> entry :
initialReplicationTableConf.entrySet()) {
- if (!TablePropUtil.setTableProperty(zoo, zooKeeperRoot,
ReplicationTable.ID, entry.getKey(),
+ if (!TablePropUtil.setTableProperty(zoo, zooKeeperRoot,
REPLICATION_TABLE, entry.getKey(),
entry.getValue())) {
throw new IOException("Cannot create per-table property " +
entry.getKey());
}
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/replication/DistributedWorkQueueWorkAssignerHelper.java
b/server/base/src/main/java/org/apache/accumulo/server/replication/DistributedWorkQueueWorkAssignerHelper.java
index 77c4445..be1a8b6 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/replication/DistributedWorkQueueWorkAssignerHelper.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/replication/DistributedWorkQueueWorkAssignerHelper.java
@@ -28,6 +28,7 @@ import
org.apache.accumulo.server.zookeeper.DistributedWorkQueue;
import com.google.common.collect.Maps;
+@Deprecated
public class DistributedWorkQueueWorkAssignerHelper {
public static final String KEY_SEPARATOR = "|";
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystem.java
b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystem.java
index 1bf413a..3460a57 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystem.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystem.java
@@ -26,6 +26,7 @@ import org.apache.hadoop.fs.Path;
/**
* Encapsulation of a remote system which Accumulo can replicate data to
*/
+@Deprecated
public interface ReplicaSystem {
/**
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemFactory.java
b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemFactory.java
index 48bb116..9621cb3 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemFactory.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemFactory.java
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
import com.google.common.collect.Maps;
+@Deprecated
public class ReplicaSystemFactory {
private static final Logger log =
LoggerFactory.getLogger(ReplicaSystemFactory.class);
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemHelper.java
b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemHelper.java
index bd2871e..715dc3c 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemHelper.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemHelper.java
@@ -34,6 +34,7 @@ import org.apache.hadoop.fs.Path;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Deprecated
public class ReplicaSystemHelper {
private static final Logger log =
LoggerFactory.getLogger(ReplicaSystemHelper.class);
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
index e7e7fcf..aebc531 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
@@ -48,6 +48,7 @@ import org.apache.hadoop.io.Text;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Deprecated
public class ReplicationUtil {
private static final Logger log =
LoggerFactory.getLogger(ReplicationUtil.class);
public static final String STATUS_FORMATTER_CLASS_NAME =
StatusFormatter.class.getName();
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
index 7a5601f..49e0c8c 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
@@ -44,9 +44,11 @@ import com.google.protobuf.InvalidProtocolBufferException;
*
* Messages that are "closed", stay closed. "Begin" and "end" always choose
the maximum of the two.
*/
+@Deprecated
public class StatusCombiner extends TypedValueCombiner<Status> {
private static final Logger log =
LoggerFactory.getLogger(StatusCombiner.class);
+ @Deprecated
public static class StatusEncoder extends AbstractEncoder<Status> {
private static final Logger log =
LoggerFactory.getLogger(StatusEncoder.class);
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
index 6ece564..24771df 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
@@ -47,6 +47,7 @@ import com.google.protobuf.InvalidProtocolBufferException;
/**
* Parse and print the serialized protocol buffers used to track replication
data
*/
+@Deprecated
public class StatusFormatter implements Formatter {
private static final Logger log =
LoggerFactory.getLogger(StatusFormatter.class);
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusUtil.java
b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusUtil.java
index 0e152ca..17256c3 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusUtil.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusUtil.java
@@ -28,6 +28,7 @@ import com.google.protobuf.InvalidProtocolBufferException;
/**
* Helper methods to create Status protobuf messages
*/
+@Deprecated
public class StatusUtil {
private static final Status INF_END_REPLICATION_STATUS, CLOSED_STATUS;
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/replication/WorkAssigner.java
b/server/base/src/main/java/org/apache/accumulo/server/replication/WorkAssigner.java
index 9d8c063..344f0d7 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/replication/WorkAssigner.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/replication/WorkAssigner.java
@@ -24,6 +24,7 @@ import org.apache.accumulo.core.conf.AccumuloConfiguration;
/**
* Interface to allow for multiple implementations that assign replication work
*/
+@Deprecated
public interface WorkAssigner {
/**
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/replication/ZooKeeperInitialization.java
b/server/base/src/main/java/org/apache/accumulo/server/replication/ZooKeeperInitialization.java
index 2400ca6..f2fb3c6 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/replication/ZooKeeperInitialization.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/replication/ZooKeeperInitialization.java
@@ -28,6 +28,7 @@ import org.apache.zookeeper.KeeperException;
* We can take the penalty of embedding this logic into the server processes,
but alleviate
* users/developers from having to worry about the zookeeper state.
*/
+@Deprecated
public class ZooKeeperInitialization {
/**
* Ensure that the full path to ZooKeeper nodes that will be used exist
@@ -35,7 +36,9 @@ public class ZooKeeperInitialization {
public static void ensureZooKeeperInitialized(final ZooReaderWriter
zooReaderWriter,
final String zRoot) throws KeeperException, InterruptedException {
// ZooReaderWriter will check existence and return if it exists, so no
need to check here
- zooReaderWriter.mkdirs(zRoot + ReplicationConstants.ZOO_TSERVERS);
- zooReaderWriter.mkdirs(zRoot + ReplicationConstants.ZOO_WORK_QUEUE);
+ String replicationZTServers = ReplicationConstants.ZOO_TSERVERS;
+ zooReaderWriter.mkdirs(zRoot + replicationZTServers);
+ String replicationZWorkQueue = ReplicationConstants.ZOO_WORK_QUEUE;
+ zooReaderWriter.mkdirs(zRoot + replicationZWorkQueue);
}
}
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/replication/proto/Replication.java
b/server/base/src/main/java/org/apache/accumulo/server/replication/proto/Replication.java
index 4aeff39..4a20d87 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/replication/proto/Replication.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/replication/proto/Replication.java
@@ -21,7 +21,8 @@
package org.apache.accumulo.server.replication.proto;
-@SuppressWarnings({"unused"}) public final class Replication {
+@SuppressWarnings({"unused"})
+public final class Replication {
private Replication() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
index bc39266..2e19628 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
@@ -367,8 +367,11 @@ public class SecurityOperation {
boolean useCached) throws ThriftSecurityException {
targetUserExists(user);
+ @SuppressWarnings("deprecation")
+ TableId replicationTableId = ReplicationTable.ID;
+
if ((table.equals(MetadataTable.ID) || table.equals(RootTable.ID)
- || table.equals(ReplicationTable.ID)) &&
permission.equals(TablePermission.READ))
+ || table.equals(replicationTableId)) &&
permission.equals(TablePermission.READ))
return true;
try {
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/util/ReplicationTableUtil.java
b/server/base/src/main/java/org/apache/accumulo/server/util/ReplicationTableUtil.java
index 1b56592..d8934e2 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/util/ReplicationTableUtil.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/util/ReplicationTableUtil.java
@@ -64,6 +64,7 @@ public class ReplicationTableUtil {
private static final Logger log =
LoggerFactory.getLogger(ReplicationTableUtil.class);
public static final String COMBINER_NAME = "replcombiner";
+ @SuppressWarnings("deprecation")
public static final String STATUS_FORMATTER_CLASS_NAME =
StatusFormatter.class.getName();
private ReplicationTableUtil() {}
@@ -104,7 +105,9 @@ public class ReplicationTableUtil {
if (!iterators.containsKey(COMBINER_NAME)) {
// Set our combiner and combine all columns
// Need to set the combiner beneath versioning since we don't want to
turn it off
- IteratorSetting setting = new IteratorSetting(9, COMBINER_NAME,
StatusCombiner.class);
+ @SuppressWarnings("deprecation")
+ Class<StatusCombiner> statusCombinerClass = StatusCombiner.class;
+ IteratorSetting setting = new IteratorSetting(9, COMBINER_NAME,
statusCombinerClass);
Combiner.setColumns(setting, Collections.singletonList(new
Column(ReplicationSection.COLF)));
try {
tops.attachIterator(tableName, setting);
diff --git
a/server/base/src/test/java/org/apache/accumulo/server/replication/ReplicationUtilTest.java
b/server/base/src/test/java/org/apache/accumulo/server/replication/ReplicationUtilTest.java
index 8b7a03c..69912b1 100644
---
a/server/base/src/test/java/org/apache/accumulo/server/replication/ReplicationUtilTest.java
+++
b/server/base/src/test/java/org/apache/accumulo/server/replication/ReplicationUtilTest.java
@@ -31,6 +31,7 @@ import org.easymock.EasyMock;
import org.junit.Before;
import org.junit.Test;
+@Deprecated
public class ReplicationUtilTest {
ServerContext context;
diff --git
a/server/base/src/test/java/org/apache/accumulo/server/replication/StatusCombinerTest.java
b/server/base/src/test/java/org/apache/accumulo/server/replication/StatusCombinerTest.java
index d0d2b03..390f3a7 100644
---
a/server/base/src/test/java/org/apache/accumulo/server/replication/StatusCombinerTest.java
+++
b/server/base/src/test/java/org/apache/accumulo/server/replication/StatusCombinerTest.java
@@ -41,6 +41,7 @@ import
org.apache.accumulo.server.replication.proto.Replication.Status;
import org.junit.Before;
import org.junit.Test;
+@Deprecated
public class StatusCombinerTest {
private StatusCombiner combiner;
diff --git
a/server/base/src/test/java/org/apache/accumulo/server/replication/StatusUtilTest.java
b/server/base/src/test/java/org/apache/accumulo/server/replication/StatusUtilTest.java
index 3b8e9b2..27d4bc3 100644
---
a/server/base/src/test/java/org/apache/accumulo/server/replication/StatusUtilTest.java
+++
b/server/base/src/test/java/org/apache/accumulo/server/replication/StatusUtilTest.java
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue;
import org.apache.accumulo.server.replication.proto.Replication.Status;
import org.junit.Test;
+@Deprecated
public class StatusUtilTest {
@Test
diff --git
a/server/base/src/test/java/org/apache/accumulo/server/replication/proto/StatusTest.java
b/server/base/src/test/java/org/apache/accumulo/server/replication/proto/StatusTest.java
index b572c87..e3744c5 100644
---
a/server/base/src/test/java/org/apache/accumulo/server/replication/proto/StatusTest.java
+++
b/server/base/src/test/java/org/apache/accumulo/server/replication/proto/StatusTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertNotEquals;
import org.apache.accumulo.server.replication.proto.Replication.Status;
import org.junit.Test;
+@Deprecated
public class StatusTest {
@Test
diff --git
a/server/base/src/test/java/org/apache/accumulo/server/util/ReplicationTableUtilTest.java
b/server/base/src/test/java/org/apache/accumulo/server/util/ReplicationTableUtilTest.java
index 425bf73..dce79b6 100644
---
a/server/base/src/test/java/org/apache/accumulo/server/util/ReplicationTableUtilTest.java
+++
b/server/base/src/test/java/org/apache/accumulo/server/util/ReplicationTableUtilTest.java
@@ -60,6 +60,7 @@ import org.apache.hadoop.io.Text;
import org.easymock.EasyMock;
import org.junit.Test;
+@Deprecated
public class ReplicationTableUtilTest {
@Test
diff --git
a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
index 877bdcc..ba084a1 100644
---
a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
+++
b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
@@ -236,7 +236,9 @@ public class TServerUtilsTest {
ports = findTwoFreeSequentialPorts(monitorPort + 1);
int managerReplCoordPort = ports[0];
- conf.set(Property.MANAGER_REPLICATION_COORDINATOR_PORT,
Integer.toString(managerReplCoordPort));
+ @SuppressWarnings("deprecation")
+ Property p = Property.MANAGER_REPLICATION_COORDINATOR_PORT;
+ conf.set(p, Integer.toString(managerReplCoordPort));
int tserverFinalPort = ports[1];
conf.set(Property.TSERV_PORTSEARCH, "true");
diff --git
a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
index 4b1efb8..958e3a5 100644
---
a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
+++
b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
@@ -356,6 +356,7 @@ public class GarbageCollectWriteAheadLogs {
return result;
}
+ @Deprecated
protected int removeReplicationEntries(Map<UUID,TServerInstance> candidates)
{
try {
try {
diff --git
a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java
b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java
index 7d37351..cbfb265 100644
---
a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java
+++
b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java
@@ -234,7 +234,9 @@ public class GarbageCollectionAlgorithm {
pendingReplication.next();
// We cannot delete a file if it is still needed for replication
- if (!StatusUtil.isSafeForRemoval(pendingReplica.getValue())) {
+ @SuppressWarnings("deprecation")
+ boolean safeToRemove =
StatusUtil.isSafeForRemoval(pendingReplica.getValue());
+ if (!safeToRemove) {
// If it must be replicated, we must remove it from the candidate
set to prevent deletion
candidates.remove();
}
diff --git
a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
index bf6275d..f0d844e 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
@@ -420,6 +420,7 @@ public class SimpleGarbageCollector extends AbstractServer
implements Iface {
}
@Override
+ @Deprecated
public Iterator<Entry<String,Status>> getReplicationNeededIterator() {
AccumuloClient client = getContext();
try {
@@ -530,6 +531,7 @@ public class SimpleGarbageCollector extends AbstractServer
implements Iface {
*/
Span replSpan = TraceUtil.startSpan(this.getClass(),
"replicationClose");
try (Scope replScope = replSpan.makeCurrent()) {
+ @SuppressWarnings("deprecation")
CloseWriteAheadLogReferences closeWals = new
CloseWriteAheadLogReferences(getContext());
closeWals.run();
} catch (Exception e) {
diff --git
a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
index 0efc9f5..55fd378 100644
---
a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
+++
b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
@@ -63,6 +63,7 @@ import io.opentelemetry.context.Scope;
* {@link Status} record from the metadata and replication tables that point
to that WAL can be
* "closed", by writing a new Status to the same key with the closed member
true.
*/
+@Deprecated
public class CloseWriteAheadLogReferences implements Runnable {
private static final Logger log =
LoggerFactory.getLogger(CloseWriteAheadLogReferences.class);
diff --git
a/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogsTest.java
b/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogsTest.java
index abb8840..ba0b410 100644
---
a/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogsTest.java
+++
b/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogsTest.java
@@ -52,6 +52,12 @@ import org.junit.Test;
public class GarbageCollectWriteAheadLogsTest {
+ @SuppressWarnings("deprecation")
+ private static final String REPL_TABLE_NAME = ReplicationTable.NAME;
+
+ @SuppressWarnings("deprecation")
+ private static final Text STATUS_SECTION_NAME =
ReplicationSchema.StatusSection.NAME;
+
private final TServerInstance server1 = new
TServerInstance("localhost:1234[SESSION]");
private final TServerInstance server2 = new
TServerInstance("localhost:1234[OTHERSESS]");
private final UUID id = UUID.randomUUID();
@@ -105,6 +111,7 @@ public class GarbageCollectWriteAheadLogsTest {
GarbageCollectWriteAheadLogs gc = new
GarbageCollectWriteAheadLogs(context, fs, false,
tserverSet, marker, tabletOnServer1List) {
@Override
+ @Deprecated
protected int removeReplicationEntries(Map<UUID,TServerInstance>
candidates) {
return 0;
}
@@ -137,6 +144,7 @@ public class GarbageCollectWriteAheadLogsTest {
GarbageCollectWriteAheadLogs gc = new
GarbageCollectWriteAheadLogs(context, fs, false,
tserverSet, marker, tabletOnServer1List) {
@Override
+ @Deprecated
protected int removeReplicationEntries(Map<UUID,TServerInstance>
candidates) {
return 0;
}
@@ -168,9 +176,9 @@ public class GarbageCollectWriteAheadLogsTest {
EasyMock.expect(marker.getAllMarkers()).andReturn(markers2).once();
EasyMock.expect(marker.state(server2, id)).andReturn(new
Pair<>(WalState.OPEN, path));
- EasyMock.expect(context.createScanner(ReplicationTable.NAME,
Authorizations.EMPTY))
+ EasyMock.expect(context.createScanner(REPL_TABLE_NAME,
Authorizations.EMPTY))
.andReturn(rscanner);
- rscanner.fetchColumnFamily(ReplicationSchema.StatusSection.NAME);
+ rscanner.fetchColumnFamily(STATUS_SECTION_NAME);
EasyMock.expectLastCall().once();
EasyMock.expect(rscanner.iterator()).andReturn(emptyKV);
@@ -216,9 +224,9 @@ public class GarbageCollectWriteAheadLogsTest {
EasyMock.expect(marker.getAllMarkers()).andReturn(markers2).once();
EasyMock.expect(marker.state(server2, id)).andReturn(new
Pair<>(WalState.OPEN, path));
- EasyMock.expect(context.createScanner(ReplicationTable.NAME,
Authorizations.EMPTY))
+ EasyMock.expect(context.createScanner(REPL_TABLE_NAME,
Authorizations.EMPTY))
.andReturn(rscanner);
- rscanner.fetchColumnFamily(ReplicationSchema.StatusSection.NAME);
+ rscanner.fetchColumnFamily(STATUS_SECTION_NAME);
EasyMock.expectLastCall().once();
EasyMock.expect(rscanner.iterator()).andReturn(emptyKV);
@@ -264,9 +272,9 @@ public class GarbageCollectWriteAheadLogsTest {
EasyMock.expect(marker.getAllMarkers()).andReturn(markers).once();
EasyMock.expect(marker.state(server1, id)).andReturn(new
Pair<>(WalState.UNREFERENCED, path));
- EasyMock.expect(context.createScanner(ReplicationTable.NAME,
Authorizations.EMPTY))
+ EasyMock.expect(context.createScanner(REPL_TABLE_NAME,
Authorizations.EMPTY))
.andReturn(rscanner);
- rscanner.fetchColumnFamily(ReplicationSchema.StatusSection.NAME);
+ rscanner.fetchColumnFamily(STATUS_SECTION_NAME);
EasyMock.expectLastCall().once();
EasyMock.expect(rscanner.iterator()).andReturn(emptyKV);
diff --git
a/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectionTest.java
b/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectionTest.java
index ecb216f..7604d23 100644
--- a/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectionTest.java
+++ b/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectionTest.java
@@ -707,6 +707,7 @@ public class GarbageCollectionTest {
gce.candidates.add("hdfs://foo.com:6000/accumulo/tables/2/t-00002/A000002.rf");
// We replicated all of the data, but we might still write more data to
the file
+ @SuppressWarnings("deprecation")
Status status = StatusUtil.fileCreated(System.currentTimeMillis());
gce.filesToReplicate.put("hdfs://foo.com:6000/accumulo/tables/1/t-00001/A000001.rf",
status);
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java
b/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java
index 7b4549e..bcd792d 100644
--- a/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java
+++ b/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java
@@ -1157,11 +1157,7 @@ public class Manager extends AbstractServer
throw new IllegalStateException("Exception setting up FaTE cleanup
thread", e);
}
- try {
- ZooKeeperInitialization.ensureZooKeeperInitialized(zReaderWriter, zroot);
- } catch (KeeperException | InterruptedException e) {
- throw new IllegalStateException("Exception while ensuring ZooKeeper is
initialized", e);
- }
+ initializeZkForReplication(zReaderWriter, zroot);
// Make sure that we have a secret key (either a new one or an old one
from ZK) before we start
// the manager client service.
@@ -1205,9 +1201,10 @@ public class Manager extends AbstractServer
final AtomicReference<TServer> replServer = new AtomicReference<>();
context.getScheduledExecutor().scheduleWithFixedDelay(() -> {
try {
- if ((replServer.get() == null)
- && !getConfiguration().get(Property.REPLICATION_NAME).isEmpty()) {
- log.info("{} was set, starting repl services.",
Property.REPLICATION_NAME.getKey());
+ @SuppressWarnings("deprecation")
+ Property p = Property.REPLICATION_NAME;
+ if ((replServer.get() == null) &&
!getConfiguration().get(p).isEmpty()) {
+ log.info("{} was set, starting repl services.", p.getKey());
replServer.set(setupReplication());
}
} catch (UnknownHostException | KeeperException | InterruptedException
e) {
@@ -1265,6 +1262,15 @@ public class Manager extends AbstractServer
log.info("exiting");
}
+ @Deprecated
+ private void initializeZkForReplication(ZooReaderWriter zReaderWriter,
String zroot) {
+ try {
+ ZooKeeperInitialization.ensureZooKeeperInitialized(zReaderWriter, zroot);
+ } catch (KeeperException | InterruptedException e) {
+ throw new IllegalStateException("Exception while ensuring ZooKeeper is
initialized", e);
+ }
+ }
+
/**
* Allows property configuration to block manager start-up waiting for a
minimum number of
* tservers to register in zookeeper. It also accepts a maximum time to wait
- if the time
@@ -1349,6 +1355,7 @@ public class Manager extends AbstractServer
}
}
+ @Deprecated
private TServer setupReplication()
throws UnknownHostException, KeeperException, InterruptedException {
ServerContext context = getContext();
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/ManagerClientServiceHandler.java
b/server/manager/src/main/java/org/apache/accumulo/manager/ManagerClientServiceHandler.java
index 774d2ed..63835cf 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/ManagerClientServiceHandler.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/ManagerClientServiceHandler.java
@@ -497,6 +497,7 @@ public class ManagerClientServiceHandler extends
FateServiceHandler
}
}
+ @SuppressWarnings("deprecation")
@Override
public boolean drainReplicationTable(TInfo tfino, TCredentials credentials,
String tableName,
Set<String> logsToWatch) throws TException {
@@ -548,6 +549,7 @@ public class ManagerClientServiceHandler extends
FateServiceHandler
/**
* @return return true records are only in place which are fully replicated
*/
+ @Deprecated
protected boolean allReferencesReplicated(BatchScanner bs, Text tableId,
Set<String> relevantLogs) {
Text rowHolder = new Text(), colfHolder = new Text();
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/metrics/ManagerMetrics.java
b/server/manager/src/main/java/org/apache/accumulo/manager/metrics/ManagerMetrics.java
index 2f6d693..7de6ac9 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/metrics/ManagerMetrics.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/metrics/ManagerMetrics.java
@@ -34,7 +34,9 @@ public class ManagerMetrics {
public static void init(AccumuloConfiguration conf, Manager m) {
requireNonNull(conf, "AccumuloConfiguration must not be null");
- MetricsUtil.initializeProducers(new ReplicationMetrics(m));
+ @SuppressWarnings("deprecation")
+ ReplicationMetrics replMetrics = new ReplicationMetrics(m);
+ MetricsUtil.initializeProducers(replMetrics);
log.info("Registered replication metrics module");
MetricsUtil.initializeProducers(new FateMetrics(m.getContext(),
conf.getTimeInMillis(Property.MANAGER_FATE_METRICS_MIN_UPDATE_INTERVAL)));
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/metrics/ReplicationMetrics.java
b/server/manager/src/main/java/org/apache/accumulo/manager/metrics/ReplicationMetrics.java
index f0fc861..9fa5565 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/metrics/ReplicationMetrics.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/metrics/ReplicationMetrics.java
@@ -45,6 +45,7 @@ import org.slf4j.LoggerFactory;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.Timer;
+@Deprecated
public class ReplicationMetrics implements MetricsProducer {
private static final Logger log =
LoggerFactory.getLogger(ReplicationMetrics.class);
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/DistributedWorkQueueWorkAssigner.java
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/DistributedWorkQueueWorkAssigner.java
index 835cf81..0dfccbb 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/DistributedWorkQueueWorkAssigner.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/DistributedWorkQueueWorkAssigner.java
@@ -56,6 +56,7 @@ import com.google.protobuf.InvalidProtocolBufferException;
/**
* Common methods for {@link WorkAssigner}s
*/
+@Deprecated
public abstract class DistributedWorkQueueWorkAssigner implements WorkAssigner
{
private static final Logger log =
LoggerFactory.getLogger(DistributedWorkQueueWorkAssigner.class);
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/FinishedWorkUpdater.java
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/FinishedWorkUpdater.java
index 7b08c11..b7dc732 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/FinishedWorkUpdater.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/FinishedWorkUpdater.java
@@ -54,6 +54,7 @@ import com.google.protobuf.InvalidProtocolBufferException;
* Update the status record in the replication table with work that has been
replicated to each
* configured peer.
*/
+@Deprecated
public class FinishedWorkUpdater implements Runnable {
private static final Logger log =
LoggerFactory.getLogger(FinishedWorkUpdater.class);
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/ManagerReplicationCoordinator.java
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/ManagerReplicationCoordinator.java
index df73d14..b50e336 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/ManagerReplicationCoordinator.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/ManagerReplicationCoordinator.java
@@ -44,6 +44,7 @@ import org.slf4j.LoggerFactory;
/**
* Choose a tserver to service a replication task
*/
+@Deprecated
public class ManagerReplicationCoordinator implements
ReplicationCoordinator.Iface {
private static final SecureRandom random = new SecureRandom();
private static final Logger log =
LoggerFactory.getLogger(ManagerReplicationCoordinator.class);
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/RemoveCompleteReplicationRecords.java
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/RemoveCompleteReplicationRecords.java
index 833762b..85ebf9e 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/RemoveCompleteReplicationRecords.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/RemoveCompleteReplicationRecords.java
@@ -56,6 +56,7 @@ import com.google.protobuf.InvalidProtocolBufferException;
/**
* Delete replication entries from the replication table that are fully
replicated and closed
*/
+@Deprecated
public class RemoveCompleteReplicationRecords implements Runnable {
private static final Logger log =
LoggerFactory.getLogger(RemoveCompleteReplicationRecords.class);
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/ReplicationDriver.java
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/ReplicationDriver.java
index 88edf48..18c76b6 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/ReplicationDriver.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/ReplicationDriver.java
@@ -33,6 +33,7 @@ import io.opentelemetry.context.Scope;
/**
* Daemon wrapper around the {@link WorkMaker} that separates it from the
Manager
*/
+@Deprecated
public class ReplicationDriver implements Runnable {
private static final Logger log =
LoggerFactory.getLogger(ReplicationDriver.class);
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/SequentialWorkAssigner.java
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/SequentialWorkAssigner.java
index 1289fc4..34f42b1 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/SequentialWorkAssigner.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/SequentialWorkAssigner.java
@@ -45,6 +45,7 @@ import org.slf4j.LoggerFactory;
* The intent is to ensure that WALs are replayed in the same order on the
peer in which they were
* applied on the primary.
*/
+@Deprecated
public class SequentialWorkAssigner extends DistributedWorkQueueWorkAssigner {
private static final Logger log =
LoggerFactory.getLogger(SequentialWorkAssigner.class);
private static final String NAME = "Sequential Work Assigner";
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/StatusMaker.java
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/StatusMaker.java
index f001928..c92e359 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/StatusMaker.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/StatusMaker.java
@@ -57,6 +57,7 @@ import io.opentelemetry.context.Scope;
* Reads replication records from the metadata table and creates status
records in the replication
* table. Deletes the record from the metadata table when it's closed.
*/
+@Deprecated
public class StatusMaker {
private static final Logger log = LoggerFactory.getLogger(StatusMaker.class);
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/UnorderedWorkAssigner.java
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/UnorderedWorkAssigner.java
index f530832..5baa0d2 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/UnorderedWorkAssigner.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/UnorderedWorkAssigner.java
@@ -48,6 +48,7 @@ import org.slf4j.LoggerFactory;
* the manager. The {@link SequentialWorkAssigner} should be used if this must
be guaranteed at the
* cost of replication throughput.
*/
+@Deprecated
public class UnorderedWorkAssigner extends DistributedWorkQueueWorkAssigner {
private static final Logger log =
LoggerFactory.getLogger(UnorderedWorkAssigner.class);
private static final String NAME = "Unordered Work Assigner";
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/WorkDriver.java
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/WorkDriver.java
index 756cd82..59dbf56 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/WorkDriver.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/WorkDriver.java
@@ -33,6 +33,7 @@ import org.slf4j.LoggerFactory;
/**
* Driver for a {@link WorkAssigner}
*/
+@Deprecated
public class WorkDriver implements Runnable {
private static final Logger log = LoggerFactory.getLogger(WorkDriver.class);
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/WorkMaker.java
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/WorkMaker.java
index 4ae78e6..d0da16d 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/replication/WorkMaker.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/replication/WorkMaker.java
@@ -57,6 +57,7 @@ import io.opentelemetry.context.Scope;
* Reads replication records from the replication table and creates work
records which include
* target replication system information.
*/
+@Deprecated
public class WorkMaker {
private static final Logger log = LoggerFactory.getLogger(WorkMaker.class);
diff --git
a/server/manager/src/test/java/org/apache/accumulo/manager/metrics/ReplicationMetricsTest.java
b/server/manager/src/test/java/org/apache/accumulo/manager/metrics/ReplicationMetricsTest.java
index d14c831..da75a0d 100644
---
a/server/manager/src/test/java/org/apache/accumulo/manager/metrics/ReplicationMetricsTest.java
+++
b/server/manager/src/test/java/org/apache/accumulo/manager/metrics/ReplicationMetricsTest.java
@@ -36,6 +36,7 @@ import org.junit.Test;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.Timer;
+@Deprecated
public class ReplicationMetricsTest {
/**
diff --git
a/server/manager/src/test/java/org/apache/accumulo/manager/replication/DistributedWorkQueueWorkAssignerHelperTest.java
b/server/manager/src/test/java/org/apache/accumulo/manager/replication/DistributedWorkQueueWorkAssignerHelperTest.java
index f0904b6..1872d24 100644
---
a/server/manager/src/test/java/org/apache/accumulo/manager/replication/DistributedWorkQueueWorkAssignerHelperTest.java
+++
b/server/manager/src/test/java/org/apache/accumulo/manager/replication/DistributedWorkQueueWorkAssignerHelperTest.java
@@ -30,6 +30,7 @@ import org.apache.hadoop.fs.Path;
import org.apache.zookeeper.common.PathUtils;
import org.junit.Test;
+@Deprecated
public class DistributedWorkQueueWorkAssignerHelperTest {
@Test
diff --git
a/server/manager/src/test/java/org/apache/accumulo/manager/replication/ManagerReplicationCoordinatorTest.java
b/server/manager/src/test/java/org/apache/accumulo/manager/replication/ManagerReplicationCoordinatorTest.java
index 924d95b..eebffe5 100644
---
a/server/manager/src/test/java/org/apache/accumulo/manager/replication/ManagerReplicationCoordinatorTest.java
+++
b/server/manager/src/test/java/org/apache/accumulo/manager/replication/ManagerReplicationCoordinatorTest.java
@@ -33,6 +33,7 @@ import org.apache.accumulo.server.ServerContext;
import org.easymock.EasyMock;
import org.junit.Test;
+@Deprecated
public class ManagerReplicationCoordinatorTest {
static AccumuloConfiguration config = DefaultConfiguration.getInstance();
diff --git
a/server/manager/src/test/java/org/apache/accumulo/manager/replication/SequentialWorkAssignerTest.java
b/server/manager/src/test/java/org/apache/accumulo/manager/replication/SequentialWorkAssignerTest.java
index 57570cf..ffdad91 100644
---
a/server/manager/src/test/java/org/apache/accumulo/manager/replication/SequentialWorkAssignerTest.java
+++
b/server/manager/src/test/java/org/apache/accumulo/manager/replication/SequentialWorkAssignerTest.java
@@ -40,6 +40,7 @@ import
org.apache.accumulo.server.zookeeper.DistributedWorkQueue;
import org.junit.Before;
import org.junit.Test;
+@Deprecated
public class SequentialWorkAssignerTest {
private AccumuloClient client;
diff --git
a/server/manager/src/test/java/org/apache/accumulo/manager/replication/UnorderedWorkAssignerTest.java
b/server/manager/src/test/java/org/apache/accumulo/manager/replication/UnorderedWorkAssignerTest.java
index 22b26f7..63b7a77 100644
---
a/server/manager/src/test/java/org/apache/accumulo/manager/replication/UnorderedWorkAssignerTest.java
+++
b/server/manager/src/test/java/org/apache/accumulo/manager/replication/UnorderedWorkAssignerTest.java
@@ -47,6 +47,7 @@ import org.apache.hadoop.fs.Path;
import org.junit.Before;
import org.junit.Test;
+@Deprecated
public class UnorderedWorkAssignerTest {
private AccumuloClient client;
diff --git
a/server/manager/src/test/java/org/apache/accumulo/manager/replication/WorkMakerTest.java
b/server/manager/src/test/java/org/apache/accumulo/manager/replication/WorkMakerTest.java
index 8853767..d0be90a 100644
---
a/server/manager/src/test/java/org/apache/accumulo/manager/replication/WorkMakerTest.java
+++
b/server/manager/src/test/java/org/apache/accumulo/manager/replication/WorkMakerTest.java
@@ -25,6 +25,7 @@ import org.apache.accumulo.server.replication.StatusUtil;
import org.apache.accumulo.server.replication.proto.Replication.Status;
import org.junit.Test;
+@Deprecated
public class WorkMakerTest {
@Test
diff --git
a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/replication/ReplicationInformation.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/replication/ReplicationInformation.java
index 8bd2d46..d4c9c7a 100644
---
a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/replication/ReplicationInformation.java
+++
b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/replication/ReplicationInformation.java
@@ -23,6 +23,7 @@ package org.apache.accumulo.monitor.rest.replication;
*
* @since 2.0.0
*/
+@Deprecated
public class ReplicationInformation {
// Variable names become JSON keys
diff --git
a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/replication/ReplicationResource.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/replication/ReplicationResource.java
index f38dd2e..95883b9 100644
---
a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/replication/ReplicationResource.java
+++
b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/replication/ReplicationResource.java
@@ -66,6 +66,7 @@ import org.slf4j.LoggerFactory;
*/
@Path("/replication")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+@Deprecated
public class ReplicationResource {
private static final Logger log =
LoggerFactory.getLogger(ReplicationResource.class);
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 480d448..993b57a 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -191,6 +191,7 @@ public class TabletServer extends AbstractServer {
}
private final LogSorter logSorter;
+ @SuppressWarnings("deprecation")
private ReplicationWorker replWorker = null;
final TabletStatsKeeper statsKeeper;
private final AtomicInteger logIdGenerator = new AtomicInteger();
@@ -246,7 +247,9 @@ public class TabletServer extends AbstractServer {
log.info("Instance " + getInstanceID());
this.sessionManager = new SessionManager(context);
this.logSorter = new LogSorter(context, aconf);
- this.replWorker = new ReplicationWorker(context);
+ @SuppressWarnings("deprecation")
+ ReplicationWorker replWorker = new ReplicationWorker(context);
+ this.replWorker = replWorker;
this.statsKeeper = new TabletStatsKeeper();
final int numBusyTabletsToLog =
aconf.getCount(Property.TSERV_LOG_BUSY_TABLETS_COUNT);
final long logBusyTabletsDelay =
@@ -601,6 +604,7 @@ public class TabletServer extends AbstractServer {
return address;
}
+ @Deprecated
private void startReplicationService() throws UnknownHostException {
final ReplicationServicerHandler handler = new
ReplicationServicerHandler(this);
ReplicationServicer.Iface rpcProxy = TraceUtil.wrapService(handler);
@@ -695,6 +699,16 @@ public class TabletServer extends AbstractServer {
}
}
+ @Deprecated
+ private void initializeZkForReplication() {
+ try {
+
ZooKeeperInitialization.ensureZooKeeperInitialized(getContext().getZooReaderWriter(),
+ getContext().getZooKeeperRoot());
+ } catch (KeeperException | InterruptedException e) {
+ throw new IllegalStateException("Exception while ensuring ZooKeeper is
initialized", e);
+ }
+ }
+
// main loop listens for client requests
@Override
public void run() {
@@ -702,13 +716,7 @@ public class TabletServer extends AbstractServer {
// To make things easier on users/devs, and to avoid creating an upgrade
path to 1.7
// We can just make the zookeeper paths before we try to use.
- try {
-
ZooKeeperInitialization.ensureZooKeeperInitialized(getContext().getZooReaderWriter(),
- getContext().getZooKeeperRoot());
- } catch (KeeperException | InterruptedException e) {
- log.error("Could not ensure that ZooKeeper is properly initialized", e);
- throw new RuntimeException(e);
- }
+ initializeZkForReplication();
if (authKeyWatcher != null) {
log.info("Seeding ZooKeeper watcher for authentication keys");
@@ -782,10 +790,12 @@ public class TabletServer extends AbstractServer {
}
final AccumuloConfiguration aconf = getConfiguration();
// if the replication name is ever set, then start replication services
+ @SuppressWarnings("deprecation")
+ Property p = Property.REPLICATION_NAME;
context.getScheduledExecutor().scheduleWithFixedDelay(() -> {
if (this.replServer == null) {
- if (!getConfiguration().get(Property.REPLICATION_NAME).isEmpty()) {
- log.info(Property.REPLICATION_NAME.getKey() + " was set, starting
repl services.");
+ if (!getConfiguration().get(p).isEmpty()) {
+ log.info(p.getKey() + " was set, starting repl services.");
setupReplication(aconf);
}
}
@@ -895,6 +905,7 @@ public class TabletServer extends AbstractServer {
}
}
+ @SuppressWarnings("deprecation")
private void setupReplication(AccumuloConfiguration aconf) {
// Start the thrift service listening for incoming replication requests
try {
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
index 1ad83a9..d2a15c0 100644
---
a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
@@ -410,8 +410,11 @@ public class TabletServerLogger {
// Need to release
KeyExtent extent = commitSession.getExtent();
- if (ReplicationConfigurationUtil.isEnabled(extent,
- tserver.getTableConfiguration(extent))) {
+ @SuppressWarnings("deprecation")
+ boolean replicationEnabled =
ReplicationConfigurationUtil.isEnabled(extent,
+ tserver.getTableConfiguration(extent));
+ if (replicationEnabled) {
+ @SuppressWarnings("deprecation")
Status status =
StatusUtil.openWithUnknownLength(System.currentTimeMillis());
log.debug("Writing " + ProtobufUtil.toString(status) + " to
metadata table for "
+ copy.getFileName());
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
index 3f4b617..ea99cf1 100644
---
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
@@ -32,7 +32,6 @@ import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Map;
-import java.util.Objects;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.TimeUnit;
@@ -82,6 +81,7 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.context.Scope;
+@Deprecated
public class AccumuloReplicaSystem implements ReplicaSystem {
private static final Logger log =
LoggerFactory.getLogger(AccumuloReplicaSystem.class);
private static final String RFILE_SUFFIX = "." + RFile.EXTENSION;
@@ -383,8 +383,8 @@ public class AccumuloReplicaSystem implements ReplicaSystem
{
// Read and send a batch of mutations
replResult =
ReplicationClient.executeServicerWithReturn(peerContext, peerTserver,
- new WalClientExecReturn(target, input, p, currentStatus,
sizeLimit, remoteTableId,
- tcreds, tids),
+ new WalClientExecReturn(this, target, input, p, currentStatus,
sizeLimit,
+ remoteTableId, tcreds, tids),
timeout);
} catch (Exception e) {
log.error("Caught exception replicating data to {} at {}",
peerContext.getInstanceName(),
@@ -502,67 +502,7 @@ public class AccumuloReplicaSystem implements
ReplicaSystem {
}
}
- protected class WalClientExecReturn
- implements ClientExecReturn<ReplicationStats,ReplicationServicer.Client>
{
-
- private ReplicationTarget target;
- private DataInputStream input;
- private Path p;
- private Status status;
- private long sizeLimit;
- private String remoteTableId;
- private TCredentials tcreds;
- private Set<Integer> tids;
-
- public WalClientExecReturn(ReplicationTarget target, DataInputStream
input, Path p,
- Status status, long sizeLimit, String remoteTableId, TCredentials
tcreds,
- Set<Integer> tids) {
- this.target = target;
- this.input = input;
- this.p = p;
- this.status = status;
- this.sizeLimit = sizeLimit;
- this.remoteTableId = remoteTableId;
- this.tcreds = tcreds;
- this.tids = tids;
- }
-
- @Override
- public ReplicationStats execute(Client client) throws Exception {
- WalReplication edits = getWalEdits(target, input, p, status, sizeLimit,
tids);
-
- log.debug(
- "Read {} WAL entries and retained {} bytes of WAL entries for
replication to peer '{}'",
- (edits.entriesConsumed == Long.MAX_VALUE) ? "all remaining" :
edits.entriesConsumed,
- edits.sizeInBytes, p);
-
- // If we have some edits to send
- if (edits.walEdits.getEditsSize() > 0) {
- log.debug("Sending {} edits", edits.walEdits.getEditsSize());
- long entriesReplicated = client.replicateLog(remoteTableId,
edits.walEdits, tcreds);
- if (entriesReplicated == edits.numUpdates) {
- log.debug("Replicated {} edits", entriesReplicated);
- } else {
- log.warn("Sent {} WAL entries for replication but {} were reported
as replicated",
- edits.numUpdates, entriesReplicated);
- }
-
- // We don't have to replicate every LogEvent in the file (only
Mutation LogEvents), but we
- // want to track progress in the file relative to all LogEvents (to
avoid duplicative
- // processing/replication)
- return edits;
- } else if (edits.entriesConsumed > 0) {
- // Even if we send no data, we want to record a non-zero new begin
value to avoid checking
- // the same
- // log entries multiple times to determine if they should be sent
- return edits;
- }
-
- // No data sent (bytes nor records) and no progress made
- return new ReplicationStats(0L, 0L, 0L);
- }
- }
-
+ @Deprecated
protected class RFileClientExecReturn
implements ClientExecReturn<ReplicationStats,ReplicationServicer.Client>
{
@@ -780,82 +720,4 @@ public class AccumuloReplicaSystem implements
ReplicaSystem {
return mutationsToSend;
}
- public static class ReplicationStats {
- /**
- * The size, in bytes, of the data sent
- */
- public long sizeInBytes;
-
- /**
- * The number of records sent
- */
- public long sizeInRecords;
-
- /**
- * The number of entries consumed from the log (to increment {@link
Status}'s begin)
- */
- public long entriesConsumed;
-
- public ReplicationStats(long sizeInBytes, long sizeInRecords, long
entriesConsumed) {
- this.sizeInBytes = sizeInBytes;
- this.sizeInRecords = sizeInRecords;
- this.entriesConsumed = entriesConsumed;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(sizeInBytes + sizeInRecords + entriesConsumed);
- }
-
- @Override
- public boolean equals(Object o) {
- if (o != null) {
- if (ReplicationStats.class.isAssignableFrom(o.getClass())) {
- ReplicationStats other = (ReplicationStats) o;
- return sizeInBytes == other.sizeInBytes && sizeInRecords ==
other.sizeInRecords
- && entriesConsumed == other.entriesConsumed;
- }
- }
- return false;
- }
- }
-
- /**
- * A "struct" to avoid a nested Entry. Contains the resultant information
from collecting data for
- * replication
- */
- public static class WalReplication extends ReplicationStats {
- /**
- * The data to send over the wire
- */
- public WalEdits walEdits;
-
- /**
- * The number of updates contained in this batch
- */
- public long numUpdates;
-
- public WalReplication(WalEdits edits, long size, long entriesConsumed,
long numMutations) {
- super(size, edits.getEditsSize(), entriesConsumed);
- this.walEdits = edits;
- this.numUpdates = numMutations;
- }
-
- @Override
- public int hashCode() {
- return super.hashCode() + Objects.hashCode(walEdits) +
Objects.hashCode(numUpdates);
- }
-
- @Override
- public boolean equals(Object o) {
- if (o instanceof WalReplication) {
- WalReplication other = (WalReplication) o;
-
- return super.equals(other) && walEdits.equals(other.walEdits)
- && numUpdates == other.numUpdates;
- }
-
- return false;
- }
- }
}
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java
index 9d0f0e4..020c0a0 100644
---
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java
@@ -49,6 +49,7 @@ import org.slf4j.LoggerFactory;
* Use a BatchWriter to replay WAL entries to an Accumulo table. This assumes
that all WAL entries
* are for this table. Pruning out undesired entries is expected to be done by
the sender.
*/
+@Deprecated
public class BatchWriterReplicationReplayer implements
AccumuloReplicationReplayer {
private static final Logger log =
LoggerFactory.getLogger(BatchWriterReplicationReplayer.class);
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationProcessor.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationProcessor.java
index b6d6e1f..9af8cb7 100644
---
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationProcessor.java
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationProcessor.java
@@ -50,6 +50,7 @@ import com.google.protobuf.InvalidProtocolBufferException;
/**
* Transmit the given data to a peer
*/
+@Deprecated
public class ReplicationProcessor implements Processor {
private static final Logger log =
LoggerFactory.getLogger(ReplicationProcessor.class);
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java
index 33083e3..72c3ada 100644
---
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java
@@ -39,6 +39,7 @@ import org.apache.thrift.TException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Deprecated
public class ReplicationServicerHandler implements Iface {
private static final Logger log =
LoggerFactory.getLogger(ReplicationServicerHandler.class);
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationStats.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationStats.java
new file mode 100644
index 0000000..24e28c8
--- /dev/null
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationStats.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.tserver.replication;
+
+import java.util.Objects;
+
+import org.apache.accumulo.server.replication.proto.Replication.Status;
+
+@Deprecated
+public class ReplicationStats {
+ /**
+ * The size, in bytes, of the data sent
+ */
+ public long sizeInBytes;
+
+ /**
+ * The number of records sent
+ */
+ public long sizeInRecords;
+
+ /**
+ * The number of entries consumed from the log (to increment {@link
Status}'s begin)
+ */
+ public long entriesConsumed;
+
+ public ReplicationStats(long sizeInBytes, long sizeInRecords, long
entriesConsumed) {
+ this.sizeInBytes = sizeInBytes;
+ this.sizeInRecords = sizeInRecords;
+ this.entriesConsumed = entriesConsumed;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(sizeInBytes + sizeInRecords + entriesConsumed);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o != null) {
+ if (ReplicationStats.class.isAssignableFrom(o.getClass())) {
+ ReplicationStats other = (ReplicationStats) o;
+ return sizeInBytes == other.sizeInBytes && sizeInRecords ==
other.sizeInRecords
+ && entriesConsumed == other.entriesConsumed;
+ }
+ }
+ return false;
+ }
+}
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationWorker.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationWorker.java
index 5d23093..1bb8100 100644
---
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationWorker.java
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationWorker.java
@@ -33,6 +33,7 @@ import org.slf4j.LoggerFactory;
/**
* Launches the {@link ReplicationProcessor}
*/
+@Deprecated
public class ReplicationWorker implements Runnable {
private static final Logger log =
LoggerFactory.getLogger(ReplicationWorker.class);
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/WalClientExecReturn.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/WalClientExecReturn.java
new file mode 100644
index 0000000..aeb1967
--- /dev/null
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/WalClientExecReturn.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.tserver.replication;
+
+import java.io.DataInputStream;
+import java.util.Set;
+
+import org.apache.accumulo.core.clientImpl.ClientExecReturn;
+import org.apache.accumulo.core.replication.ReplicationTarget;
+import org.apache.accumulo.core.replication.thrift.ReplicationServicer;
+import org.apache.accumulo.core.replication.thrift.ReplicationServicer.Client;
+import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
+import org.apache.accumulo.server.replication.proto.Replication.Status;
+import org.apache.hadoop.fs.Path;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Deprecated
+class WalClientExecReturn implements
ClientExecReturn<ReplicationStats,ReplicationServicer.Client> {
+
+ private static final Logger log =
LoggerFactory.getLogger(WalClientExecReturn.class);
+
+ private final AccumuloReplicaSystem ars;
+ private ReplicationTarget target;
+ private DataInputStream input;
+ private Path p;
+ private Status status;
+ private long sizeLimit;
+ private String remoteTableId;
+ private TCredentials tcreds;
+ private Set<Integer> tids;
+
+ public WalClientExecReturn(AccumuloReplicaSystem ars, ReplicationTarget
target,
+ DataInputStream input, Path p, Status status, long sizeLimit, String
remoteTableId,
+ TCredentials tcreds, Set<Integer> tids) {
+ this.ars = ars;
+ this.target = target;
+ this.input = input;
+ this.p = p;
+ this.status = status;
+ this.sizeLimit = sizeLimit;
+ this.remoteTableId = remoteTableId;
+ this.tcreds = tcreds;
+ this.tids = tids;
+ }
+
+ @Override
+ public ReplicationStats execute(Client client) throws Exception {
+ WalReplication edits = ars.getWalEdits(target, input, p, status,
sizeLimit, tids);
+
+ log.debug(
+ "Read {} WAL entries and retained {} bytes of WAL entries for
replication to peer '{}'",
+ (edits.entriesConsumed == Long.MAX_VALUE) ? "all remaining" :
edits.entriesConsumed,
+ edits.sizeInBytes, p);
+
+ // If we have some edits to send
+ if (edits.walEdits.getEditsSize() > 0) {
+ log.debug("Sending {} edits", edits.walEdits.getEditsSize());
+ long entriesReplicated = client.replicateLog(remoteTableId,
edits.walEdits, tcreds);
+ if (entriesReplicated == edits.numUpdates) {
+ log.debug("Replicated {} edits", entriesReplicated);
+ } else {
+ log.warn("Sent {} WAL entries for replication but {} were reported as
replicated",
+ edits.numUpdates, entriesReplicated);
+ }
+
+ // We don't have to replicate every LogEvent in the file (only Mutation
LogEvents), but we
+ // want to track progress in the file relative to all LogEvents (to
avoid duplicative
+ // processing/replication)
+ return edits;
+ } else if (edits.entriesConsumed > 0) {
+ // Even if we send no data, we want to record a non-zero new begin value
to avoid checking
+ // the same
+ // log entries multiple times to determine if they should be sent
+ return edits;
+ }
+
+ // No data sent (bytes nor records) and no progress made
+ return new ReplicationStats(0L, 0L, 0L);
+ }
+}
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/WalReplication.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/WalReplication.java
new file mode 100644
index 0000000..86e60b2
--- /dev/null
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/WalReplication.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.tserver.replication;
+
+import java.util.Objects;
+
+import org.apache.accumulo.core.replication.thrift.WalEdits;
+
+/**
+ * A "struct" to avoid a nested Entry. Contains the resultant information from
collecting data for
+ * replication
+ */
+@Deprecated
+public class WalReplication extends ReplicationStats {
+ /**
+ * The data to send over the wire
+ */
+ public WalEdits walEdits;
+
+ /**
+ * The number of updates contained in this batch
+ */
+ public long numUpdates;
+
+ public WalReplication(WalEdits edits, long size, long entriesConsumed, long
numMutations) {
+ super(size, edits.getEditsSize(), entriesConsumed);
+ this.walEdits = edits;
+ this.numUpdates = numMutations;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode() + Objects.hashCode(walEdits) +
Objects.hashCode(numUpdates);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o instanceof WalReplication) {
+ WalReplication other = (WalReplication) o;
+
+ return super.equals(other) && walEdits.equals(other.walEdits)
+ && numUpdates == other.numUpdates;
+ }
+
+ return false;
+ }
+}
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
index 8d9c33d..e18909d 100644
---
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
@@ -48,6 +48,7 @@ import org.apache.accumulo.core.util.MapCounter;
import org.apache.accumulo.core.util.Pair;
import org.apache.accumulo.server.fs.VolumeManager;
import org.apache.accumulo.server.replication.StatusUtil;
+import org.apache.accumulo.server.replication.proto.Replication.Status;
import org.apache.accumulo.server.util.ManagerMetadataUtil;
import org.apache.accumulo.server.util.MetadataTableUtil;
import org.apache.accumulo.server.util.ReplicationTableUtil;
@@ -316,6 +317,7 @@ class DatafileManager {
long t1, t2;
Set<String> unusedWalLogs = tablet.beginClearingUnusedLogs();
+ @SuppressWarnings("deprecation")
boolean replicate =
ReplicationConfigurationUtil.isEnabled(tablet.getExtent(),
tablet.getTableConfiguration());
Set<String> logFileOnly = null;
@@ -353,8 +355,10 @@ class DatafileManager {
logFileOnly);
}
for (String logFile : logFileOnly) {
+ @SuppressWarnings("deprecation")
+ Status status = StatusUtil.openWithUnknownLength();
ReplicationTableUtil.updateFiles(tablet.getContext(),
tablet.getExtent(), logFile,
- StatusUtil.openWithUnknownLength());
+ status);
}
}
} finally {
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
index 2279d8a..2035a0f 100644
---
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
@@ -327,6 +327,7 @@ public class Tablet {
this.tableConfiguration = tblConf;
// translate any volume changes
+ @SuppressWarnings("deprecation")
boolean replicationEnabled =
ReplicationConfigurationUtil.isEnabled(extent,
this.tableConfiguration);
TabletFiles tabletPaths =
@@ -387,14 +388,17 @@ public class Tablet {
}
commitSession.updateMaxCommittedTime(tabletTime.getTime());
+ @SuppressWarnings("deprecation")
+ boolean replicationEnabledForTable =
ReplicationConfigurationUtil.isEnabled(extent,
+ tabletServer.getTableConfiguration(extent));
if (entriesUsedOnTablet.get() == 0) {
log.debug("No replayed mutations applied, removing unused entries
for {}", extent);
MetadataTableUtil.removeUnusedWALEntries(getTabletServer().getContext(), extent,
logEntries, tabletServer.getLock());
logEntries.clear();
- } else if (ReplicationConfigurationUtil.isEnabled(extent,
- tabletServer.getTableConfiguration(extent))) {
+ } else if (replicationEnabledForTable) {
// record that logs may have data for this extent
+ @SuppressWarnings("deprecation")
Status status = StatusUtil.openWithUnknownLength();
for (LogEntry logEntry : logEntries) {
log.debug("Writing updated status to metadata table for {} {}",
logEntry.filename,
diff --git
a/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystemTest.java
b/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystemTest.java
index 7016c7b..d65102a 100644
---
a/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystemTest.java
+++
b/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystemTest.java
@@ -55,13 +55,11 @@ import
org.apache.accumulo.server.replication.proto.Replication.Status;
import org.apache.accumulo.tserver.logger.LogEvents;
import org.apache.accumulo.tserver.logger.LogFileKey;
import org.apache.accumulo.tserver.logger.LogFileValue;
-import
org.apache.accumulo.tserver.replication.AccumuloReplicaSystem.ReplicationStats;
-import
org.apache.accumulo.tserver.replication.AccumuloReplicaSystem.WalClientExecReturn;
-import
org.apache.accumulo.tserver.replication.AccumuloReplicaSystem.WalReplication;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.junit.Test;
+@Deprecated
public class AccumuloReplicaSystemTest {
@Test
@@ -471,7 +469,7 @@ public class AccumuloReplicaSystemTest {
TCredentials tcreds = null;
Set<Integer> tids = new HashSet<>();
- WalClientExecReturn walClientExec = ars.new WalClientExecReturn(target,
input, p, status,
+ WalClientExecReturn walClientExec = new WalClientExecReturn(ars, target,
input, p, status,
sizeLimit, remoteTableId, tcreds, tids);
expect(ars.getWalEdits(target, input, p, status, sizeLimit,
tids)).andReturn(walReplication);
@@ -501,7 +499,7 @@ public class AccumuloReplicaSystemTest {
TCredentials tcreds = null;
Set<Integer> tids = new HashSet<>();
- WalClientExecReturn walClientExec = ars.new WalClientExecReturn(target,
input, p, status,
+ WalClientExecReturn walClientExec = new WalClientExecReturn(ars, target,
input, p, status,
sizeLimit, remoteTableId, tcreds, tids);
expect(ars.getWalEdits(target, input, p, status, sizeLimit,
tids)).andReturn(walReplication);
diff --git
a/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayerTest.java
b/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayerTest.java
index e34de5d..e659962 100644
---
a/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayerTest.java
+++
b/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayerTest.java
@@ -45,6 +45,7 @@ import org.junit.Test;
import com.google.common.collect.Lists;
+@Deprecated
public class BatchWriterReplicationReplayerTest {
private ClientContext context;
diff --git
a/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/ReplicationProcessorTest.java
b/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/ReplicationProcessorTest.java
index 06e234a..b94d60b 100644
---
a/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/ReplicationProcessorTest.java
+++
b/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/ReplicationProcessorTest.java
@@ -40,6 +40,7 @@ import
org.apache.accumulo.server.replication.proto.Replication.Status;
import org.apache.hadoop.fs.Path;
import org.junit.Test;
+@Deprecated
public class ReplicationProcessorTest {
@Test
diff --git
a/test/src/main/java/org/apache/accumulo/test/ManagerRepairsDualAssignmentIT.java
b/test/src/main/java/org/apache/accumulo/test/ManagerRepairsDualAssignmentIT.java
index c2219c0..cfb4a73 100644
---
a/test/src/main/java/org/apache/accumulo/test/ManagerRepairsDualAssignmentIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/ManagerRepairsDualAssignmentIT.java
@@ -31,6 +31,7 @@ import org.apache.accumulo.core.client.AccumuloClient;
import org.apache.accumulo.core.client.admin.NewTableConfiguration;
import org.apache.accumulo.core.clientImpl.ClientContext;
import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.data.TableId;
import org.apache.accumulo.core.dataImpl.KeyExtent;
import org.apache.accumulo.core.metadata.MetadataTable;
import org.apache.accumulo.core.metadata.RootTable;
@@ -105,6 +106,8 @@ public class ManagerRepairsDualAssignmentIT extends
ConfigurableMacBase {
cluster.killProcess(ServerType.TABLET_SERVER,
cluster.getProcesses().get(ServerType.TABLET_SERVER).iterator().next());
Set<TServerInstance> replStates = new HashSet<>();
+ @SuppressWarnings("deprecation")
+ TableId repTable = ReplicationTable.ID;
// Find out which tablet server remains
while (true) {
UtilWaitThread.sleep(1000);
@@ -114,8 +117,7 @@ public class ManagerRepairsDualAssignmentIT extends
ConfigurableMacBase {
for (TabletLocationState tls : store) {
if (tls != null && tls.current != null) {
states.add(tls.current);
- } else if (tls != null
- && tls.extent.equals(new KeyExtent(ReplicationTable.ID, null,
null))) {
+ } else if (tls != null && tls.extent.equals(new KeyExtent(repTable,
null, null))) {
replStates.add(tls.current);
} else {
allAssigned = false;
diff --git
a/test/src/main/java/org/apache/accumulo/test/gc/replication/CloseWriteAheadLogReferencesIT.java
b/test/src/main/java/org/apache/accumulo/test/gc/replication/CloseWriteAheadLogReferencesIT.java
index 34b5aab..5975006 100644
---
a/test/src/main/java/org/apache/accumulo/test/gc/replication/CloseWriteAheadLogReferencesIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/gc/replication/CloseWriteAheadLogReferencesIT.java
@@ -65,6 +65,7 @@ import org.junit.Test;
import com.google.common.collect.Iterables;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class CloseWriteAheadLogReferencesIT extends ConfigurableMacBase {
private WrappedCloseWriteAheadLogReferences refs;
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
index 7099f9a..f816603 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
@@ -74,6 +74,7 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@Ignore("Replication ITs are not stable and not currently maintained")
@Category(MiniClusterOnlyTests.class)
+@Deprecated
public class CyclicReplicationIT {
private static final Logger log =
LoggerFactory.getLogger(CyclicReplicationIT.class);
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/FinishedWorkUpdaterIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/FinishedWorkUpdaterIT.java
index bc26c78..256a418 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/FinishedWorkUpdaterIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/FinishedWorkUpdaterIT.java
@@ -48,6 +48,7 @@ import org.junit.Test;
import com.google.common.collect.Iterables;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class FinishedWorkUpdaterIT extends ConfigurableMacBase {
private AccumuloClient client;
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
index 17663aa..e6fb594 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
@@ -78,6 +78,7 @@ import org.slf4j.LoggerFactory;
* if a WAL will never be used in the future.
*/
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class GarbageCollectorCommunicatesWithTServersIT extends
ConfigurableMacBase {
private static final Logger log =
LoggerFactory.getLogger(GarbageCollectorCommunicatesWithTServersIT.class);
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/KerberosReplicationIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/KerberosReplicationIT.java
index b7a8bab..c932856 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/KerberosReplicationIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/KerberosReplicationIT.java
@@ -77,6 +77,7 @@ import com.google.common.collect.Iterators;
*/
@Ignore("Replication ITs are not stable and not currently maintained")
@Category(MiniClusterOnlyTests.class)
+@Deprecated
public class KerberosReplicationIT extends AccumuloITBase {
private static final Logger log = LoggerFactory.getLogger(KerberosIT.class);
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/MockReplicaSystem.java
b/test/src/main/java/org/apache/accumulo/test/replication/MockReplicaSystem.java
index 9c56ce0..9b4fde6 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/MockReplicaSystem.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/MockReplicaSystem.java
@@ -36,6 +36,7 @@ import org.slf4j.LoggerFactory;
* <p>
* Default sleep amount is 0ms
*/
+@Deprecated
public class MockReplicaSystem implements ReplicaSystem {
private static final Logger log =
LoggerFactory.getLogger(MockReplicaSystem.class);
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
index 1d5982b..efcac7e 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
@@ -82,6 +82,7 @@ import com.google.common.collect.Iterators;
* Replication tests which start at least two MAC instances and replicate data
between them
*/
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class MultiInstanceReplicationIT extends ConfigurableMacBase {
private static final Logger log =
LoggerFactory.getLogger(MultiInstanceReplicationIT.class);
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/MultiTserverReplicationIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/MultiTserverReplicationIT.java
index 524a425..4304a30 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/MultiTserverReplicationIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/MultiTserverReplicationIT.java
@@ -48,6 +48,7 @@ import org.slf4j.LoggerFactory;
import com.google.common.collect.Iterables;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class MultiTserverReplicationIT extends ConfigurableMacBase {
private static final Logger log =
LoggerFactory.getLogger(MultiTserverReplicationIT.class);
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/RemoveCompleteReplicationRecordsIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/RemoveCompleteReplicationRecordsIT.java
index 092136b..b6f33d0 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/RemoveCompleteReplicationRecordsIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/RemoveCompleteReplicationRecordsIT.java
@@ -57,6 +57,7 @@ import org.junit.Test;
import com.google.common.collect.Iterables;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class RemoveCompleteReplicationRecordsIT extends ConfigurableMacBase {
private MockRemoveCompleteReplicationRecords rcrr;
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
index 94ff4f7..050424f 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
@@ -124,6 +124,7 @@ import com.google.protobuf.TextFormat;
* test replication in a functional way without having to worry about two real
systems.
*/
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class ReplicationIT extends ConfigurableMacBase {
private static final Logger log =
LoggerFactory.getLogger(ReplicationIT.class);
private static final long MILLIS_BETWEEN_REPLICATION_TABLE_ONLINE_CHECKS =
5000L;
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/ReplicationOperationsImplIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/ReplicationOperationsImplIT.java
index 1015d6f..96e2823 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/ReplicationOperationsImplIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/ReplicationOperationsImplIT.java
@@ -62,6 +62,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class ReplicationOperationsImplIT extends ConfigurableMacBase {
private static final Logger log =
LoggerFactory.getLogger(ReplicationOperationsImplIT.class);
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/SequentialWorkAssignerIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/SequentialWorkAssignerIT.java
index 268e49b..71e57db 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/SequentialWorkAssignerIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/SequentialWorkAssignerIT.java
@@ -51,6 +51,7 @@ import org.junit.Ignore;
import org.junit.Test;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class SequentialWorkAssignerIT extends ConfigurableMacBase {
private AccumuloClient client;
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/StatusCombinerMacIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/StatusCombinerMacIT.java
index d342b6e..67653be 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/StatusCombinerMacIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/StatusCombinerMacIT.java
@@ -55,6 +55,7 @@ import org.junit.Test;
import com.google.common.collect.Iterables;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class StatusCombinerMacIT extends SharedMiniClusterBase {
@Override
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/StatusMakerIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/StatusMakerIT.java
index 720fd17..05e6fcc 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/StatusMakerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/StatusMakerIT.java
@@ -66,6 +66,7 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class StatusMakerIT extends ConfigurableMacBase {
private AccumuloClient client;
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerIT.java
index 60ceb1d..8049d6a 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerIT.java
@@ -52,6 +52,7 @@ import org.junit.Ignore;
import org.junit.Test;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class UnorderedWorkAssignerIT extends ConfigurableMacBase {
private AccumuloClient client;
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
index 4771b9e..a05beb5 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
@@ -79,6 +79,7 @@ import org.slf4j.LoggerFactory;
import com.google.common.collect.Iterators;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
private static final Logger log =
LoggerFactory.getLogger(UnorderedWorkAssignerReplicationIT.class);
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/UnusedWalDoesntCloseReplicationStatusIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/UnusedWalDoesntCloseReplicationStatusIT.java
index 02d503d..7cb7640 100644
---
a/test/src/main/java/org/apache/accumulo/test/replication/UnusedWalDoesntCloseReplicationStatusIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/replication/UnusedWalDoesntCloseReplicationStatusIT.java
@@ -70,6 +70,7 @@ import org.junit.Test;
import com.google.common.collect.Iterables;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class UnusedWalDoesntCloseReplicationStatusIT extends
ConfigurableMacBase {
@Override
diff --git
a/test/src/main/java/org/apache/accumulo/test/replication/WorkMakerIT.java
b/test/src/main/java/org/apache/accumulo/test/replication/WorkMakerIT.java
index 3610416..b2f28ba 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/WorkMakerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/WorkMakerIT.java
@@ -53,6 +53,7 @@ import org.junit.Test;
import com.google.common.collect.Iterables;
@Ignore("Replication ITs are not stable and not currently maintained")
+@Deprecated
public class WorkMakerIT extends ConfigurableMacBase {
private AccumuloClient client;