对比了Hadoop 3.x版本,通过jmx查询metric的统计信息,发现有的集群的某些rpc在8020里,另一个集群的这些rpc在8021里。目测一定是某个配置项不对,到ambari的hdfs配置里搜索8021,发现是如下配置项:
| dfs.namenode.servicerpc-address |
官网描述:
RPC address for HDFS Services communication. BackupNode, Datanodes and all other services should be connecting to this address if it is configured. In the case of HA/Federation where multiple namenodes exist, the name service id is added to the name e.g. dfs.namenode.servicerpc-address.ns1 dfs.namenode.rpc-address.EXAMPLENAMESERVICE The value of this property will take the form of nn-host1:rpc-port. If the value of this property is unset the value of dfs.namenode.rpc-address will be used as the default.
这个配置项用来配置HDFS服务通信的RPC地址。如果配置了这项的话,那么BackupNode,Datanodes以及其他的服务使用这个地址来进行交互。如果这项没有配置值,那么会使用dfs.namenode.rpc-address 作为默认值。
网友评论