@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof alluxio.proto.journal.File.NewBlockEntry)) { return super.equals(obj); } alluxio.proto.journal.File.NewBlockEntry other = (alluxio.proto.journal.File.NewBlockEntry) obj; boolean result = true; result = result && (hasId() == other.hasId()); if (hasId()) { result = result && (getId() == other.getId()); } result = result && unknownFields.equals(other.unknownFields); return result; }
/** * <code>optional .alluxio.proto.journal.NewBlockEntry new_block = 38;</code> */ public alluxio.proto.journal.File.NewBlockEntry getNewBlock() { if (newBlockBuilder_ == null) { return newBlock_ == null ? alluxio.proto.journal.File.NewBlockEntry.getDefaultInstance() : newBlock_; } else { return newBlockBuilder_.getMessage(); } } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasId()) { hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getId()); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
if (hasNewBlock()) { result = result && getNewBlock() .equals(other.getNewBlock());
hash = (53 * hash) + getNewBlock().hashCode();
break; default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
@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 newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public alluxio.proto.journal.File.NewBlockEntry getDefaultInstanceForType() { return alluxio.proto.journal.File.NewBlockEntry.getDefaultInstance(); }
/** * <code>optional .alluxio.proto.journal.NewBlockEntry new_block = 38;</code> */ public alluxio.proto.journal.File.NewBlockEntryOrBuilder getNewBlockOrBuilder() { return newBlock_ == null ? alluxio.proto.journal.File.NewBlockEntry.getDefaultInstance() : newBlock_; }
/** * <code>optional .alluxio.proto.journal.NewBlockEntry new_block = 38;</code> */ public alluxio.proto.journal.File.NewBlockEntry getNewBlock() { return newBlock_ == null ? alluxio.proto.journal.File.NewBlockEntry.getDefaultInstance() : newBlock_; } /**
public alluxio.proto.journal.File.NewBlockEntry build() { alluxio.proto.journal.File.NewBlockEntry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
private long apply(NewBlockEntry entry) { MutableInodeFile inode = mInodeStore.getMutable(entry.getId()).get().asFile(); long newBlockId = inode.getNewBlockId(); mInodeStore.writeInode(inode); return newBlockId; }
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; }
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; }
/** * <code>optional .alluxio.proto.journal.NewBlockEntry new_block = 38;</code> */ public alluxio.proto.journal.File.NewBlockEntryOrBuilder getNewBlockOrBuilder() { if (newBlockBuilder_ != null) { return newBlockBuilder_.getMessageOrBuilder(); } else { return newBlock_ == null ? alluxio.proto.journal.File.NewBlockEntry.getDefaultInstance() : newBlock_; } } /**