@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof alluxio.proto.journal.File.StringPairEntry)) { return super.equals(obj); } alluxio.proto.journal.File.StringPairEntry other = (alluxio.proto.journal.File.StringPairEntry) obj; boolean result = true; result = result && (hasKey() == other.hasKey()); if (hasKey()) { result = result && getKey() .equals(other.getKey()); } result = result && (hasValue() == other.hasValue()); if (hasValue()) { result = result && getValue() .equals(other.getValue()); } result = result && unknownFields.equals(other.unknownFields); return result; }
mState.applyAndJournal(journalContext, AddMountPointEntry.newBuilder() .addAllProperties(properties.entrySet().stream() .map(entry -> StringPairEntry.newBuilder() .setKey(entry.getKey()).setValue(entry.getValue()).build()) .collect(Collectors.toList()))
/** * <code>repeated .alluxio.proto.journal.StringPairEntry properties = 4;</code> */ public alluxio.proto.journal.File.StringPairEntry.Builder addPropertiesBuilder( int index) { return getPropertiesFieldBuilder().addBuilder( index, alluxio.proto.journal.File.StringPairEntry.getDefaultInstance()); } /**
for (Map.Entry<String, String> entry : properties.entrySet()) { protoProperties.add( StringPairEntry.newBuilder().setKey(entry.getKey()).setValue(entry.getValue()).build());
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
@Override public Journal.JournalEntry next() { if (!hasNext()) { throw new NoSuchElementException(); } String alluxioPath = mEntry.getKey(); MountInfo info = mEntry.getValue(); mEntry = null; Map<String, String> properties = info.getOptions().getProperties(); List<File.StringPairEntry> protoProperties = new ArrayList<>(properties.size()); for (Map.Entry<String, String> property : properties.entrySet()) { protoProperties.add(File.StringPairEntry.newBuilder() .setKey(property.getKey()) .setValue(property.getValue()) .build()); } AddMountPointEntry addMountPoint = AddMountPointEntry.newBuilder().setAlluxioPath(alluxioPath) .setMountId(info.getMountId()).setUfsPath(info.getUfsUri().toString()) .setReadOnly(info.getOptions().isReadOnly()).addAllProperties(protoProperties) .setShared(info.getOptions().isShared()).build(); return Journal.JournalEntry.newBuilder().setAddMountPoint(addMountPoint).build(); }
/** * Creates a new instance of {@link MountOptions} from {@link File.AddMountPointEntry}. * * @param options Proto options */ public MountOptions(File.AddMountPointEntry options) { this(); if (options != null) { if (options.hasReadOnly()) { mReadOnly = options.getReadOnly(); } for (File.StringPairEntry entry : options.getPropertiesList()) { mProperties.put(entry.getKey(), entry.getValue()); } if (options.hasShared()) { mShared = options.getShared(); } } }
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(alluxio.proto.journal.File.StringPairEntry prototype) {
public alluxio.proto.journal.File.StringPairEntry buildPartial() { alluxio.proto.journal.File.StringPairEntry result = new alluxio.proto.journal.File.StringPairEntry(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.key_ = key_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public Builder mergeFrom(alluxio.proto.journal.File.StringPairEntry other) { if (other == alluxio.proto.journal.File.StringPairEntry.getDefaultInstance()) return this; if (other.hasKey()) { bitField0_ |= 0x00000001; key_ = other.key_; onChanged(); } if (other.hasValue()) { bitField0_ |= 0x00000002; value_ = other.value_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public alluxio.proto.journal.File.StringPairEntry getDefaultInstanceForType() { return alluxio.proto.journal.File.StringPairEntry.getDefaultInstance(); }
public static Builder newBuilder(alluxio.proto.journal.File.StringPairEntry prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
/** * <code>repeated .alluxio.proto.journal.StringPairEntry properties = 4;</code> */ public alluxio.proto.journal.File.StringPairEntry.Builder addPropertiesBuilder( int index) { return getPropertiesFieldBuilder().addBuilder( index, alluxio.proto.journal.File.StringPairEntry.getDefaultInstance()); } /**
/** * <code>repeated .alluxio.proto.journal.StringPairEntry properties = 4;</code> */ public alluxio.proto.journal.File.StringPairEntry.Builder addPropertiesBuilder() { return getPropertiesFieldBuilder().addBuilder( alluxio.proto.journal.File.StringPairEntry.getDefaultInstance()); } /**
public alluxio.proto.journal.File.StringPairEntry build() { alluxio.proto.journal.File.StringPairEntry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * <code>optional string value = 2;</code> */ public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000002); value_ = getDefaultInstance().getValue(); onChanged(); return this; } /**
/** * <code>optional string key = 1;</code> */ public Builder clearKey() { bitField0_ = (bitField0_ & ~0x00000001); key_ = getDefaultInstance().getKey(); onChanged(); return this; } /**
break; default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
/** * Creates mount proto options from {@link File.AddMountPointEntry}. * @param mountEntryPoint mount point entry * @return created mount proto options */ public static MountPOptions fromMountEntry(File.AddMountPointEntry mountEntryPoint) { MountPOptions.Builder optionsBuilder = MountPOptions.newBuilder(); if (mountEntryPoint != null) { if (mountEntryPoint.hasReadOnly()) { optionsBuilder.setReadOnly(mountEntryPoint.getReadOnly()); } for (File.StringPairEntry entry : mountEntryPoint.getPropertiesList()) { optionsBuilder.putProperties(entry.getKey(), entry.getValue()); } if (mountEntryPoint.hasShared()) { optionsBuilder.setShared(mountEntryPoint.getShared()); } } return optionsBuilder.build(); }