public Builder mergeFrom(alluxio.grpc.GetServiceVersionPRequest other) { if (other == alluxio.grpc.GetServiceVersionPRequest.getDefaultInstance()) return this; if (other.hasServiceType()) { setServiceType(other.getServiceType()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public alluxio.grpc.GetServiceVersionPRequest buildPartial() { alluxio.grpc.GetServiceVersionPRequest result = new alluxio.grpc.GetServiceVersionPRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.serviceType_ = serviceType_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasServiceType()) { hash = (37 * hash) + SERVICETYPE_FIELD_NUMBER; hash = (53 * hash) + serviceType_; } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
break; default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
StreamObserver<GetServiceVersionPResponse> responseObserver) { ServiceType serviceType = request.getServiceType(); if (serviceType != ServiceType.UNKNOWN_SERVICE && !mServices.contains(serviceType)) { responseObserver.onError(Status.NOT_FOUND.asException());
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(alluxio.grpc.GetServiceVersionPRequest prototype) {
public alluxio.grpc.GetServiceVersionPRequest getDefaultInstanceForType() { return alluxio.grpc.GetServiceVersionPRequest.getDefaultInstance(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof alluxio.grpc.GetServiceVersionPRequest)) { return super.equals(obj); } alluxio.grpc.GetServiceVersionPRequest other = (alluxio.grpc.GetServiceVersionPRequest) obj; boolean result = true; result = result && (hasServiceType() == other.hasServiceType()); if (hasServiceType()) { result = result && serviceType_ == other.serviceType_; } result = result && unknownFields.equals(other.unknownFields); return result; }
public alluxio.grpc.GetServiceVersionPRequest build() { alluxio.grpc.GetServiceVersionPRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public static Builder newBuilder(alluxio.grpc.GetServiceVersionPRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
@io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "getServiceVersion", requestType = alluxio.grpc.GetServiceVersionPRequest.class, responseType = alluxio.grpc.GetServiceVersionPResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<alluxio.grpc.GetServiceVersionPRequest, alluxio.grpc.GetServiceVersionPResponse> getGetServiceVersionMethod() { io.grpc.MethodDescriptor<alluxio.grpc.GetServiceVersionPRequest, alluxio.grpc.GetServiceVersionPResponse> getGetServiceVersionMethod; if ((getGetServiceVersionMethod = ServiceVersionClientServiceGrpc.getGetServiceVersionMethod) == null) { synchronized (ServiceVersionClientServiceGrpc.class) { if ((getGetServiceVersionMethod = ServiceVersionClientServiceGrpc.getGetServiceVersionMethod) == null) { ServiceVersionClientServiceGrpc.getGetServiceVersionMethod = getGetServiceVersionMethod = io.grpc.MethodDescriptor.<alluxio.grpc.GetServiceVersionPRequest, alluxio.grpc.GetServiceVersionPResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "alluxio.grpc.version.ServiceVersionClientService", "getServiceVersion")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( alluxio.grpc.GetServiceVersionPRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( alluxio.grpc.GetServiceVersionPResponse.getDefaultInstance())) .setSchemaDescriptor(new ServiceVersionClientServiceMethodDescriptorSupplier("getServiceVersion")) .build(); } } } return getGetServiceVersionMethod; }
public Long call() { return mVersionService.getServiceVersion( GetServiceVersionPRequest.newBuilder().setServiceType(getRemoteServiceType()).build()) .getVersion(); } });
/** * Test if the input address is serving an Alluxio service. This method make use of the * gRPC protocol for performing service communication. * * @param address the network address to ping * @param serviceType the Alluxio service type * @param conf Alluxio configuration * @throws UnauthenticatedException If the user is not authenticated * @throws StatusRuntimeException If the host not reachable or does not serve the given service */ public static void pingService(InetSocketAddress address, alluxio.grpc.ServiceType serviceType, AlluxioConfiguration conf) throws UnauthenticatedException, UnavailableException { Preconditions.checkNotNull(address, "address"); Preconditions.checkNotNull(serviceType, "serviceType"); GrpcChannel channel = GrpcChannelBuilder.newBuilder(address, conf).build(); ServiceVersionClientServiceGrpc.ServiceVersionClientServiceBlockingStub versionClient = ServiceVersionClientServiceGrpc.newBlockingStub(channel); versionClient.getServiceVersion( GetServiceVersionPRequest.newBuilder().setServiceType(serviceType).build()); channel.shutdown(); } }
private void pingMetaService(InetSocketAddress address) throws UnauthenticatedException, UnavailableException { GrpcChannel channel = GrpcChannelBuilder.newBuilder(address, mConfiguration).build(); ServiceVersionClientServiceGrpc.ServiceVersionClientServiceBlockingStub versionClient = ServiceVersionClientServiceGrpc.newBlockingStub(channel); versionClient.getServiceVersion(GetServiceVersionPRequest.newBuilder() .setServiceType(ServiceType.META_MASTER_CLIENT_SERVICE).build()); channel.shutdown(); }