[
https://issues.apache.org/jira/browse/HDFS-6590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14061863#comment-14061863
]
Guo Ruijing commented on HDFS-6590:
-----------------------------------
Root-cause: data is not initialized and referenced in
data.getBlockLocalPathInfo(block);
fix solution 1:
existing:
in getBlockLocalPathInfo()
{
BlockLocalPathInfo info = data.getBlockLocalPathInfo(block);
}
new:
in getBlockLocalPathInfo()
{
BlockLocalPathInfo info = null;
if (data != null) {
info = data.getBlockLocalPathInfo(block);
}
}
> NullPointerException was generated in getBlockLocalPathInfo when datanode
> restarts
> ----------------------------------------------------------------------------------
>
> Key: HDFS-6590
> URL: https://issues.apache.org/jira/browse/HDFS-6590
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: datanode
> Affects Versions: 2.2.0
> Reporter: Guo Ruijing
>
> 2014-06-11 20:34:40.240119, p43949, th140725562181728, ERROR cannot setup
> block reader for Block: [block pool ID:
> BP-1901161041-172.28.1.251-1402542341112 block ID 1073741926_1102] on
> Datanode: sdw3(172.28.1.3).
> RpcHelper.h: 74: HdfsIOException: Unexpected exception: when unwrap the rpc
> remote exception ""java.lang.NullPointerException"",
> java.lang.NullPointerException
> at
> org.apache.hadoop.hdfs.server.datanode.DataNode.getBlockLocalPathInfo(DataNode.java:1014)
> at
> org.apache.hadoop.hdfs.protocolPB.ClientDatanodeProtocolServerSideTranslatorPB.getBlockLocalPathInfo(ClientDatanodeProtocolServerSideTranslatorPB.java:112)
> at
> org.apache.hadoop.hdfs.protocol.proto.ClientDatanodeProtocolProtos$ClientDatanodeProtocolService$2.callBlockingMethod(ClientDatanodeProtocolProtos.java:6373)
> at
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:928)
> at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2048)
> at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2044)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:415)
> at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2042)
--
This message was sent by Atlassian JIRA
(v6.2#6252)