hbase多用户写入数据 写了十个小时左右 regionserver就宕机了 查看regionserver的日志文件,异常很平常,如下:
org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /hbase/t/ff0b5a311419578f75678c21d5a27148/.tmp/5708637502440582008 could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1531)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:685)
at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382)
at org.apache.hadoop.ipc.Client.call(Client.java:1066)
然后查看datanode的文件,发现了问题:
java.io.IOException: xceiverCount 258 exceeds the limit of concurrent xcievers 256
at org.apache.hadoop.hdfs.server.datanode.DataXceiver.run(DataXceiver.java:92)
at java.lang.Thread.run(Thread.java:662)
原来是配置文件一个选项的问题:
- <property>
- <name>dfs.datanode.max.xcievers</name>
- <value>256</value>
- </property>
这个配置的意思是datanode允许打开的最大文件数,超过这个,datanode不给打开文件,才会引起这个问题。把这个设大就可以
ps: 原来这个问题,上次已经配置过了,但是我把xcievers拼错了。。。。