From a6977124bf35a2b2a9603a4c49fbdf46fb4a4a9c 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 --- .../main/java/org/apache/hadoop/hbase/regionserver/Region.java | 9 +++++++++ .../java/org/apache/hadoop/hbase/regionserver/RowProcessor.java | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) 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 2d66d52d8ecdc2fd5510dd9fd5b7d9f26d336f12..75f02a363c0ae14b80502f754a1d2887ef326cd4 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 625d9a67b0d8712ad5920df2be5c06660390bf1d..c79571c381f1d30f4abc5ee5bf9831b861ed99b8 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 { -- 2.10.1 (Apple Git-78)