@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().getReadOnly()).addAllProperties(protoProperties) .setShared(info.getOptions().getShared()).build(); return Journal.JournalEntry.newBuilder().setAddMountPoint(addMountPoint).build(); }
mState.applyAndJournal(journalContext, AddMountPointEntry.newBuilder() .addAllProperties(properties.entrySet().stream() .map(entry -> StringPairEntry.newBuilder()
/** * <code>optional .alluxio.proto.journal.AddMountPointEntry add_mount_point = 2;</code> */ public Builder mergeAddMountPoint(alluxio.proto.journal.File.AddMountPointEntry value) { if (addMountPointBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && addMountPoint_ != null && addMountPoint_ != alluxio.proto.journal.File.AddMountPointEntry.getDefaultInstance()) { addMountPoint_ = alluxio.proto.journal.File.AddMountPointEntry.newBuilder(addMountPoint_).mergeFrom(value).buildPartial(); } else { addMountPoint_ = value; } onChanged(); } else { addMountPointBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; return this; } /**
AddMountPointEntry.newBuilder().setAlluxioPath(inodePath.getUri().toString()) .setUfsPath(ufsPath.toString()).setMountId(mountId) .setReadOnly(options.isReadOnly())
@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(); }
/** * <code>optional .alluxio.proto.journal.AddMountPointEntry add_mount_point = 2;</code> */ public Builder mergeAddMountPoint(alluxio.proto.journal.File.AddMountPointEntry value) { if (addMountPointBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && addMountPoint_ != alluxio.proto.journal.File.AddMountPointEntry.getDefaultInstance()) { addMountPoint_ = alluxio.proto.journal.File.AddMountPointEntry.newBuilder(addMountPoint_).mergeFrom(value).buildPartial(); } else { addMountPoint_ = value; } onChanged(); } else { addMountPointBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(alluxio.proto.journal.File.AddMountPointEntry prototype) {
public static Builder newBuilder(alluxio.proto.journal.File.AddMountPointEntry prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {