hash = (37 * hash) + LENGTH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getLength());
public Builder mergeFrom(alluxio.proto.journal.File.CompleteFileEntry other) { if (other == alluxio.proto.journal.File.CompleteFileEntry.getDefaultInstance()) return this; if (!other.blockIds_.isEmpty()) { if (blockIds_.isEmpty()) { blockIds_ = other.blockIds_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureBlockIdsIsMutable(); blockIds_.addAll(other.blockIds_); } onChanged(); } if (other.hasId()) { setId(other.getId()); } if (other.hasLength()) { setLength(other.getLength()); } if (other.hasOpTimeMs()) { setOpTimeMs(other.getOpTimeMs()); } if (other.hasUfsFingerprint()) { bitField0_ |= 0x00000010; ufsFingerprint_ = other.ufsFingerprint_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public Builder mergeFrom(alluxio.proto.journal.File.CompleteFileEntry other) { if (other == alluxio.proto.journal.File.CompleteFileEntry.getDefaultInstance()) return this; if (!other.blockIds_.isEmpty()) { if (blockIds_.isEmpty()) { blockIds_ = other.blockIds_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureBlockIdsIsMutable(); blockIds_.addAll(other.blockIds_); } onChanged(); } if (other.hasId()) { setId(other.getId()); } if (other.hasLength()) { setLength(other.getLength()); } if (other.hasOpTimeMs()) { setOpTimeMs(other.getOpTimeMs()); } if (other.hasUfsFingerprint()) { bitField0_ |= 0x00000010; ufsFingerprint_ = other.ufsFingerprint_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * @param entry the entry to use * @throws InvalidPathException if an invalid path is encountered * @throws InvalidFileSizeException if an invalid file size is encountered * @throws FileAlreadyCompletedException if the file has already been completed */ private void completeFileFromEntry(CompleteFileEntry entry) throws InvalidPathException, InvalidFileSizeException, FileAlreadyCompletedException, UnavailableException { try (LockedInodePath inodePath = mInodeTree .lockFullInodePath(entry.getId(), InodeTree.LockMode.WRITE)) { completeFileInternal(entry.getBlockIdsList(), inodePath, entry.getLength(), entry.getOpTimeMs(), entry.getUfsFingerprint(), true); } catch (FileDoesNotExistException e) { throw new RuntimeException(e); } }
private void apply(CompleteFileEntry entry) { apply(UpdateInodeEntry.newBuilder() .setId(entry.getId()) .setLastModificationTimeMs(entry.getOpTimeMs()) .setOverwriteModificationTime(true) .setUfsFingerprint(entry.getUfsFingerprint()) .build()); apply(UpdateInodeFileEntry.newBuilder() .setId(entry.getId()) .setLength(entry.getLength()) .addAllSetBlocks(entry.getBlockIdsList()) .build()); }