@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasFileInfo()) { hash = (37 * hash) + FILEINFO_FIELD_NUMBER; hash = (53 * hash) + getFileInfo().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public alluxio.grpc.GetFileInfoPResponse buildPartial() { alluxio.grpc.GetFileInfoPResponse result = new alluxio.grpc.GetFileInfoPResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (fileInfoBuilder_ == null) { result.fileInfo_ = fileInfo_; } else { result.fileInfo_ = fileInfoBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof alluxio.grpc.GetFileInfoPResponse)) { return super.equals(obj); } alluxio.grpc.GetFileInfoPResponse other = (alluxio.grpc.GetFileInfoPResponse) obj; boolean result = true; result = result && (hasFileInfo() == other.hasFileInfo()); if (hasFileInfo()) { result = result && getFileInfo() .equals(other.getFileInfo()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(alluxio.grpc.GetFileInfoPResponse other) { if (other == alluxio.grpc.GetFileInfoPResponse.getDefaultInstance()) return this; if (other.hasFileInfo()) { mergeFileInfo(other.getFileInfo()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getFileInfo()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
break; default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
public alluxio.grpc.GetFileInfoPResponse getDefaultInstanceForType() { return alluxio.grpc.GetFileInfoPResponse.getDefaultInstance(); }
public alluxio.grpc.GetFileInfoPResponse build() { alluxio.grpc.GetFileInfoPResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeMessage(1, getFileInfo()); } unknownFields.writeTo(output); }
@io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetFileInfo", requestType = alluxio.grpc.GetFileInfoPRequest.class, responseType = alluxio.grpc.GetFileInfoPResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<alluxio.grpc.GetFileInfoPRequest, alluxio.grpc.GetFileInfoPResponse> getGetFileInfoMethod() { io.grpc.MethodDescriptor<alluxio.grpc.GetFileInfoPRequest, alluxio.grpc.GetFileInfoPResponse> getGetFileInfoMethod; if ((getGetFileInfoMethod = FileSystemMasterJobServiceGrpc.getGetFileInfoMethod) == null) { synchronized (FileSystemMasterJobServiceGrpc.class) { if ((getGetFileInfoMethod = FileSystemMasterJobServiceGrpc.getGetFileInfoMethod) == null) { FileSystemMasterJobServiceGrpc.getGetFileInfoMethod = getGetFileInfoMethod = io.grpc.MethodDescriptor.<alluxio.grpc.GetFileInfoPRequest, alluxio.grpc.GetFileInfoPResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "alluxio.grpc.file.FileSystemMasterJobService", "GetFileInfo")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( alluxio.grpc.GetFileInfoPRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( alluxio.grpc.GetFileInfoPResponse.getDefaultInstance())) .setSchemaDescriptor(new FileSystemMasterJobServiceMethodDescriptorSupplier("GetFileInfo")) .build(); } } } return getGetFileInfoMethod; }
/** * @param fileId the id of the file for which to get the {@link FileInfo} * @return the file info for the given file id */ public FileInfo getFileInfo(final long fileId) throws IOException { return retryRPC(() -> GrpcUtils.fromProto(mClient .getFileInfo(GetFileInfoPRequest.newBuilder().setFileId(fileId).build()).getFileInfo())); }
@Override public void getFileInfo(GetFileInfoPRequest request, StreamObserver<GetFileInfoPResponse> responseObserver) { final long fileId = request.getFileId(); GetFileInfoPOptions options = request.getOptions(); RpcUtils.call(LOG, (RpcUtils.RpcCallableThrowsIOException<GetFileInfoPResponse>) () -> GetFileInfoPResponse .newBuilder().setFileInfo(GrpcUtils.toProto(mFileSystemMaster.getFileInfo(fileId))) .build(), "getFileInfo", "fileId=%s, options=%s", responseObserver, fileId, options); }
@io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetFileInfo", requestType = alluxio.grpc.GetFileInfoPRequest.class, responseType = alluxio.grpc.GetFileInfoPResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<alluxio.grpc.GetFileInfoPRequest, alluxio.grpc.GetFileInfoPResponse> getGetFileInfoMethod() { io.grpc.MethodDescriptor<alluxio.grpc.GetFileInfoPRequest, alluxio.grpc.GetFileInfoPResponse> getGetFileInfoMethod; if ((getGetFileInfoMethod = FileSystemMasterWorkerServiceGrpc.getGetFileInfoMethod) == null) { synchronized (FileSystemMasterWorkerServiceGrpc.class) { if ((getGetFileInfoMethod = FileSystemMasterWorkerServiceGrpc.getGetFileInfoMethod) == null) { FileSystemMasterWorkerServiceGrpc.getGetFileInfoMethod = getGetFileInfoMethod = io.grpc.MethodDescriptor.<alluxio.grpc.GetFileInfoPRequest, alluxio.grpc.GetFileInfoPResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "alluxio.grpc.file.FileSystemMasterWorkerService", "GetFileInfo")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( alluxio.grpc.GetFileInfoPRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( alluxio.grpc.GetFileInfoPResponse.getDefaultInstance())) .setSchemaDescriptor(new FileSystemMasterWorkerServiceMethodDescriptorSupplier("GetFileInfo")) .build(); } } } return getGetFileInfoMethod; }
/** * @param fileId the id of the file for which to get the {@link FileInfo} * @return the file info for the given file id */ public FileInfo getFileInfo(final long fileId) throws IOException { return retryRPC(() -> GrpcUtils.fromProto(mClient .getFileInfo(GetFileInfoPRequest.newBuilder().setFileId(fileId).build()).getFileInfo())); }
@Override public void getFileInfo(GetFileInfoPRequest request, StreamObserver<GetFileInfoPResponse> responseObserver) { final long fileId = request.getFileId(); GetFileInfoPOptions options = request.getOptions(); RpcUtils.call(LOG, (RpcUtils.RpcCallableThrowsIOException<GetFileInfoPResponse>) () -> GetFileInfoPResponse .newBuilder().setFileInfo(GrpcUtils.toProto(mFileSystemMaster.getFileInfo(fileId))) .build(), "getFileInfo", "fileId=%s, options=%s", responseObserver, fileId, options); }