/** * <code>optional .alluxio.proto.journal.NewBlockEntry new_block = 38;</code> */ public Builder setNewBlock( alluxio.proto.journal.File.NewBlockEntry.Builder builderForValue) { if (newBlockBuilder_ == null) { newBlock_ = builderForValue.build(); onChanged(); } else { newBlockBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00008000; return this; } /**
subBuilder.mergeFrom(newBlock_); newBlock_ = subBuilder.buildPartial();
@Override public long getNewBlockIdForFile(AlluxioURI path) throws FileDoesNotExistException, InvalidPathException, AccessControlException, UnavailableException { Metrics.GET_NEW_BLOCK_OPS.inc(); try (RpcContext rpcContext = createRpcContext(); LockedInodePath inodePath = mInodeTree.lockFullInodePath(path, LockPattern.WRITE_INODE); FileSystemMasterAuditContext auditContext = createAuditContext("getNewBlockIdForFile", path, null, inodePath.getInodeOrNull())) { try { mPermissionChecker.checkPermission(Mode.Bits.WRITE, inodePath); } catch (AccessControlException e) { auditContext.setAllowed(false); throw e; } Metrics.NEW_BLOCKS_GOT.inc(); long blockId = mInodeTree.newBlock(rpcContext, NewBlockEntry.newBuilder() .setId(inodePath.getInode().getId()) .build()); auditContext.setSucceeded(true); return blockId; } }
/** * <code>optional .alluxio.proto.journal.NewBlockEntry new_block = 38;</code> */ public Builder mergeNewBlock(alluxio.proto.journal.File.NewBlockEntry value) { if (newBlockBuilder_ == null) { if (((bitField0_ & 0x00008000) == 0x00008000) && newBlock_ != null && newBlock_ != alluxio.proto.journal.File.NewBlockEntry.getDefaultInstance()) { newBlock_ = alluxio.proto.journal.File.NewBlockEntry.newBuilder(newBlock_).mergeFrom(value).buildPartial(); } else { newBlock_ = value; } onChanged(); } else { newBlockBuilder_.mergeFrom(value); } bitField0_ |= 0x00008000; return this; } /**
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { alluxio.proto.journal.File.NewBlockEntry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (alluxio.proto.journal.File.NewBlockEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
private Builder() { maybeForceBuilderInitialization(); }
public static Builder newBuilder(alluxio.proto.journal.File.NewBlockEntry prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
/** * <code>optional int64 id = 1;</code> */ public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000001); id_ = 0L; onChanged(); return this; } public final Builder setUnknownFields(
/** * <code>optional int64 id = 1;</code> */ public Builder setId(long value) { bitField0_ |= 0x00000001; id_ = value; onChanged(); return this; } /**
private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() {
public alluxio.proto.journal.File.NewBlockEntry build() { alluxio.proto.journal.File.NewBlockEntry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof alluxio.proto.journal.File.NewBlockEntry) { return mergeFrom((alluxio.proto.journal.File.NewBlockEntry)other); } else { super.mergeFrom(other); return this; } }
public alluxio.proto.journal.File.NewBlockEntry buildPartial() { alluxio.proto.journal.File.NewBlockEntry result = new alluxio.proto.journal.File.NewBlockEntry(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.id_ = id_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
public Builder mergeFrom(alluxio.proto.journal.File.NewBlockEntry other) { if (other == alluxio.proto.journal.File.NewBlockEntry.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }