org.tikv.kvproto.DebugGrpc Maven / Gradle / Ivy
package org.tikv.kvproto;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
/**
*
* Debug service for TiKV.
* Errors are defined as follow:
* - OK: Okay, we are good!
* - UNKNOWN: For unknown error.
* - INVALID_ARGUMENT: Something goes wrong within requests.
* - NOT_FOUND: It is key or region not found, it's based on context, detailed
* reason can be found in grpc message.
* Note: It bypasses raft layer.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.4.0)",
comments = "Source: debugpb.proto")
public final class DebugGrpc {
private DebugGrpc() {}
public static final String SERVICE_NAME = "debugpb.Debug";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_GET =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "Get"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.GetRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.GetResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_RAFT_LOG =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "RaftLog"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.RaftLogRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.RaftLogResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_REGION_INFO =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "RegionInfo"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.RegionInfoRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.RegionInfoResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_REGION_SIZE =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "RegionSize"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.RegionSizeRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.RegionSizeResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_SCAN_MVCC =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "ScanMvcc"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.ScanMvccRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.ScanMvccResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_COMPACT =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "Compact"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.CompactRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.CompactResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_INJECT_FAIL_POINT =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "InjectFailPoint"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.InjectFailPointRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.InjectFailPointResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_RECOVER_FAIL_POINT =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "RecoverFailPoint"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.RecoverFailPointRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.RecoverFailPointResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_LIST_FAIL_POINTS =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "ListFailPoints"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.ListFailPointsRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.ListFailPointsResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_GET_METRICS =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "GetMetrics"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.GetMetricsRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.GetMetricsResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_CHECK_REGION_CONSISTENCY =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "CheckRegionConsistency"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.RegionConsistencyCheckRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.RegionConsistencyCheckResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_MODIFY_TIKV_CONFIG =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "ModifyTikvConfig"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.ModifyTikvConfigRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.ModifyTikvConfigResponse.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_GET_REGION_PROPERTIES =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"debugpb.Debug", "GetRegionProperties"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.GetRegionPropertiesRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.tikv.kvproto.Debugpb.GetRegionPropertiesResponse.getDefaultInstance()))
.build();
/**
* Creates a new async stub that supports all call types for the service
*/
public static DebugStub newStub(io.grpc.Channel channel) {
return new DebugStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static DebugBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new DebugBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static DebugFutureStub newFutureStub(
io.grpc.Channel channel) {
return new DebugFutureStub(channel);
}
/**
*
* Debug service for TiKV.
* Errors are defined as follow:
* - OK: Okay, we are good!
* - UNKNOWN: For unknown error.
* - INVALID_ARGUMENT: Something goes wrong within requests.
* - NOT_FOUND: It is key or region not found, it's based on context, detailed
* reason can be found in grpc message.
* Note: It bypasses raft layer.
*
*/
public static abstract class DebugImplBase implements io.grpc.BindableService {
/**
*
* Read a value arbitrarily for a key.
* Note: Server uses key directly w/o any encoding.
*
*/
public void get(org.tikv.kvproto.Debugpb.GetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_GET, responseObserver);
}
/**
*
* Read raft info.
*
*/
public void raftLog(org.tikv.kvproto.Debugpb.RaftLogRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_RAFT_LOG, responseObserver);
}
/**
*/
public void regionInfo(org.tikv.kvproto.Debugpb.RegionInfoRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_REGION_INFO, responseObserver);
}
/**
*
* Calculate size of a region.
* Note: DO NOT CALL IT IN PRODUCTION, it's really expensive.
*
*/
public void regionSize(org.tikv.kvproto.Debugpb.RegionSizeRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_REGION_SIZE, responseObserver);
}
/**
*
* Scan a specific range.
* Note: DO NOT CALL IT IN PRODUCTION, it's really expensive.
* Server uses keys directly w/o any encoding.
*
*/
public void scanMvcc(org.tikv.kvproto.Debugpb.ScanMvccRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_SCAN_MVCC, responseObserver);
}
/**
*
* Compact a column family in a specified range.
* Note: Server uses keys directly w/o any encoding.
*
*/
public void compact(org.tikv.kvproto.Debugpb.CompactRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_COMPACT, responseObserver);
}
/**
*
* Inject a fail point. Currently, it's only used in tests.
* Note: DO NOT CALL IT IN PRODUCTION.
*
*/
public void injectFailPoint(org.tikv.kvproto.Debugpb.InjectFailPointRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_INJECT_FAIL_POINT, responseObserver);
}
/**
*
* Recover from a fail point.
*
*/
public void recoverFailPoint(org.tikv.kvproto.Debugpb.RecoverFailPointRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_RECOVER_FAIL_POINT, responseObserver);
}
/**
*
* List all fail points.
*
*/
public void listFailPoints(org.tikv.kvproto.Debugpb.ListFailPointsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_LIST_FAIL_POINTS, responseObserver);
}
/**
*
* Get Metrics
*
*/
public void getMetrics(org.tikv.kvproto.Debugpb.GetMetricsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_GET_METRICS, responseObserver);
}
/**
*
* Do a consistent check for a region.
*
*/
public void checkRegionConsistency(org.tikv.kvproto.Debugpb.RegionConsistencyCheckRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_CHECK_REGION_CONSISTENCY, responseObserver);
}
/**
*
* dynamically modify tikv's config
*
*/
public void modifyTikvConfig(org.tikv.kvproto.Debugpb.ModifyTikvConfigRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_MODIFY_TIKV_CONFIG, responseObserver);
}
/**
*
* Get region properties
*
*/
public void getRegionProperties(org.tikv.kvproto.Debugpb.GetRegionPropertiesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_GET_REGION_PROPERTIES, responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_GET,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.GetRequest,
org.tikv.kvproto.Debugpb.GetResponse>(
this, METHODID_GET)))
.addMethod(
METHOD_RAFT_LOG,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.RaftLogRequest,
org.tikv.kvproto.Debugpb.RaftLogResponse>(
this, METHODID_RAFT_LOG)))
.addMethod(
METHOD_REGION_INFO,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.RegionInfoRequest,
org.tikv.kvproto.Debugpb.RegionInfoResponse>(
this, METHODID_REGION_INFO)))
.addMethod(
METHOD_REGION_SIZE,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.RegionSizeRequest,
org.tikv.kvproto.Debugpb.RegionSizeResponse>(
this, METHODID_REGION_SIZE)))
.addMethod(
METHOD_SCAN_MVCC,
asyncServerStreamingCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.ScanMvccRequest,
org.tikv.kvproto.Debugpb.ScanMvccResponse>(
this, METHODID_SCAN_MVCC)))
.addMethod(
METHOD_COMPACT,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.CompactRequest,
org.tikv.kvproto.Debugpb.CompactResponse>(
this, METHODID_COMPACT)))
.addMethod(
METHOD_INJECT_FAIL_POINT,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.InjectFailPointRequest,
org.tikv.kvproto.Debugpb.InjectFailPointResponse>(
this, METHODID_INJECT_FAIL_POINT)))
.addMethod(
METHOD_RECOVER_FAIL_POINT,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.RecoverFailPointRequest,
org.tikv.kvproto.Debugpb.RecoverFailPointResponse>(
this, METHODID_RECOVER_FAIL_POINT)))
.addMethod(
METHOD_LIST_FAIL_POINTS,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.ListFailPointsRequest,
org.tikv.kvproto.Debugpb.ListFailPointsResponse>(
this, METHODID_LIST_FAIL_POINTS)))
.addMethod(
METHOD_GET_METRICS,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.GetMetricsRequest,
org.tikv.kvproto.Debugpb.GetMetricsResponse>(
this, METHODID_GET_METRICS)))
.addMethod(
METHOD_CHECK_REGION_CONSISTENCY,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.RegionConsistencyCheckRequest,
org.tikv.kvproto.Debugpb.RegionConsistencyCheckResponse>(
this, METHODID_CHECK_REGION_CONSISTENCY)))
.addMethod(
METHOD_MODIFY_TIKV_CONFIG,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.ModifyTikvConfigRequest,
org.tikv.kvproto.Debugpb.ModifyTikvConfigResponse>(
this, METHODID_MODIFY_TIKV_CONFIG)))
.addMethod(
METHOD_GET_REGION_PROPERTIES,
asyncUnaryCall(
new MethodHandlers<
org.tikv.kvproto.Debugpb.GetRegionPropertiesRequest,
org.tikv.kvproto.Debugpb.GetRegionPropertiesResponse>(
this, METHODID_GET_REGION_PROPERTIES)))
.build();
}
}
/**
*
* Debug service for TiKV.
* Errors are defined as follow:
* - OK: Okay, we are good!
* - UNKNOWN: For unknown error.
* - INVALID_ARGUMENT: Something goes wrong within requests.
* - NOT_FOUND: It is key or region not found, it's based on context, detailed
* reason can be found in grpc message.
* Note: It bypasses raft layer.
*
*/
public static final class DebugStub extends io.grpc.stub.AbstractStub {
private DebugStub(io.grpc.Channel channel) {
super(channel);
}
private DebugStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DebugStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new DebugStub(channel, callOptions);
}
/**
*
* Read a value arbitrarily for a key.
* Note: Server uses key directly w/o any encoding.
*
*/
public void get(org.tikv.kvproto.Debugpb.GetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_GET, getCallOptions()), request, responseObserver);
}
/**
*
* Read raft info.
*
*/
public void raftLog(org.tikv.kvproto.Debugpb.RaftLogRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_RAFT_LOG, getCallOptions()), request, responseObserver);
}
/**
*/
public void regionInfo(org.tikv.kvproto.Debugpb.RegionInfoRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_REGION_INFO, getCallOptions()), request, responseObserver);
}
/**
*
* Calculate size of a region.
* Note: DO NOT CALL IT IN PRODUCTION, it's really expensive.
*
*/
public void regionSize(org.tikv.kvproto.Debugpb.RegionSizeRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_REGION_SIZE, getCallOptions()), request, responseObserver);
}
/**
*
* Scan a specific range.
* Note: DO NOT CALL IT IN PRODUCTION, it's really expensive.
* Server uses keys directly w/o any encoding.
*
*/
public void scanMvcc(org.tikv.kvproto.Debugpb.ScanMvccRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncServerStreamingCall(
getChannel().newCall(METHOD_SCAN_MVCC, getCallOptions()), request, responseObserver);
}
/**
*
* Compact a column family in a specified range.
* Note: Server uses keys directly w/o any encoding.
*
*/
public void compact(org.tikv.kvproto.Debugpb.CompactRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_COMPACT, getCallOptions()), request, responseObserver);
}
/**
*
* Inject a fail point. Currently, it's only used in tests.
* Note: DO NOT CALL IT IN PRODUCTION.
*
*/
public void injectFailPoint(org.tikv.kvproto.Debugpb.InjectFailPointRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_INJECT_FAIL_POINT, getCallOptions()), request, responseObserver);
}
/**
*
* Recover from a fail point.
*
*/
public void recoverFailPoint(org.tikv.kvproto.Debugpb.RecoverFailPointRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_RECOVER_FAIL_POINT, getCallOptions()), request, responseObserver);
}
/**
*
* List all fail points.
*
*/
public void listFailPoints(org.tikv.kvproto.Debugpb.ListFailPointsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_LIST_FAIL_POINTS, getCallOptions()), request, responseObserver);
}
/**
*
* Get Metrics
*
*/
public void getMetrics(org.tikv.kvproto.Debugpb.GetMetricsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_GET_METRICS, getCallOptions()), request, responseObserver);
}
/**
*
* Do a consistent check for a region.
*
*/
public void checkRegionConsistency(org.tikv.kvproto.Debugpb.RegionConsistencyCheckRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_CHECK_REGION_CONSISTENCY, getCallOptions()), request, responseObserver);
}
/**
*
* dynamically modify tikv's config
*
*/
public void modifyTikvConfig(org.tikv.kvproto.Debugpb.ModifyTikvConfigRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_MODIFY_TIKV_CONFIG, getCallOptions()), request, responseObserver);
}
/**
*
* Get region properties
*
*/
public void getRegionProperties(org.tikv.kvproto.Debugpb.GetRegionPropertiesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_GET_REGION_PROPERTIES, getCallOptions()), request, responseObserver);
}
}
/**
*
* Debug service for TiKV.
* Errors are defined as follow:
* - OK: Okay, we are good!
* - UNKNOWN: For unknown error.
* - INVALID_ARGUMENT: Something goes wrong within requests.
* - NOT_FOUND: It is key or region not found, it's based on context, detailed
* reason can be found in grpc message.
* Note: It bypasses raft layer.
*
*/
public static final class DebugBlockingStub extends io.grpc.stub.AbstractStub {
private DebugBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private DebugBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DebugBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new DebugBlockingStub(channel, callOptions);
}
/**
*
* Read a value arbitrarily for a key.
* Note: Server uses key directly w/o any encoding.
*
*/
public org.tikv.kvproto.Debugpb.GetResponse get(org.tikv.kvproto.Debugpb.GetRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_GET, getCallOptions(), request);
}
/**
*
* Read raft info.
*
*/
public org.tikv.kvproto.Debugpb.RaftLogResponse raftLog(org.tikv.kvproto.Debugpb.RaftLogRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_RAFT_LOG, getCallOptions(), request);
}
/**
*/
public org.tikv.kvproto.Debugpb.RegionInfoResponse regionInfo(org.tikv.kvproto.Debugpb.RegionInfoRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_REGION_INFO, getCallOptions(), request);
}
/**
*
* Calculate size of a region.
* Note: DO NOT CALL IT IN PRODUCTION, it's really expensive.
*
*/
public org.tikv.kvproto.Debugpb.RegionSizeResponse regionSize(org.tikv.kvproto.Debugpb.RegionSizeRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_REGION_SIZE, getCallOptions(), request);
}
/**
*
* Scan a specific range.
* Note: DO NOT CALL IT IN PRODUCTION, it's really expensive.
* Server uses keys directly w/o any encoding.
*
*/
public java.util.Iterator scanMvcc(
org.tikv.kvproto.Debugpb.ScanMvccRequest request) {
return blockingServerStreamingCall(
getChannel(), METHOD_SCAN_MVCC, getCallOptions(), request);
}
/**
*
* Compact a column family in a specified range.
* Note: Server uses keys directly w/o any encoding.
*
*/
public org.tikv.kvproto.Debugpb.CompactResponse compact(org.tikv.kvproto.Debugpb.CompactRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_COMPACT, getCallOptions(), request);
}
/**
*
* Inject a fail point. Currently, it's only used in tests.
* Note: DO NOT CALL IT IN PRODUCTION.
*
*/
public org.tikv.kvproto.Debugpb.InjectFailPointResponse injectFailPoint(org.tikv.kvproto.Debugpb.InjectFailPointRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_INJECT_FAIL_POINT, getCallOptions(), request);
}
/**
*
* Recover from a fail point.
*
*/
public org.tikv.kvproto.Debugpb.RecoverFailPointResponse recoverFailPoint(org.tikv.kvproto.Debugpb.RecoverFailPointRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_RECOVER_FAIL_POINT, getCallOptions(), request);
}
/**
*
* List all fail points.
*
*/
public org.tikv.kvproto.Debugpb.ListFailPointsResponse listFailPoints(org.tikv.kvproto.Debugpb.ListFailPointsRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_LIST_FAIL_POINTS, getCallOptions(), request);
}
/**
*
* Get Metrics
*
*/
public org.tikv.kvproto.Debugpb.GetMetricsResponse getMetrics(org.tikv.kvproto.Debugpb.GetMetricsRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_GET_METRICS, getCallOptions(), request);
}
/**
*
* Do a consistent check for a region.
*
*/
public org.tikv.kvproto.Debugpb.RegionConsistencyCheckResponse checkRegionConsistency(org.tikv.kvproto.Debugpb.RegionConsistencyCheckRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_CHECK_REGION_CONSISTENCY, getCallOptions(), request);
}
/**
*
* dynamically modify tikv's config
*
*/
public org.tikv.kvproto.Debugpb.ModifyTikvConfigResponse modifyTikvConfig(org.tikv.kvproto.Debugpb.ModifyTikvConfigRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_MODIFY_TIKV_CONFIG, getCallOptions(), request);
}
/**
*
* Get region properties
*
*/
public org.tikv.kvproto.Debugpb.GetRegionPropertiesResponse getRegionProperties(org.tikv.kvproto.Debugpb.GetRegionPropertiesRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_GET_REGION_PROPERTIES, getCallOptions(), request);
}
}
/**
*
* Debug service for TiKV.
* Errors are defined as follow:
* - OK: Okay, we are good!
* - UNKNOWN: For unknown error.
* - INVALID_ARGUMENT: Something goes wrong within requests.
* - NOT_FOUND: It is key or region not found, it's based on context, detailed
* reason can be found in grpc message.
* Note: It bypasses raft layer.
*
*/
public static final class DebugFutureStub extends io.grpc.stub.AbstractStub {
private DebugFutureStub(io.grpc.Channel channel) {
super(channel);
}
private DebugFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DebugFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new DebugFutureStub(channel, callOptions);
}
/**
*
* Read a value arbitrarily for a key.
* Note: Server uses key directly w/o any encoding.
*
*/
public com.google.common.util.concurrent.ListenableFuture get(
org.tikv.kvproto.Debugpb.GetRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_GET, getCallOptions()), request);
}
/**
*
* Read raft info.
*
*/
public com.google.common.util.concurrent.ListenableFuture raftLog(
org.tikv.kvproto.Debugpb.RaftLogRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_RAFT_LOG, getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture regionInfo(
org.tikv.kvproto.Debugpb.RegionInfoRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_REGION_INFO, getCallOptions()), request);
}
/**
*
* Calculate size of a region.
* Note: DO NOT CALL IT IN PRODUCTION, it's really expensive.
*
*/
public com.google.common.util.concurrent.ListenableFuture regionSize(
org.tikv.kvproto.Debugpb.RegionSizeRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_REGION_SIZE, getCallOptions()), request);
}
/**
*
* Compact a column family in a specified range.
* Note: Server uses keys directly w/o any encoding.
*
*/
public com.google.common.util.concurrent.ListenableFuture compact(
org.tikv.kvproto.Debugpb.CompactRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_COMPACT, getCallOptions()), request);
}
/**
*
* Inject a fail point. Currently, it's only used in tests.
* Note: DO NOT CALL IT IN PRODUCTION.
*
*/
public com.google.common.util.concurrent.ListenableFuture injectFailPoint(
org.tikv.kvproto.Debugpb.InjectFailPointRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_INJECT_FAIL_POINT, getCallOptions()), request);
}
/**
*
* Recover from a fail point.
*
*/
public com.google.common.util.concurrent.ListenableFuture recoverFailPoint(
org.tikv.kvproto.Debugpb.RecoverFailPointRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_RECOVER_FAIL_POINT, getCallOptions()), request);
}
/**
*
* List all fail points.
*
*/
public com.google.common.util.concurrent.ListenableFuture listFailPoints(
org.tikv.kvproto.Debugpb.ListFailPointsRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_LIST_FAIL_POINTS, getCallOptions()), request);
}
/**
*
* Get Metrics
*
*/
public com.google.common.util.concurrent.ListenableFuture getMetrics(
org.tikv.kvproto.Debugpb.GetMetricsRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_GET_METRICS, getCallOptions()), request);
}
/**
*
* Do a consistent check for a region.
*
*/
public com.google.common.util.concurrent.ListenableFuture checkRegionConsistency(
org.tikv.kvproto.Debugpb.RegionConsistencyCheckRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_CHECK_REGION_CONSISTENCY, getCallOptions()), request);
}
/**
*
* dynamically modify tikv's config
*
*/
public com.google.common.util.concurrent.ListenableFuture modifyTikvConfig(
org.tikv.kvproto.Debugpb.ModifyTikvConfigRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_MODIFY_TIKV_CONFIG, getCallOptions()), request);
}
/**
*
* Get region properties
*
*/
public com.google.common.util.concurrent.ListenableFuture getRegionProperties(
org.tikv.kvproto.Debugpb.GetRegionPropertiesRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_GET_REGION_PROPERTIES, getCallOptions()), request);
}
}
private static final int METHODID_GET = 0;
private static final int METHODID_RAFT_LOG = 1;
private static final int METHODID_REGION_INFO = 2;
private static final int METHODID_REGION_SIZE = 3;
private static final int METHODID_SCAN_MVCC = 4;
private static final int METHODID_COMPACT = 5;
private static final int METHODID_INJECT_FAIL_POINT = 6;
private static final int METHODID_RECOVER_FAIL_POINT = 7;
private static final int METHODID_LIST_FAIL_POINTS = 8;
private static final int METHODID_GET_METRICS = 9;
private static final int METHODID_CHECK_REGION_CONSISTENCY = 10;
private static final int METHODID_MODIFY_TIKV_CONFIG = 11;
private static final int METHODID_GET_REGION_PROPERTIES = 12;
private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final DebugImplBase serviceImpl;
private final int methodId;
MethodHandlers(DebugImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_GET:
serviceImpl.get((org.tikv.kvproto.Debugpb.GetRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_RAFT_LOG:
serviceImpl.raftLog((org.tikv.kvproto.Debugpb.RaftLogRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_REGION_INFO:
serviceImpl.regionInfo((org.tikv.kvproto.Debugpb.RegionInfoRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_REGION_SIZE:
serviceImpl.regionSize((org.tikv.kvproto.Debugpb.RegionSizeRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_SCAN_MVCC:
serviceImpl.scanMvcc((org.tikv.kvproto.Debugpb.ScanMvccRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_COMPACT:
serviceImpl.compact((org.tikv.kvproto.Debugpb.CompactRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_INJECT_FAIL_POINT:
serviceImpl.injectFailPoint((org.tikv.kvproto.Debugpb.InjectFailPointRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_RECOVER_FAIL_POINT:
serviceImpl.recoverFailPoint((org.tikv.kvproto.Debugpb.RecoverFailPointRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LIST_FAIL_POINTS:
serviceImpl.listFailPoints((org.tikv.kvproto.Debugpb.ListFailPointsRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_METRICS:
serviceImpl.getMetrics((org.tikv.kvproto.Debugpb.GetMetricsRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CHECK_REGION_CONSISTENCY:
serviceImpl.checkRegionConsistency((org.tikv.kvproto.Debugpb.RegionConsistencyCheckRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_MODIFY_TIKV_CONFIG:
serviceImpl.modifyTikvConfig((org.tikv.kvproto.Debugpb.ModifyTikvConfigRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_REGION_PROPERTIES:
serviceImpl.getRegionProperties((org.tikv.kvproto.Debugpb.GetRegionPropertiesRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private static final class DebugDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return org.tikv.kvproto.Debugpb.getDescriptor();
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (DebugGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new DebugDescriptorSupplier())
.addMethod(METHOD_GET)
.addMethod(METHOD_RAFT_LOG)
.addMethod(METHOD_REGION_INFO)
.addMethod(METHOD_REGION_SIZE)
.addMethod(METHOD_SCAN_MVCC)
.addMethod(METHOD_COMPACT)
.addMethod(METHOD_INJECT_FAIL_POINT)
.addMethod(METHOD_RECOVER_FAIL_POINT)
.addMethod(METHOD_LIST_FAIL_POINTS)
.addMethod(METHOD_GET_METRICS)
.addMethod(METHOD_CHECK_REGION_CONSISTENCY)
.addMethod(METHOD_MODIFY_TIKV_CONFIG)
.addMethod(METHOD_GET_REGION_PROPERTIES)
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy