Revert "HBASE-22673 Avoid to expose protobuf stuff in Hbck interface"
This reverts commit 2449d9c05d
.
This commit is contained in:
parent
2449d9c05d
commit
8c94bd47b2
|
@ -23,10 +23,10 @@ import java.util.concurrent.Callable;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hbase.ServerName;
|
||||
import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
|
||||
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
|
||||
import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
|
||||
import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;
|
||||
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos;
|
||||
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableStateResponse;
|
||||
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.HbckService.BlockingInterface;
|
||||
|
@ -157,7 +157,7 @@ public class HBaseHbck implements Hbck {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<Long> scheduleServerCrashProcedures(List<ServerName> serverNames)
|
||||
public List<Long> scheduleServerCrashProcedure(List<HBaseProtos.ServerName> serverNames)
|
||||
throws IOException {
|
||||
try {
|
||||
MasterProtos.ScheduleServerCrashProcedureResponse response =
|
||||
|
|
|
@ -20,15 +20,11 @@ package org.apache.hadoop.hbase.client;
|
|||
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.yetus.audience.InterfaceAudience;
|
||||
|
||||
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
|
||||
import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;
|
||||
|
||||
/**
|
||||
|
@ -108,16 +104,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> scheduleServerCrashProcedure(List<HBaseProtos.ServerName> serverNames)
|
||||
throws IOException;
|
||||
}
|
||||
|
|
|
@ -1898,11 +1898,10 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
public static MasterProtos.ScheduleServerCrashProcedureRequest
|
||||
toScheduleServerCrashProcedureRequest(List<ServerName> serverNames) {
|
||||
MasterProtos.ScheduleServerCrashProcedureRequest.Builder builder =
|
||||
toScheduleServerCrashProcedureRequest(List<HBaseProtos.ServerName> serverNames) {
|
||||
MasterProtos.ScheduleServerCrashProcedureRequest.Builder b =
|
||||
MasterProtos.ScheduleServerCrashProcedureRequest.newBuilder();
|
||||
serverNames.stream().map(ProtobufUtil::toServerName).forEach(sn -> builder.addServerName(sn));
|
||||
return builder.build();
|
||||
return b.addAllServerName(serverNames).build();
|
||||
}
|
||||
|
||||
private static List<RegionSpecifier> toEncodedRegionNameRegionSpecifiers(
|
||||
|
|
Loading…
Reference in New Issue