From 6ac243748507f7df2bd2c43f8880c3f4587ef8e2 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Mon, 15 Apr 2019 10:48:08 -0700 Subject: [PATCH] HBASE-22235 OperationStatus.{SUCCESS|FAILURE|NOT_RUN} are not visible to 3rd party coprocessors --- .../java/org/apache/hadoop/hbase/HConstants.java | 2 +- .../hbase/regionserver/OperationStatus.java | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java index 02c540d9f01..a1d53b7641a 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java @@ -84,7 +84,7 @@ public final class HConstants { /** * Status codes used for return values of bulk operations. */ - @InterfaceAudience.Private + @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC) public enum OperationStatusCode { NOT_RUN, SUCCESS, diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/OperationStatus.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/OperationStatus.java index 69d191b0200..21027d39948 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/OperationStatus.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/OperationStatus.java @@ -18,8 +18,10 @@ */ package org.apache.hadoop.hbase.regionserver; -import org.apache.yetus.audience.InterfaceAudience; +import org.apache.hadoop.hbase.HBaseInterfaceAudience; import org.apache.hadoop.hbase.HConstants.OperationStatusCode; +import org.apache.yetus.audience.InterfaceAudience; + /** * * This class stores the Operation status code and the exception message @@ -28,20 +30,17 @@ import org.apache.hadoop.hbase.HConstants.OperationStatusCode; * the operation status in future. * */ -@InterfaceAudience.Private +@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC) public class OperationStatus { /** Singleton for successful operations. */ - static final OperationStatus SUCCESS = - new OperationStatus(OperationStatusCode.SUCCESS); + public static final OperationStatus SUCCESS = new OperationStatus(OperationStatusCode.SUCCESS); /** Singleton for failed operations. */ - static final OperationStatus FAILURE = - new OperationStatus(OperationStatusCode.FAILURE); + public static final OperationStatus FAILURE = new OperationStatus(OperationStatusCode.FAILURE); /** Singleton for operations not yet run. */ - static final OperationStatus NOT_RUN = - new OperationStatus(OperationStatusCode.NOT_RUN); + public static final OperationStatus NOT_RUN = new OperationStatus(OperationStatusCode.NOT_RUN); private final OperationStatusCode code;