|
@@ -188,6 +188,9 @@ class DataXceiverServer implements Runnable {
|
|
|
this.maxXceiverCount =
|
|
|
conf.getInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY,
|
|
|
DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_DEFAULT);
|
|
|
+ Preconditions.checkArgument(this.maxXceiverCount >= 1,
|
|
|
+ DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY +
|
|
|
+ " should not be less than 1.");
|
|
|
|
|
|
this.estimateBlockSize = conf.getLongBytes(DFSConfigKeys.DFS_BLOCK_SIZE_KEY,
|
|
|
DFSConfigKeys.DFS_BLOCK_SIZE_DEFAULT);
|