@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.DirectoryDiffList
INodeDirectory.SnapshotAndINode
INode.BlocksMapUpdateInfo
INodeDirectoryAttributes.CopyWithQuota, INodeDirectoryAttributes.SnapshotCopy
DEFAULT_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, undoRename4ScrParent
addSpaceConsumed, addSpaceConsumed2Cache, getDiskspace, getDsQuota, getNamespace, getNsQuota, setQuota
addChild, asDirectory, cleanSubtreeRecursively, clear, clearChildren, dumpTreeRecursively, getChildrenNum, isDirectory, metadataEquals, removeChild, replaceSelf4INodeDirectory, replaceSelf4INodeDirectorySnapshottable, replaceSelf4INodeDirectoryWithSnapshot, valueOf
getFsPermissionShort, getId, getLocalNameBytes, getNext, getPermissionLong, setAccessTime, setLocalName, setModificationTime, setNext, updateModificationTime
asFile, 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, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAccessTime, getFsPermission, getFsPermissionShort, getGroupName, getLocalNameBytes, getModificationTime, getPermissionLong, getUserName
public INodeDirectorySnapshottable(INodeDirectory dir)
public static INodeDirectorySnapshottable valueOf(INode inode, String src) throws IOException
IOException
public int getNumSnapshots()
public Snapshot getSnapshot(byte[] snapshotName)
public ReadOnlyList<Snapshot> getSnapshotList()
snapshotsByNames
as a ReadOnlyList
public 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()
INodeDirectory
isSnapshottable
in class INodeDirectory
public Content.Counts computeContentSummary(Content.Counts counts)
INode
Content.Counts
.computeContentSummary
in class INodeDirectoryWithSnapshot
counts
- The subtree counts for returning.public String toDetailString()
toDetailString
in class INodeDirectoryWithSnapshot
public void dumpTreeRecursively(PrintWriter out, StringBuilder prefix, Snapshot snapshot)
INode
dumpTreeRecursively
in class INodeDirectory
prefix
- The prefix string that each line should print.Copyright © 2013 Apache Software Foundation. All rights reserved.