|
@@ -418,7 +418,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
public static final Log auditLog = LogFactory.getLog(
|
|
|
FSNamesystem.class.getName() + ".audit");
|
|
|
|
|
|
- static final int DEFAULT_MAX_CORRUPT_FILEBLOCKS_RETURNED = 100;
|
|
|
+ private final int maxCorruptFileBlocksReturn;
|
|
|
static int BLOCK_DELETION_INCREMENT = 1000;
|
|
|
private final boolean isPermissionEnabled;
|
|
|
private final UserGroupInformation fsOwner;
|
|
@@ -819,6 +819,10 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
DFSConfigKeys.DFS_NAMENODE_FILE_CLOSE_NUM_COMMITTED_ALLOWED_KEY,
|
|
|
DFSConfigKeys.DFS_NAMENODE_FILE_CLOSE_NUM_COMMITTED_ALLOWED_DEFAULT);
|
|
|
|
|
|
+ this.maxCorruptFileBlocksReturn = conf.getInt(
|
|
|
+ DFSConfigKeys.DFS_NAMENODE_MAX_CORRUPT_FILE_BLOCKS_RETURNED_KEY,
|
|
|
+ DFSConfigKeys.DFS_NAMENODE_MAX_CORRUPT_FILE_BLOCKS_RETURNED_DEFAULT);
|
|
|
+
|
|
|
this.dtpReplaceDatanodeOnFailure = ReplaceDatanodeOnFailure.get(conf);
|
|
|
|
|
|
this.standbyShouldCheckpoint = conf.getBoolean(
|
|
@@ -5439,7 +5443,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
if (src.startsWith(path)){
|
|
|
corruptFiles.add(new CorruptFileBlockInfo(src, blk));
|
|
|
count++;
|
|
|
- if (count >= DEFAULT_MAX_CORRUPT_FILEBLOCKS_RETURNED)
|
|
|
+ if (count >= maxCorruptFileBlocksReturn)
|
|
|
break;
|
|
|
}
|
|
|
}
|