|
@@ -337,7 +337,7 @@ public class FSNamesystem implements FSConstants, FSNamesystemMBean,
|
|
|
private final GenerationStamp generationStamp = new GenerationStamp();
|
|
|
|
|
|
// Ask Datanode only up to this many blocks to delete.
|
|
|
- private int blockInvalidateLimit = FSConstants.BLOCK_INVALIDATE_CHUNK;
|
|
|
+ private int blockInvalidateLimit = DFSConfigKeys.DFS_BLOCK_INVALIDATE_LIMIT_DEFAULT;
|
|
|
|
|
|
// precision of access times.
|
|
|
private long accessTimePrecision = 0;
|
|
@@ -504,8 +504,15 @@ public class FSNamesystem implements FSConstants, FSNamesystemMBean,
|
|
|
conf.getInt("dfs.replication.interval", 3) * 1000L;
|
|
|
this.defaultBlockSize = conf.getLong("dfs.block.size", DEFAULT_BLOCK_SIZE);
|
|
|
this.maxFsObjects = conf.getLong("dfs.max.objects", 0);
|
|
|
+
|
|
|
+ //default limit
|
|
|
this.blockInvalidateLimit = Math.max(this.blockInvalidateLimit,
|
|
|
20*(int)(heartbeatInterval/1000));
|
|
|
+ //use conf value if it is set.
|
|
|
+ this.blockInvalidateLimit = conf.getInt(
|
|
|
+ DFSConfigKeys.DFS_BLOCK_INVALIDATE_LIMIT_KEY, this.blockInvalidateLimit);
|
|
|
+ LOG.info(DFSConfigKeys.DFS_BLOCK_INVALIDATE_LIMIT_KEY + "=" + this.blockInvalidateLimit);
|
|
|
+
|
|
|
this.accessTimePrecision = conf.getLong("dfs.access.time.precision", 0);
|
|
|
this.supportAppends = conf.getBoolean("dfs.support.append", false);
|
|
|
this.isAccessTokenEnabled = conf.getBoolean(
|