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

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

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


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

        

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

Posted by "Avery Ching (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GIRAPH-30?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Avery Ching updated GIRAPH-30:
------------------------------

    Attachment: GIRAPH-30.2.patch

> 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

        

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

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GIRAPH-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102216#comment-13102216 ] 

Andrew Purtell commented on GIRAPH-30:
--------------------------------------

+1, thanks, that is more helpful to newcomers.



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

        

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

Posted by "Avery Ching (JIRA)" <ji...@apache.org>.
    [ 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

        

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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GIRAPH-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104526#comment-13104526 ] 

Hudson commented on GIRAPH-30:
------------------------------

Integrated in Giraph-trunk-Commit #5 (See [https://builds.apache.org/job/Giraph-trunk-Commit/5/])
    GIRAPH-30: NPE in ZooKeeperManager if base directory cannot be
created. apurtell via aching.

aching : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1170427
Files : 
* /incubator/giraph/trunk/CHANGELOG
* /incubator/giraph/trunk/src/main/java/org/apache/giraph/zk/ZooKeeperManager.java


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

        

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

Posted by "Avery Ching (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GIRAPH-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102218#comment-13102218 ] 

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

Great, all we need is for another committer to +1 it.  Thanks for the fix!  I've added you as a contributor btw so you can be assigned issues =).

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

        

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

Posted by "Avery Ching (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GIRAPH-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104220#comment-13104220 ] 

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

Taking to long for another committer, and Andrew did review it.  I have committed.  If this is an issue, please reopen.

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

        

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

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GIRAPH-30?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Purtell updated GIRAPH-30:
---------------------------------

    Attachment: GIRAPH-30.patch

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

        

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

Posted by "Avery Ching (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GIRAPH-30?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Avery Ching reassigned GIRAPH-30:
---------------------------------

    Assignee: Andrew Purtell

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