|
@@ -393,7 +393,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
public static final Log auditLog = LogFactory.getLog(
|
|
public static final Log auditLog = LogFactory.getLog(
|
|
FSNamesystem.class.getName() + ".audit");
|
|
FSNamesystem.class.getName() + ".audit");
|
|
|
|
|
|
- static final int DEFAULT_MAX_CORRUPT_FILEBLOCKS_RETURNED = 100;
|
|
|
|
|
|
+ private final int maxCorruptFileBlocksReturn;
|
|
static int BLOCK_DELETION_INCREMENT = 1000;
|
|
static int BLOCK_DELETION_INCREMENT = 1000;
|
|
private final boolean isPermissionEnabled;
|
|
private final boolean isPermissionEnabled;
|
|
private final UserGroupInformation fsOwner;
|
|
private final UserGroupInformation fsOwner;
|
|
@@ -796,6 +796,10 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
this.supportAppends = conf.getBoolean(DFS_SUPPORT_APPEND_KEY, DFS_SUPPORT_APPEND_DEFAULT);
|
|
this.supportAppends = conf.getBoolean(DFS_SUPPORT_APPEND_KEY, DFS_SUPPORT_APPEND_DEFAULT);
|
|
LOG.info("Append Enabled: " + supportAppends);
|
|
LOG.info("Append Enabled: " + supportAppends);
|
|
|
|
|
|
|
|
+ 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.dtpReplaceDatanodeOnFailure = ReplaceDatanodeOnFailure.get(conf);
|
|
|
|
|
|
this.standbyShouldCheckpoint = conf.getBoolean(
|
|
this.standbyShouldCheckpoint = conf.getBoolean(
|
|
@@ -5135,7 +5139,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
if (src.startsWith(path)){
|
|
if (src.startsWith(path)){
|
|
corruptFiles.add(new CorruptFileBlockInfo(src, blk));
|
|
corruptFiles.add(new CorruptFileBlockInfo(src, blk));
|
|
count++;
|
|
count++;
|
|
- if (count >= DEFAULT_MAX_CORRUPT_FILEBLOCKS_RETURNED)
|
|
|
|
|
|
+ if (count >= maxCorruptFileBlocksReturn)
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|