hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miomir Boljanovic (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2988) Improve error message when storage directory lock fails
Date Sun, 27 May 2012 15:44:23 GMT

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

Miomir Boljanovic commented on HDFS-2988:
-----------------------------------------

Thanks Todd, glad to be on board!


Btw, I tried looking up a hadoop util method that returns PID and nodename, could not find
any.
Perhaps someone can correct if I am wrong?


Otherwise, I consider writing one based on RuntimeMXBean:

String jvmName = ManagementFactory.getRuntimeMXBean().getName();

It returns '<pid>@<hostname>' (at least on 1.6 Oracle JDK) , though it's probably
no platform-independent way that can be guaranteed to work in all jvm implementations. 
Besides, getting pid and hostanme requires string parsing, that's a bit fragile and should
be avoided. 

Any thoughts on that?
                
> Improve error message when storage directory lock fails
> -------------------------------------------------------
>
>                 Key: HDFS-2988
>                 URL: https://issues.apache.org/jira/browse/HDFS-2988
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: name-node
>            Reporter: Todd Lipcon
>            Priority: Minor
>              Labels: newbie
>
> Currently, the error message is fairly opaque to a non-developer ("Cannot lock storage"
or something). Instead, we should have some improvments:
> - when we create the in_use.lock file, we should write the hostname/PID that locked the
file
> - if the lock fails, and in_use.lock exists, the error message should say something like
"It appears that another namenode (pid 23423 on host foo.example.com) has already locked the
storage directory."
> - if the lock fails, and no lock file exists, the error message should say something
like "if this storage directory is mounted via NFS, ensure that the appropriate nfs lock services
are running."

--
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