本文整理汇总了Java中org.apache.hadoop.hdfs.server.namenode.INodeDirectory.renameSnapshot方法的典型用法代码示例。如果您正苦于以下问题:Java INodeDirectory.renameSnapshot方法的具体用法?Java INodeDirectory.renameSnapshot怎么用?Java INodeDirectory.renameSnapshot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hdfs.server.namenode.INodeDirectory
的用法示例。
在下文中一共展示了INodeDirectory.renameSnapshot方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renameSnapshot
import org.apache.hadoop.hdfs.server.namenode.INodeDirectory; //导入方法依赖的package包/类
/**
* Rename the given snapshot
* @param oldSnapshotName
* Old name of the snapshot
* @param newSnapshotName
* New name of the snapshot
* @throws IOException
* Throw IOException when 1) the given path does not lead to an
* existing snapshottable directory, and/or 2) the snapshot with the
* old name does not exist for the directory, and/or 3) there exists
* a snapshot with the new name for the directory
*/
public void renameSnapshot(final INodesInPath iip, final String snapshotRoot,
final String oldSnapshotName, final String newSnapshotName)
throws IOException {
final INodeDirectory srcRoot = getSnapshottableRoot(iip);
srcRoot.renameSnapshot(snapshotRoot, oldSnapshotName, newSnapshotName);
}