You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Avery Ching (JIRA)" <ji...@apache.org> on 2011/09/11 06:47:08 UTC

[jira] [Commented] (GIRAPH-30) NPE in ZooKeeperManager if base directory cannot be created

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

Avery Ching commented on GIRAPH-30:
-----------------------------------

Hi Andrew, thanks for reporting the issue.  I'd like to modify your fix since returning null is a valid return for getServerListFile().

I was able to recreate the issue by setting the giraph.zkManagerDirectory to a path I had no access to:

2011-09-11 04:38:20,927 WARN org.apache.hadoop.mapred.Child: Error running child
java.lang.NullPointerException
	at org.apache.giraph.zk.ZooKeeperManager.getServerListFile(ZooKeeperManager.java:357)
	at org.apache.giraph.zk.ZooKeeperManager.getZooKeeperServerList(ZooKeeperManager.java:380)
	at org.apache.giraph.zk.ZooKeeperManager.setup(ZooKeeperManager.java:216)

I am resubmitting a patch that will check for the issue a bit earlier in the code.  Here's the new error:

java.lang.IllegalArgumentException: createCandidateStamp: Couldn't get file status for base directory /shouldfail.  If there is an issue with this directory, please set an accesible base directory with the Hadoop configuration option giraph.zkManagerDirectory
	at org.apache.giraph.zk.ZooKeeperManager.createCandidateStamp(ZooKeeperManager.java:240)
	at org.apache.giraph.zk.ZooKeeperManager.setup(ZooKeeperManager.java:215)
	at org.apache.giraph.graph.GraphMapper.setup(GraphMapper.java:422)

Let me know what you think.

> NPE in ZooKeeperManager if base directory cannot be created
> -----------------------------------------------------------
>
>                 Key: GIRAPH-30
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-30
>             Project: Giraph
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Priority: Minor
>         Attachments: GIRAPH-30.2.patch, GIRAPH-30.patch
>
>
> If the base directory cannot be created, for example if running on secure Hadoop and the user home directory does not exist, ZooKeeperManager will throw an NPE when trying to list it. It would be better to throw an IOException with an informative message.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira