|
@@ -33,6 +33,7 @@ class FSDirDeleteOp {
|
|
/**
|
|
/**
|
|
* Delete the target directory and collect the blocks under it
|
|
* Delete the target directory and collect the blocks under it
|
|
*
|
|
*
|
|
|
|
+ * @param fsd the FSDirectory instance
|
|
* @param iip the INodesInPath instance containing all the INodes for the path
|
|
* @param iip the INodesInPath instance containing all the INodes for the path
|
|
* @param collectedBlocks Blocks under the deleted directory
|
|
* @param collectedBlocks Blocks under the deleted directory
|
|
* @param removedINodes INodes that should be removed from inodeMap
|
|
* @param removedINodes INodes that should be removed from inodeMap
|
|
@@ -71,6 +72,13 @@ class FSDirDeleteOp {
|
|
* <p>
|
|
* <p>
|
|
* For small directory or file the deletion is done in one shot.
|
|
* For small directory or file the deletion is done in one shot.
|
|
*
|
|
*
|
|
|
|
+ * @param fsn namespace
|
|
|
|
+ * @param src path name to be deleted
|
|
|
|
+ * @param recursive boolean true to apply to all sub-directories recursively
|
|
|
|
+ * @param logRetryCache whether to record RPC ids in editlog for retry cache
|
|
|
|
+ * rebuilding
|
|
|
|
+ * @return blocks collected from the deleted path
|
|
|
|
+ * @throws IOException
|
|
*/
|
|
*/
|
|
static BlocksMapUpdateInfo delete(
|
|
static BlocksMapUpdateInfo delete(
|
|
FSNamesystem fsn, String src, boolean recursive, boolean logRetryCache)
|
|
FSNamesystem fsn, String src, boolean recursive, boolean logRetryCache)
|
|
@@ -99,6 +107,8 @@ class FSDirDeleteOp {
|
|
* Note: This is to be used by
|
|
* Note: This is to be used by
|
|
* {@link org.apache.hadoop.hdfs.server.namenode.FSEditLog} only.
|
|
* {@link org.apache.hadoop.hdfs.server.namenode.FSEditLog} only.
|
|
* <br>
|
|
* <br>
|
|
|
|
+ *
|
|
|
|
+ * @param fsd the FSDirectory instance
|
|
* @param src a string representation of a path to an inode
|
|
* @param src a string representation of a path to an inode
|
|
* @param mtime the time the inode is removed
|
|
* @param mtime the time the inode is removed
|
|
*/
|
|
*/
|
|
@@ -134,6 +144,13 @@ class FSDirDeleteOp {
|
|
* the {@link org.apache.hadoop.hdfs.server.namenode.FSNamesystem} lock.
|
|
* the {@link org.apache.hadoop.hdfs.server.namenode.FSNamesystem} lock.
|
|
* <p>
|
|
* <p>
|
|
* For small directory or file the deletion is done in one shot.
|
|
* For small directory or file the deletion is done in one shot.
|
|
|
|
+ * @param fsn namespace
|
|
|
|
+ * @param src path name to be deleted
|
|
|
|
+ * @param iip the INodesInPath instance containing all the INodes for the path
|
|
|
|
+ * @param logRetryCache whether to record RPC ids in editlog for retry cache
|
|
|
|
+ * rebuilding
|
|
|
|
+ * @return blocks collected from the deleted path
|
|
|
|
+ * @throws IOException
|
|
*/
|
|
*/
|
|
static BlocksMapUpdateInfo deleteInternal(
|
|
static BlocksMapUpdateInfo deleteInternal(
|
|
FSNamesystem fsn, String src, INodesInPath iip, boolean logRetryCache)
|
|
FSNamesystem fsn, String src, INodesInPath iip, boolean logRetryCache)
|
|
@@ -192,6 +209,7 @@ class FSDirDeleteOp {
|
|
/**
|
|
/**
|
|
* Delete a path from the name space
|
|
* Delete a path from the name space
|
|
* Update the count at each ancestor directory with quota
|
|
* Update the count at each ancestor directory with quota
|
|
|
|
+ * @param fsd the FSDirectory instance
|
|
* @param iip the inodes resolved from the path
|
|
* @param iip the inodes resolved from the path
|
|
* @param collectedBlocks blocks collected from the deleted path
|
|
* @param collectedBlocks blocks collected from the deleted path
|
|
* @param removedINodes inodes that should be removed from inodeMap
|
|
* @param removedINodes inodes that should be removed from inodeMap
|