You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2024/07/17 14:43:50 UTC

(hbase) branch branch-3 updated: HBASE-28731 Remove the IA.Private annotation on WALEdit's add methods as they have already been used by CP users (#6083)

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-3 by this push:
     new 9337e991896 HBASE-28731 Remove the IA.Private annotation on WALEdit's add methods as they have already been used by CP users (#6083)
9337e991896 is described below

commit 9337e99189690f3c6bbe36b0c670f7c2491cbefe
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Wed Jul 17 22:28:38 2024 +0800

    HBASE-28731 Remove the IA.Private annotation on WALEdit's add methods as they have already been used by CP users (#6083)
    
    Signed-off-by: Istvan Toth <st...@apache.org>
    Signed-off-by: Pankaj Kumar <pa...@apache.org>
    (cherry picked from commit 4b3b5e6c2519980afd07034384e4382e0f9eb34d)
---
 .../src/main/java/org/apache/hadoop/hbase/wal/WALEdit.java       | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALEdit.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALEdit.java
index c387dfe13ac..01dbe06682b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALEdit.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALEdit.java
@@ -46,10 +46,6 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.RegionEventDe
  * that came in as a single transaction. All the edits for a given transaction are written out as a
  * single record, in PB format, followed (optionally) by Cells written via the WALCellEncoder.
  * <p>
- * This class is LimitedPrivate for CPs to read-only. The {@link #add} methods are classified as
- * private methods, not for use by CPs.
- * </p>
- * <p>
  * A particular WALEdit 'type' is the 'meta' type used to mark key operational events in the WAL
  * such as compaction, flush, or region open. These meta types do not traverse hbase memstores. They
  * are edits made by the hbase system rather than edit data submitted by clients. They only show in
@@ -73,7 +69,6 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.RegionEventDe
  * file. See the hand-off in FSWALEntry Constructor.
  * @see WALKey
  */
-// TODO: Do not expose this class to Coprocessors. It has set methods. A CP might meddle.
 @InterfaceAudience.LimitedPrivate({ HBaseInterfaceAudience.REPLICATION,
   HBaseInterfaceAudience.COPROC })
 public class WALEdit implements HeapSize {
@@ -253,20 +248,17 @@ public class WALEdit implements HeapSize {
     return this.replay;
   }
 
-  @InterfaceAudience.Private
   public WALEdit add(Cell cell, byte[] family) {
     getOrCreateFamilies().add(family);
     return addCell(cell);
   }
 
-  @InterfaceAudience.Private
   public WALEdit add(Cell cell) {
     // We clone Family each time we add a Cell. Expensive but safe. For CPU savings, use
     // add(Map) or add(Cell, family).
     return add(cell, CellUtil.cloneFamily(cell));
   }
 
-  @InterfaceAudience.Private
   public WALEdit add(List<? extends Cell> cells) {
     if (cells == null || cells.isEmpty()) {
       return this;
@@ -294,7 +286,6 @@ public class WALEdit implements HeapSize {
    * that nothing else depends on the contents being immutable.
    * @param cells the list of cells that this WALEdit now contains.
    */
-  @InterfaceAudience.Private
   // Used by replay.
   public void setCells(ArrayList<Cell> cells) {
     this.cells = cells;