hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhang...@apache.org
Subject [hbase] branch master updated: HBASE-22708 Remove the deprecated methods in Hbck interface (#3362)
Date Tue, 08 Jun 2021 01:34:01 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 40a3d57  HBASE-22708 Remove the deprecated methods in Hbck interface (#3362)
40a3d57 is described below

commit 40a3d5762875df7638117a2d5ff73d5856dbe4a7
Author: GeorryHuang <215175212@qq.com>
AuthorDate: Tue Jun 8 09:33:08 2021 +0800

    HBASE-22708 Remove the deprecated methods in Hbck interface (#3362)
    
    Signed-off-by: Duo Zhang <zhangduo@apache.org>
---
 .../main/java/org/apache/hadoop/hbase/client/Hbck.java    | 15 ---------------
 .../java/org/apache/hadoop/hbase/client/TestHbck.java     |  5 ++---
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
index c518a87..7e9a519 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
@@ -21,16 +21,12 @@ import java.io.Closeable;
 import java.io.IOException;
 import java.util.List;
 import java.util.Map;
-import java.util.stream.Collectors;
 import org.apache.hadoop.hbase.Abortable;
 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.master.RegionState;
 import org.apache.yetus.audience.InterfaceAudience;
 
-import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;
-
 /**
  * Hbck fixup tool APIs. Obtain an instance from {@link Connection#getHbck()} and call
  * {@link #close()} when done.
@@ -116,17 +112,6 @@ public interface Hbck extends Abortable, Closeable {
   List<Boolean> bypassProcedure(List<Long> pids, long waitTime, boolean override,
boolean recursive)
       throws IOException;
 
-  /**
-   * Use {@link #scheduleServerCrashProcedures(List)} instead.
-   * @deprecated since 2.2.1. Will removed in 3.0.0.
-   */
-  @Deprecated
-  default List<Long> scheduleServerCrashProcedure(List<HBaseProtos.ServerName>
serverNames)
-      throws IOException {
-    return scheduleServerCrashProcedures(
-        serverNames.stream().map(ProtobufUtil::toServerName).collect(Collectors.toList()));
-  }
-
   List<Long> scheduleServerCrashProcedures(List<ServerName> serverNames) throws
IOException;
 
   List<Long> scheduleSCPsForUnknownServers() throws IOException;
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHbck.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHbck.java
index 9376a11..cc2c8f2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHbck.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHbck.java
@@ -67,7 +67,6 @@ import org.junit.runners.Parameterized.Parameters;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.hbase.thirdparty.com.google.common.io.Closeables;
-import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
 
 /**
  * Class to test HBaseHbck. Spins up the minicluster once at test start and then takes it
down
@@ -285,12 +284,12 @@ public class TestHbck {
     ServerName serverName = testRs.getServerName();
     Hbck hbck = getHbck();
     List<Long> pids =
-      hbck.scheduleServerCrashProcedure(Arrays.asList(ProtobufUtil.toServerName(serverName)));
+      hbck.scheduleServerCrashProcedures(Arrays.asList(serverName));
     assertTrue(pids.get(0) > 0);
     LOG.info("pid is {}", pids.get(0));
 
     List<Long> newPids =
-      hbck.scheduleServerCrashProcedure(Arrays.asList(ProtobufUtil.toServerName(serverName)));
+      hbck.scheduleServerCrashProcedures(Arrays.asList(serverName));
     assertTrue(newPids.get(0) < 0);
     LOG.info("pid is {}", newPids.get(0));
     waitOnPids(pids);

Mime
View raw message