文档介绍如下:
The dfs.datanode.max.transfer.threads parameter is used to specify the size of the thread pool for a DataNode to process read and write data streams. Default value: 4096. If the value of this parameter is small, the number of Xceiver threads on a DataNode is limited in specific scenarios.
翻译过来就是:
每个节点最大的并发处理读or写数据流的线程数
如果这个配置项的值设置过小可能发生的异常:
java.io.IOException: Xceiver count xxxx exceeds the limit of concurrent xcievers: xxxx
代码里的用处,DataXceiverServer#run:
有连接请求过来之后,先accept,获取到peer对象,然后判断当前xceiver线程数是不是超过maxXceiverCount。
如果没超过,则创建并启动DataXceiver线程。如果超了,则抛出异常。