public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public Builder mergeFrom(alluxio.grpc.ListStatusPOptions other) { if (other == alluxio.grpc.ListStatusPOptions.getDefaultInstance()) return this; if (other.hasLoadDirectChildren()) { setLoadDirectChildren(other.getLoadDirectChildren()); } if (other.hasLoadMetadataType()) { setLoadMetadataType(other.getLoadMetadataType()); } if (other.hasCommonOptions()) { mergeCommonOptions(other.getCommonOptions()); } if (other.hasRecursive()) { setRecursive(other.getRecursive()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(alluxio.grpc.ListStatusPOptions prototype) {
result = result && (hasLoadDirectChildren() == other.hasLoadDirectChildren()); if (hasLoadDirectChildren()) { result = result && (getLoadDirectChildren() == other.getLoadDirectChildren()); 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 && (hasRecursive() == other.hasRecursive()); if (hasRecursive()) { result = result && (getRecursive() == other.getRecursive());
/** * <code>optional .alluxio.grpc.file.ListStatusPOptions options = 2;</code> */ public Builder mergeOptions(alluxio.grpc.ListStatusPOptions value) { if (optionsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && options_ != null && options_ != alluxio.grpc.ListStatusPOptions.getDefaultInstance()) { options_ = alluxio.grpc.ListStatusPOptions.newBuilder(options_).mergeFrom(value).buildPartial(); } else { options_ = value; } onChanged(); } else { optionsBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>optional .alluxio.grpc.file.ListStatusPOptions options = 2;</code> */ public alluxio.grpc.ListStatusPOptions getOptions() { return options_ == null ? alluxio.grpc.ListStatusPOptions.getDefaultInstance() : options_; } /**
@Test public void listStatusOptionsDefaults() { ListStatusPOptions options = FileSystemMasterOptions.listStatusDefaults(); Assert.assertNotNull(options); Assert.assertEquals(LoadMetadataPType.ONCE, options.getLoadMetadataType()); Assert.assertEquals(false, options.getRecursive()); }
public alluxio.grpc.ListStatusPOptions buildPartial() { alluxio.grpc.ListStatusPOptions result = new alluxio.grpc.ListStatusPOptions(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.loadDirectChildren_ = loadDirectChildren_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.loadMetadataType_ = loadMetadataType_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } if (commonOptionsBuilder_ == null) { result.commonOptions_ = commonOptions_; } else { result.commonOptions_ = commonOptionsBuilder_.build(); } if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.recursive_ = recursive_; 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.ListStatusPRequest)) { return super.equals(obj); } alluxio.grpc.ListStatusPRequest other = (alluxio.grpc.ListStatusPRequest) 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; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasLoadDirectChildren()) { hash = (37 * hash) + LOADDIRECTCHILDREN_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getLoadDirectChildren()); } 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(); } if (hasRecursive()) { hash = (37 * hash) + RECURSIVE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getRecursive()); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <code>optional .alluxio.grpc.file.ListStatusPOptions options = 2;</code> */ public alluxio.grpc.ListStatusPOptionsOrBuilder getOptionsOrBuilder() { return options_ == null ? alluxio.grpc.ListStatusPOptions.getDefaultInstance() : options_; }
@Override protected void runPlainPath(AlluxioURI path, CommandLine cl) throws AlluxioException, IOException { ListStatusPOptions listOptions = ListStatusPOptions.newBuilder().setRecursive(true).build(); List<URIStatus> statuses = mFileSystem.listStatus(path, listOptions); if (statuses == null || statuses.size() == 0) { return; } getSizeInfo(path, statuses, cl.hasOption(READABLE_OPTION_NAME), cl.hasOption(SUMMARIZE_OPTION_NAME), cl.hasOption(MEMORY_OPTION_NAME)); }
public alluxio.grpc.ListStatusPOptions getDefaultInstanceForType() { return alluxio.grpc.ListStatusPOptions.getDefaultInstance(); }
public static Builder newBuilder(alluxio.grpc.ListStatusPOptions prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
/** * @return Master side defaults for {@link ListStatusPOptions} */ public static ListStatusPOptions listStatusDefaults() { return ListStatusPOptions.newBuilder() .setCommonOptions(commonDefaults()) .setLoadMetadataType(GrpcUtils.toProto(ServerConfiguration .getEnum(PropertyKey.USER_FILE_METADATA_LOAD_TYPE, LoadMetadataType.class))) .build(); }
/** * <code>optional .alluxio.grpc.file.ListStatusPOptions options = 2;</code> */ public alluxio.grpc.ListStatusPOptions getOptions() { if (optionsBuilder_ == null) { return options_ == null ? alluxio.grpc.ListStatusPOptions.getDefaultInstance() : options_; } else { return optionsBuilder_.getMessage(); } } /**
/** * @return the instance of {@link ListStatusContext} with default values for master */ public static ListStatusContext defaults() { ListStatusPOptions masterOptions = FileSystemMasterOptions.listStatusDefaults(); return new ListStatusContext(masterOptions.toBuilder()); }
private int countPaths() throws Exception { return 1 + mFileSystemMaster .listStatus(new AlluxioURI("/"), ListStatusContext.defaults(ListStatusPOptions.newBuilder().setRecursive(true))) .size(); }
/** * <code>optional .alluxio.grpc.file.ListStatusPOptions options = 2;</code> */ public alluxio.grpc.ListStatusPOptionsOrBuilder getOptionsOrBuilder() { if (optionsBuilder_ != null) { return optionsBuilder_.getMessageOrBuilder(); } else { return options_ == null ? alluxio.grpc.ListStatusPOptions.getDefaultInstance() : options_; } } /**
alluxio.grpc.ListStatusPOptions.Builder subBuilder = null; if (((bitField0_ & 0x00000002) == 0x00000002)) { subBuilder = options_.toBuilder();