@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasRecursive()) { hash = (37 * hash) + RECURSIVE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getRecursive()); } if (hasAlluxioOnly()) { hash = (37 * hash) + ALLUXIOONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getAlluxioOnly()); } if (hasUnchecked()) { hash = (37 * hash) + UNCHECKED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getUnchecked()); } if (hasCommonOptions()) { hash = (37 * hash) + COMMONOPTIONS_FIELD_NUMBER; hash = (53 * hash) + getCommonOptions().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
result = result && (getUnchecked() == other.getUnchecked());
/** * Creates a new instance of {@link SafeUfsDeleter}. * * @param mountTable the mount table * @param inodeStore the inode store * @param inodes sub-tree being deleted (any node should appear before descendants) * @param deleteOptions delete options */ public SafeUfsDeleter(MountTable mountTable, ReadOnlyInodeStore inodeStore, List<Pair<AlluxioURI, LockedInodePath>> inodes, DeletePOptions deleteOptions) throws IOException, FileDoesNotExistException, InvalidPathException { mMountTable = mountTable; // Root of sub-tree occurs before any of its descendants mRootPath = inodes.get(0).getFirst(); if (!deleteOptions.getUnchecked() && !deleteOptions.getAlluxioOnly()) { mUfsSyncChecker = new UfsSyncChecker(mMountTable, inodeStore); for (Pair<AlluxioURI, LockedInodePath> inodePair : inodes) { AlluxioURI alluxioUri = inodePair.getFirst(); Inode inode = inodePair.getSecond().getInodeOrNull(); // Mount points are not deleted recursively as we need to preserve the directory itself if (inode != null && inode.isPersisted() && inode.isDirectory() && !mMountTable.isMountPoint(alluxioUri)) { mUfsSyncChecker.checkDirectory(inode.asDirectory(), alluxioUri); } } } }
public Builder mergeFrom(alluxio.grpc.DeletePOptions other) { if (other == alluxio.grpc.DeletePOptions.getDefaultInstance()) return this; if (other.hasRecursive()) { setRecursive(other.getRecursive()); } if (other.hasAlluxioOnly()) { setAlluxioOnly(other.getAlluxioOnly()); } if (other.hasUnchecked()) { setUnchecked(other.getUnchecked()); } if (other.hasCommonOptions()) { mergeCommonOptions(other.getCommonOptions()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Test public void deleteOptionsDefaults() { DeletePOptions options = FileSystemMasterOptions.deleteDefaults(); Assert.assertNotNull(options); Assert.assertFalse(options.getRecursive()); Assert.assertFalse(options.getAlluxioOnly()); Assert.assertFalse(options.getUnchecked()); }