result = result && (hasFileId() == other.hasFileId()); if (hasFileId()) { result = result && (getFileId() == other.getFileId()); result = result && (hasName() == other.hasName()); if (hasName()) { result = result && getName() .equals(other.getName()); result = result && (hasPath() == other.hasPath()); if (hasPath()) { result = result && getPath() .equals(other.getPath()); result = result && (hasUfsPath() == other.hasUfsPath()); if (hasUfsPath()) { result = result && getUfsPath() .equals(other.getUfsPath()); result = result && (hasLength() == other.hasLength()); if (hasLength()) { result = result && (getLength() == other.getLength()); result = result && (hasBlockSizeBytes() == other.hasBlockSizeBytes()); if (hasBlockSizeBytes()) { result = result && (getBlockSizeBytes() == other.getBlockSizeBytes());
/** * Converts a proto type to a wire type. * * @param pInfo the proto representation of a file information * @return wire representation of the file information */ public static FileInfo fromProto(alluxio.grpc.FileInfo pInfo) { return new FileInfo().setFileId(pInfo.getFileId()).setName(pInfo.getName()) .setPath(pInfo.getPath()).setUfsPath(pInfo.getUfsPath()).setLength(pInfo.getLength()) .setBlockSizeBytes(pInfo.getBlockSizeBytes()).setCreationTimeMs(pInfo.getCreationTimeMs()) .setCompleted(pInfo.getCompleted()).setFolder(pInfo.getFolder()) .setPinned(pInfo.getPinned()).setCacheable(pInfo.getCacheable()) .setPersisted(pInfo.getPersisted()).setBlockIds(pInfo.getBlockIdsList()) .setLastModificationTimeMs(pInfo.getLastModificationTimeMs()).setTtl(pInfo.getTtl()) .setTtlAction(pInfo.getTtlAction()).setOwner(pInfo.getOwner()) .setGroup(pInfo.getGroup()).setMode(pInfo.getMode()) .setPersistenceState(pInfo.getPersistenceState()).setMountPoint(pInfo.getMountPoint()) .setFileBlockInfos(map(GrpcUtils::fromProto, pInfo.getFileBlockInfosList())) .setMountId(pInfo.getMountId()).setInAlluxioPercentage(pInfo.getInAlluxioPercentage()) .setInMemoryPercentage(pInfo.getInMemoryPercentage()) .setUfsFingerprint(pInfo.hasUfsFingerprint() ? pInfo.getUfsFingerprint() : Constants.INVALID_UFS_FINGERPRINT) .setAcl(pInfo.hasAcl() ? (fromProto(pInfo.getAcl())) : AccessControlList.EMPTY_ACL) .setDefaultAcl( pInfo.hasDefaultAcl() ? ((DefaultAccessControlList) fromProto(pInfo.getDefaultAcl())) : DefaultAccessControlList.EMPTY_DEFAULT_ACL) .setReplicationMax(pInfo.getReplicationMax()).setReplicationMin(pInfo.getReplicationMin()); }
size += 1 * getBlockIdsList().size(); .computeMessageSize(27, getAcl()); .computeMessageSize(28, getDefaultAcl());
output.writeMessage(27, getAcl()); output.writeMessage(28, getDefaultAcl());
hash = (19 * hash) + getDescriptor().hashCode(); if (hasFileId()) { hash = (37 * hash) + FILEID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getFileId()); if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (hasPath()) { hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); if (hasUfsPath()) { hash = (37 * hash) + UFSPATH_FIELD_NUMBER; hash = (53 * hash) + getUfsPath().hashCode(); if (hasLength()) { hash = (37 * hash) + LENGTH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getLength()); if (hasBlockSizeBytes()) { hash = (37 * hash) + BLOCKSIZEBYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getBlockSizeBytes()); if (hasCreationTimeMs()) {
public Builder mergeFrom(alluxio.grpc.FileInfo other) { if (other == alluxio.grpc.FileInfo.getDefaultInstance()) return this; if (other.hasFileId()) { setFileId(other.getFileId()); if (other.hasName()) { bitField0_ |= 0x00000002; name_ = other.name_; onChanged(); if (other.hasPath()) { bitField0_ |= 0x00000004; path_ = other.path_; onChanged(); if (other.hasUfsPath()) { bitField0_ |= 0x00000008; ufsPath_ = other.ufsPath_; onChanged(); if (other.hasLength()) { setLength(other.getLength()); if (other.hasBlockSizeBytes()) { setBlockSizeBytes(other.getBlockSizeBytes()); if (other.hasCreationTimeMs()) { setCreationTimeMs(other.getCreationTimeMs()); if (other.hasCompleted()) {