public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public Builder mergeFrom(alluxio.grpc.GetStatusPOptions other) { if (other == alluxio.grpc.GetStatusPOptions.getDefaultInstance()) return this; if (other.hasLoadMetadataType()) { setLoadMetadataType(other.getLoadMetadataType()); } if (other.hasCommonOptions()) { mergeCommonOptions(other.getCommonOptions()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(alluxio.grpc.GetStatusPOptions prototype) {
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof alluxio.grpc.GetStatusPOptions)) { return super.equals(obj); } alluxio.grpc.GetStatusPOptions other = (alluxio.grpc.GetStatusPOptions) obj; boolean result = true; result = result && (hasLoadMetadataType() == other.hasLoadMetadataType()); if (hasLoadMetadataType()) { result = result && loadMetadataType_ == other.loadMetadataType_; } result = result && (hasCommonOptions() == other.hasCommonOptions()); if (hasCommonOptions()) { result = result && getCommonOptions() .equals(other.getCommonOptions()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasLoadMetadataType()) { hash = (37 * hash) + LOADMETADATATYPE_FIELD_NUMBER; hash = (53 * hash) + loadMetadataType_; } if (hasCommonOptions()) { hash = (37 * hash) + COMMONOPTIONS_FIELD_NUMBER; hash = (53 * hash) + getCommonOptions().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <code>optional .alluxio.grpc.file.GetStatusPOptions options = 2;</code> */ public Builder mergeOptions(alluxio.grpc.GetStatusPOptions value) { if (optionsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && options_ != null && options_ != alluxio.grpc.GetStatusPOptions.getDefaultInstance()) { options_ = alluxio.grpc.GetStatusPOptions.newBuilder(options_).mergeFrom(value).buildPartial(); } else { options_ = value; } onChanged(); } else { optionsBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>optional .alluxio.grpc.file.GetStatusPOptions options = 2;</code> */ public alluxio.grpc.GetStatusPOptionsOrBuilder getOptionsOrBuilder() { return options_ == null ? alluxio.grpc.GetStatusPOptions.getDefaultInstance() : options_; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeEnum(1, loadMetadataType_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, getCommonOptions()); } unknownFields.writeTo(output); }
public alluxio.grpc.GetStatusPOptions buildPartial() { alluxio.grpc.GetStatusPOptions result = new alluxio.grpc.GetStatusPOptions(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.loadMetadataType_ = loadMetadataType_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } if (commonOptionsBuilder_ == null) { result.commonOptions_ = commonOptions_; } else { result.commonOptions_ = commonOptionsBuilder_.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.GetStatusPRequest)) { return super.equals(obj); } alluxio.grpc.GetStatusPRequest other = (alluxio.grpc.GetStatusPRequest) obj; boolean result = true; result = result && (hasPath() == other.hasPath()); if (hasPath()) { result = result && getPath() .equals(other.getPath()); } result = result && (hasOptions() == other.hasOptions()); if (hasOptions()) { result = result && getOptions() .equals(other.getOptions()); } result = result && unknownFields.equals(other.unknownFields); return result; }
/** * <code>optional .alluxio.grpc.file.GetStatusPOptions options = 2;</code> */ public alluxio.grpc.GetStatusPOptions getOptions() { return options_ == null ? alluxio.grpc.GetStatusPOptions.getDefaultInstance() : options_; } /**
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, loadMetadataType_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getCommonOptions()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
/** * @return Master side defaults for {@link GetStatusPOptions} */ public static GetStatusPOptions getStatusDefaults() { return GetStatusPOptions.newBuilder() .setCommonOptions(commonDefaults()) .setLoadMetadataType(GrpcUtils.toProto(ServerConfiguration .getEnum(PropertyKey.USER_FILE_METADATA_LOAD_TYPE, LoadMetadataType.class))) .build(); }
public alluxio.grpc.GetStatusPOptions getDefaultInstanceForType() { return alluxio.grpc.GetStatusPOptions.getDefaultInstance(); }
public static Builder newBuilder(alluxio.grpc.GetStatusPOptions prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
/** * Converts from proto type to options. * * @param existsOptions the proto options to convert * @return the converted proto options */ public static GetStatusPOptions toGetStatusOptions(ExistsPOptions existsOptions) { GetStatusPOptions.Builder getStatusOptionsBuilder = GetStatusPOptions.newBuilder(); if (existsOptions.hasCommonOptions()) { getStatusOptionsBuilder.setCommonOptions(existsOptions.getCommonOptions()); } if (existsOptions.hasLoadMetadataType()) { getStatusOptionsBuilder.setLoadMetadataType(existsOptions.getLoadMetadataType()); } return getStatusOptionsBuilder.build(); }
/** * <code>optional .alluxio.grpc.file.GetStatusPOptions options = 2;</code> */ public alluxio.grpc.GetStatusPOptionsOrBuilder getOptionsOrBuilder() { if (optionsBuilder_ != null) { return optionsBuilder_.getMessageOrBuilder(); } else { return options_ == null ? alluxio.grpc.GetStatusPOptions.getDefaultInstance() : options_; } } /**
/** * @return the instance of {@link GetStatusContext} with default values for master */ public static GetStatusContext defaults() { GetStatusPOptions masterOptions = FileSystemMasterOptions.getStatusDefaults(); return new GetStatusContext(masterOptions.toBuilder()); }
/** * Tests the creation of a file via the * {@link BaseFileSystem#createFile(AlluxioURI, CreateFilePOptions)} method. */ @Test public void createFile() throws Exception { doNothing().when(mFileSystemMasterClient) .createFile(any(AlluxioURI.class), any(CreateFilePOptions.class)); URIStatus status = new URIStatus(new FileInfo()); AlluxioURI file = new AlluxioURI("/file"); GetStatusPOptions getStatusOptions = GetStatusPOptions.newBuilder().setLoadMetadataType(LoadMetadataPType.NEVER).build(); when(mFileSystemMasterClient.getStatus(file, getStatusOptions)).thenReturn(status); FileOutStream out = mFileSystem.createFile(file, CreateFilePOptions.getDefaultInstance()); verify(mFileSystemMasterClient).createFile(file, CreateFilePOptions.getDefaultInstance()); assertEquals(out.mUri, file); verifyFilesystemContextAcquiredAndReleased(); }
/** * <code>optional .alluxio.grpc.file.GetStatusPOptions options = 2;</code> */ public alluxio.grpc.GetStatusPOptions getOptions() { if (optionsBuilder_ == null) { return options_ == null ? alluxio.grpc.GetStatusPOptions.getDefaultInstance() : options_; } else { return optionsBuilder_.getMessage(); } } /**