From e9612e6c89808fd6ac09edca1630f28f2e3ab7ef Mon Sep 17 00:00:00 2001 From: Umesh Agashe Date: Tue, 14 Nov 2017 14:22:49 -0800 Subject: [PATCH] HBASE-18964 Deprecated RowProcessor and Region#processRowsWithLocks() methods that take RowProcessor as an argument Signed-off-by: Michael Stack --- .../org/apache/hadoop/hbase/regionserver/HRegion.java | 2 +- .../org/apache/hadoop/hbase/regionserver/Region.java | 9 +++++++++ .../apache/hadoop/hbase/regionserver/RowProcessor.java | 8 ++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 3a3cb03bf3f..14d6a9def7b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -3853,7 +3853,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi nonceKey.getNonceGroup(), nonceKey.getNonce(), batchOp.getOrigLogSeqNum()); } - // STEP 6. Complete mvcc for all but last writeEntry (for replay case) + // Complete mvcc for all but last writeEntry (for replay case) if (it.hasNext() && writeEntry != null) { mvcc.complete(writeEntry); writeEntry = null; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java index 2d66d52d8ec..75f02a363c0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java @@ -409,7 +409,10 @@ public interface Region extends ConfigurationObserver { * Performs atomic multiple reads and writes on a given row. * * @param processor The object defines the reads and writes to a row. + * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. For customization, use + * Coprocessors instead. */ + @Deprecated void processRowsWithLocks(RowProcessor processor) throws IOException; /** @@ -418,9 +421,12 @@ public interface Region extends ConfigurationObserver { * @param processor The object defines the reads and writes to a row. * @param nonceGroup Optional nonce group of the operation (client Id) * @param nonce Optional nonce of the operation (unique random id to ensure "more idempotence") + * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. For customization, use + * Coprocessors instead. */ // TODO Should not be exposing with params nonceGroup, nonce. Change when doing the jira for // Changing processRowsWithLocks and RowProcessor + @Deprecated void processRowsWithLocks(RowProcessor processor, long nonceGroup, long nonce) throws IOException; @@ -432,9 +438,12 @@ public interface Region extends ConfigurationObserver { * Use a negative number to switch off the time bound * @param nonceGroup Optional nonce group of the operation (client Id) * @param nonce Optional nonce of the operation (unique random id to ensure "more idempotence") + * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. For customization, use + * Coprocessors instead. */ // TODO Should not be exposing with params nonceGroup, nonce. Change when doing the jira for // Changing processRowsWithLocks and RowProcessor + @Deprecated void processRowsWithLocks(RowProcessor processor, long timeout, long nonceGroup, long nonce) throws IOException; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RowProcessor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RowProcessor.java index 625d9a67b0d..c79571c381f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RowProcessor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RowProcessor.java @@ -39,11 +39,15 @@ import com.google.protobuf.Message; * This class performs scans and generates mutations and WAL edits. * The locks and MVCC will be handled by HRegion. * - * The RowProcessor user code could have data that needs to be - * sent across for proper initialization at the server side. The generic type + * The RowProcessor user code could have data that needs to be + * sent across for proper initialization at the server side. The generic type * parameter S is the type of the request data sent to the server. * The generic type parameter T is the return type of RowProcessor.getResult(). + * + * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. For customization, use + * Coprocessors instead. */ +@Deprecated @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC) @InterfaceStability.Evolving public interface RowProcessor {