hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "amith (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3347) NullPointerException When trying to log to editstreams
Date Sun, 06 May 2012 14:45:52 GMT

    [ https://issues.apache.org/jira/browse/HDFS-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13269227#comment-13269227
] 

amith commented on HDFS-3347:
-----------------------------

Hi,
I agree with kihwal lee and todd.

For any ServiceFailedException we can revert the state, and for other exception(include throwable)
we can revert the state.

Some doubts,

1. Is there any possibility of adding this logic to failover controllers rather than including
the logic in NN and increase the complexity. 

like
{code}
try {
      HAServiceProtocolHelper.transitionToActive(
          toSvc.getProxy(conf, rpcTimeoutToNewActive));
    } catch (ServiceFailedException sfe) {
      LOG.error("Unable to make " + toSvc + " active (" +
          sfe.getMessage() + "). Failing back.");
      failed = true;
      cause = sfe;
    } catch (IOException ioe) {
      LOG.error("Unable to make " + toSvc +
          " active (unable to connect). Failing back.", ioe);
      failed = true;
      cause = ioe;
+    } catch (Throwable th) {
+      LOG.error("Unexpected error" + toSvc +
+          " Failing back.", th);
+      failed = true;
+      cause = ioe;
+    }

{code}

2. Can we mark the NN state as Active only when it successfully do a transition to Active
similarly for Standby. 

This can solve any issues since for any operation we have a state check ?

Thanks in advance :)
                
> NullPointerException When trying to log to editstreams
> ------------------------------------------------------
>
>                 Key: HDFS-3347
>                 URL: https://issues.apache.org/jira/browse/HDFS-3347
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>         Environment: HDFS
>            Reporter: amith
>            Assignee: amith
>
> When i try to create a file i got a exception 
> {code}
> 2012-05-02 17:42:55,768 DEBUG hdfs.StateChange (NameNodeRpcServer.java:create(402)) -
*DIR* NameNode.create: file /a._COPYING_ for DFSClient_NONMAPREDUCE_1515782500_1 at 10.18.40.95
> 2012-05-02 17:42:55,770 DEBUG hdfs.StateChange (FSNamesystem.java:startFileInternal(1547))
- DIR* NameSystem.startFile: src=/a._COPYING_, holder=DFSClient_NONMAPREDUCE_1515782500_1,
clientMachine=10.18.40.95, createParent=true, replication=1, createFlag=[CREATE, OVERWRITE]
> 2012-05-02 17:42:55,778 WARN  ipc.Server (Server.java:run(1701)) - IPC Server handler
1 on 8020, call org.apache.hadoop.hdfs.protocol.ClientProtocol.create from 10.18.40.95:37973:
error: java.lang.NullPointerException
> java.lang.NullPointerException
> 	at org.apache.hadoop.hdfs.server.namenode.FSEditLog.logEdit(FSEditLog.java:348)
> 	at org.apache.hadoop.hdfs.server.namenode.FSEditLog.logGenerationStamp(FSEditLog.java:755)
> 	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.nextGenerationStamp(FSNamesystem.java:4357)
> 	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFileInternal(FSNamesystem.java:1621)
> 	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFile(FSNamesystem.java:1509)
> 	at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.create(NameNodeRpcServer.java:409)
> 	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.create(ClientNamenodeProtocolServerSideTranslatorPB.java:200)
> 	at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java:42590)
> 	at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:428)
> 	at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:905)
> 	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1688)
> 	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1684)
> 	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:1205)
> 	at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1682)
> {code}
> analysing the same, will provide the details soon.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message