@InterfaceAudience.Private public class INodeDirectorySnapshottable extends INodeDirectoryWithSnapshot
INode subclasses, this class is synchronized externally
by the namesystem and FSDirectory locks.| Modifier and Type | Class and Description |
|---|---|
static class |
INodeDirectorySnapshottable.SnapshotDiffInfo
A class describing the difference between snapshots of a snapshottable
directory.
|
INodeDirectoryWithSnapshot.DirectoryDiff, INodeDirectoryWithSnapshot.DirectoryDiffListINodeDirectory.SnapshotAndINodeINode.BlocksMapUpdateInfoINodeDirectoryAttributes.CopyWithQuota, INodeDirectoryAttributes.SnapshotCopyDEFAULT_FILES_PER_DIRECTORY| Constructor and Description |
|---|
INodeDirectorySnapshottable(INodeDirectory dir) |
| Modifier and Type | Method and Description |
|---|---|
Content.Counts |
computeContentSummary(Content.Counts counts)
Count subtree content summary with a
Content.Counts. |
void |
dumpTreeRecursively(PrintWriter out,
StringBuilder prefix,
Snapshot snapshot)
Dump tree recursively.
|
int |
getNumSnapshots() |
Snapshot |
getSnapshot(byte[] snapshotName) |
ReadOnlyList<Snapshot> |
getSnapshotList() |
int |
getSnapshotQuota() |
boolean |
isSnapshottable()
Is this a snapshottable directory?
|
void |
renameSnapshot(String path,
String oldName,
String newName)
Rename a snapshot
|
void |
setSnapshotQuota(int snapshotQuota) |
String |
toDetailString() |
static INodeDirectorySnapshottable |
valueOf(INode inode,
String src)
Cast INode to INodeDirectorySnapshottable.
|
addChild, cleanSubtree, computeQuotaUsage, computeQuotaUsage4CurrentDirectory, destroyAndCollectBlocks, destroyDstSubtree, getChild, getChildrenList, getDiffs, getLastSnapshot, getSnapshotDirectory, getSnapshotINode, recordModification, removeChild, replaceChild, saveChild2Snapshot, saveSelf2Snapshot, undoRename4DstParent, undoRename4ScrParentaddSpaceConsumed, addSpaceConsumed2Cache, getDiskspace, getDsQuota, getNamespace, getNsQuota, setQuotaaddChild, asDirectory, cleanSubtreeRecursively, clear, clearChildren, dumpTreeRecursively, getChildrenNum, isDirectory, metadataEquals, removeChild, replaceSelf4INodeDirectory, replaceSelf4INodeDirectorySnapshottable, replaceSelf4INodeDirectoryWithSnapshot, valueOfgetFsPermissionShort, getId, getLocalNameBytes, getNext, getPermissionLong, setAccessTime, setLocalName, setModificationTime, setNext, updateModificationTimeasFile, asReference, asSymlink, compareTo, computeContentSummary, computeQuotaUsage, computeQuotaUsage, dumpTreeRecursively, dumpTreeRecursively, equals, getAccessTime, getFsPermission, getFullPathName, getGroupName, getKey, getLocalName, getModificationTime, getObjectString, getParent, getParentReference, getParentString, getUserName, hashCode, isAncestorDirectory, isFile, isInLatestSnapshot, isQuotaSet, isReference, isSymlink, setAccessTime, setModificationTime, setParent, setParentReference, shouldRecordInSrcSnapshot, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAccessTime, getFsPermission, getFsPermissionShort, getGroupName, getLocalNameBytes, getModificationTime, getPermissionLong, getUserNamepublic INodeDirectorySnapshottable(INodeDirectory dir)
public static INodeDirectorySnapshottable valueOf(INode inode, String src) throws IOException
IOExceptionpublic int getNumSnapshots()
public Snapshot getSnapshot(byte[] snapshotName)
public ReadOnlyList<Snapshot> getSnapshotList()
snapshotsByNames as a ReadOnlyListpublic void renameSnapshot(String path, String oldName, String newName) throws SnapshotException
path - The directory path where the snapshot was taken. Used for
generating exception message.oldName - Old name of the snapshotnewName - New name the snapshot will be renamed toSnapshotException - Throw SnapshotException when either the snapshot with the old
name does not exist or a snapshot with the new name already
existspublic int getSnapshotQuota()
public void setSnapshotQuota(int snapshotQuota)
public boolean isSnapshottable()
INodeDirectoryisSnapshottable in class INodeDirectorypublic Content.Counts computeContentSummary(Content.Counts counts)
INodeContent.Counts.computeContentSummary in class INodeDirectoryWithSnapshotcounts - The subtree counts for returning.public String toDetailString()
toDetailString in class INodeDirectoryWithSnapshotpublic void dumpTreeRecursively(PrintWriter out, StringBuilder prefix, Snapshot snapshot)
INodedumpTreeRecursively in class INodeDirectoryprefix - The prefix string that each line should print.Copyright © 2013 Apache Software Foundation. All rights reserved.