Requested data length 88431035 is longer than maximum configured RPC length 67108864.

HDFS DataNode RPC 异常

Requested data length 88431035 is longer than maximum configured RPC length 67108864.

异常信息

2020-04-05 08:29:19,993 WARN org.apache.hadoop.ipc.Server: Requested data length 88431035 is longer than maximum configured RPC length 67108864.  RPC came from  xxx.xxx.xxxx.xxx
2020-04-05 08:29:19,993 INFO org.apache.hadoop.ipc.Server: Socket Reader #1 for port 8022: readAndProcess from client  xxx.xxx.xxxx.xxx threw exception [java.io.IOException: Requested data length 88431035 is longer than maximum configured RPC length 67108864.  RPC came from  xxx.xxx.xxxx.xxx]
java.io.IOException: Requested data length 88431035 is longer than maximum configured RPC length 67108864.  RPC came from  xxx.xxx.xxxx.xxx
	at org.apache.hadoop.ipc.Server$Connection.checkDataLength(Server.java:1665)
	at org.apache.hadoop.ipc.Server$Connection.readAndProcess(Server.java:1727)
	at org.apache.hadoop.ipc.Server$Listener.doRead(Server.java:935)
	at org.apache.hadoop.ipc.Server$Listener$Reader.doRunLoop(Server.java:791)
	at org.apache.hadoop.ipc.Server$Listener$Reader.run(Server.java:762)

解决方式

修改NameNode的hdfs-site.xml配置文件,添加以下配置:


    ipc.maximum.data.length
    134217728

原因

因为集群规模比较小,但是小文件数量特别多,导致每个datanode中存在大量的数据块信息,当datanode向namenode汇报块信息时RPC最大设置为64M,当集群报错时RPC的信息量为80M左右。从而导致RPC异常,DataNode没能把block信息上报给NameNode,NameNode就认为block丢失了。

  public static final String IPC_MAXIMUM_DATA_LENGTH ="ipc.maximum.data.length";
  
  public static final int IPC_MAXIMUM_DATA_LENGTH_DEFAULT = 64 * 1024 * 1024;

你可能感兴趣的:(Hadoop)