This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch 2.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/2.1 by this push: new fecffd4b12 Add missing deprecation annotations in Mutation (#3090) fecffd4b12 is described below commit fecffd4b129fb068a69b5de38b001539953a76b3 Author: Christopher Tubbs <ctubb...@apache.org> AuthorDate: Tue Nov 29 17:31:01 2022 -0500 Add missing deprecation annotations in Mutation (#3090) Add deprecation annotations for replication APIs in Mutation that should have been included in 2.1.0 along with the rest of the replication feature in #2335, but were unintentionally overlooked at the time. --- .../apache/accumulo/core/data/ConditionalMutation.java | 1 + .../java/org/apache/accumulo/core/data/Mutation.java | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/apache/accumulo/core/data/ConditionalMutation.java b/core/src/main/java/org/apache/accumulo/core/data/ConditionalMutation.java index 1f2999e844..88fb8b594b 100644 --- a/core/src/main/java/org/apache/accumulo/core/data/ConditionalMutation.java +++ b/core/src/main/java/org/apache/accumulo/core/data/ConditionalMutation.java @@ -105,6 +105,7 @@ public class ConditionalMutation extends Mutation { return result; } + @Deprecated @Override public void setReplicationSources(Set<String> sources) { throw new UnsupportedOperationException( diff --git a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java index 6410704801..cd8e5fff6c 100644 --- a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java +++ b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java @@ -91,7 +91,7 @@ public class Mutation implements Writable { * Formats available for serializing Mutations. The formats are described in a * <a href="doc-files/mutation-serialization.html">separate document</a>. */ - public static enum SERIALIZED_FORMAT { + public enum SERIALIZED_FORMAT { VERSION1, VERSION2 } @@ -1506,7 +1506,12 @@ public class Mutation implements Writable { * @param peer * the peer to add * @since 1.7.0 + * @deprecated The feature pertaining to this method was deprecated in 2.1.0, but this method was + * overlooked when annotating the code. It is being marked as deprecated in 2.1.1 in + * order to correct that oversight, and will be removed in 3.0.0 with the rest of the + * code pertaining to this feature. */ + @Deprecated(since = "2.1.1") public void addReplicationSource(String peer) { if (replicationSources == null || replicationSources == EMPTY) { replicationSources = new HashSet<>(); @@ -1521,7 +1526,12 @@ public class Mutation implements Writable { * @param sources * Set of peer names which have processed this update * @since 1.7.0 + * @deprecated The feature pertaining to this method was deprecated in 2.1.0, but this method was + * overlooked when annotating the code. It is being marked as deprecated in 2.1.1 in + * order to correct that oversight, and will be removed in 3.0.0 with the rest of the + * code pertaining to this feature. */ + @Deprecated(since = "2.1.1") public void setReplicationSources(Set<String> sources) { requireNonNull(sources); this.replicationSources = sources; @@ -1531,7 +1541,12 @@ public class Mutation implements Writable { * Return the replication sources for this Mutation * * @return An unmodifiable view of the replication sources + * @deprecated The feature pertaining to this method was deprecated in 2.1.0, but this method was + * overlooked when annotating the code. It is being marked as deprecated in 2.1.1 in + * order to correct that oversight, and will be removed in 3.0.0 with the rest of the + * code pertaining to this feature. */ + @Deprecated(since = "2.1.1") public Set<String> getReplicationSources() { if (replicationSources == null) { return EMPTY;