HBASE-22708 Remove the deprecated methods in Hbck interface (#3362)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
GeorryHuang 2021-06-08 09:33:08 +08:00 committed by GitHub
parent 456c7f964a
commit 40a3d57628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 18 deletions

View File

@ -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;

View File

@ -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);