You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Sebastian Schelter (Created) (JIRA)" <ji...@apache.org> on 2011/12/17 12:14:30 UTC

[jira] [Created] (GIRAPH-105) BspServiceMaster.checkWorkers() should return empty lists instead of null

BspServiceMaster.checkWorkers() should return empty lists instead of null
-------------------------------------------------------------------------

                 Key: GIRAPH-105
                 URL: https://issues.apache.org/jira/browse/GIRAPH-105
             Project: Giraph
          Issue Type: Bug
    Affects Versions: 0.70.0
            Reporter: Sebastian Schelter
            Priority: Minor


BspServiceMaster.checkWorkers() is invoked in BspServiceMaster.coordinateSuperstep() and in BspServiceMaster.createInputSplits(). Both check for an empty list to fail the job in case something has gone wrong. However, checkWorkers() returns null in case of problems, causing an NPE in the calling code.

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

        

[jira] [Commented] (GIRAPH-105) BspServiceMaster.checkWorkers() should return empty lists instead of null

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

Avery Ching commented on GIRAPH-105:
------------------------------------

Thanks for the reworking!  +1.
                
> BspServiceMaster.checkWorkers() should return empty lists instead of null
> -------------------------------------------------------------------------
>
>                 Key: GIRAPH-105
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-105
>             Project: Giraph
>          Issue Type: Bug
>    Affects Versions: 0.70.0
>            Reporter: Sebastian Schelter
>            Priority: Minor
>         Attachments: GIRAPH-105-2.patch, GIRAPH-105.patch
>
>
> BspServiceMaster.checkWorkers() is invoked in BspServiceMaster.coordinateSuperstep() and in BspServiceMaster.createInputSplits(). Both check for an empty list to fail the job in case something has gone wrong. However, checkWorkers() returns null in case of problems, causing an NPE in the calling code.

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

        

[jira] [Commented] (GIRAPH-105) BspServiceMaster.checkWorkers() should return empty lists instead of null

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

Sebastian Schelter commented on GIRAPH-105:
-------------------------------------------

Makes sense. Main issue is to make caller and callee consistent.
                
> BspServiceMaster.checkWorkers() should return empty lists instead of null
> -------------------------------------------------------------------------
>
>                 Key: GIRAPH-105
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-105
>             Project: Giraph
>          Issue Type: Bug
>    Affects Versions: 0.70.0
>            Reporter: Sebastian Schelter
>            Priority: Minor
>         Attachments: GIRAPH-105.patch
>
>
> BspServiceMaster.checkWorkers() is invoked in BspServiceMaster.coordinateSuperstep() and in BspServiceMaster.createInputSplits(). Both check for an empty list to fail the job in case something has gone wrong. However, checkWorkers() returns null in case of problems, causing an NPE in the calling code.

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

        

[jira] [Commented] (GIRAPH-105) BspServiceMaster.checkWorkers() should return empty lists instead of null

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

Hudson commented on GIRAPH-105:
-------------------------------

Integrated in Giraph-trunk-Commit #52 (See [https://builds.apache.org/job/Giraph-trunk-Commit/52/])
    GIRAPH-105: BspServiceMaster.checkWorkers() should return empty lists
instead of null. (ssc via aching)

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

                
> BspServiceMaster.checkWorkers() should return empty lists instead of null
> -------------------------------------------------------------------------
>
>                 Key: GIRAPH-105
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-105
>             Project: Giraph
>          Issue Type: Bug
>    Affects Versions: 0.70.0
>            Reporter: Sebastian Schelter
>            Priority: Minor
>         Attachments: GIRAPH-105-2.patch, GIRAPH-105.patch
>
>
> BspServiceMaster.checkWorkers() is invoked in BspServiceMaster.coordinateSuperstep() and in BspServiceMaster.createInputSplits(). Both check for an empty list to fail the job in case something has gone wrong. However, checkWorkers() returns null in case of problems, causing an NPE in the calling code.

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

        

[jira] [Commented] (GIRAPH-105) BspServiceMaster.checkWorkers() should return empty lists instead of null

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

Avery Ching commented on GIRAPH-105:
------------------------------------

I totally agree that the NPE is messy for a situation that can occur if the resources aren't met.  However, returning a valid list could be a little confusing since this method must return the minimum at the very least.  What about leaving the null returns for checkWorkers, but change the javadoc of checkWorkers() from 

{noformat}
    /**
     * Check all the {@link WorkerInfo} objects to ensure that a minimum
     * number of good workers exists out of the total that have reported.
     *
     * @return List of of healthy workers
     */
{noformat}

to something like:

{noformat}
    /**
     * Check all the {@link WorkerInfo} objects to ensure that a minimum
     * number of good workers exists out of the total that have reported.
     *
     * @return List of healthy workers such that the minimum has been 
     *         met, otherwise null
     */
{noformat}

and then changing 

{noformat}
        if (healthyWorkerInfoList.isEmpty()) {
{noformat}

to 

{noformat}
        if (healthyWorkerInfoList == null) {
{noformat}

Thoughts?
                
> BspServiceMaster.checkWorkers() should return empty lists instead of null
> -------------------------------------------------------------------------
>
>                 Key: GIRAPH-105
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-105
>             Project: Giraph
>          Issue Type: Bug
>    Affects Versions: 0.70.0
>            Reporter: Sebastian Schelter
>            Priority: Minor
>         Attachments: GIRAPH-105.patch
>
>
> BspServiceMaster.checkWorkers() is invoked in BspServiceMaster.coordinateSuperstep() and in BspServiceMaster.createInputSplits(). Both check for an empty list to fail the job in case something has gone wrong. However, checkWorkers() returns null in case of problems, causing an NPE in the calling code.

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

        

[jira] [Updated] (GIRAPH-105) BspServiceMaster.checkWorkers() should return empty lists instead of null

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

Sebastian Schelter updated GIRAPH-105:
--------------------------------------

    Attachment: GIRAPH-105-2.patch

updated patch to reflect aching's suggestions, ran local and pseudo distributed unit-tests
                
> BspServiceMaster.checkWorkers() should return empty lists instead of null
> -------------------------------------------------------------------------
>
>                 Key: GIRAPH-105
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-105
>             Project: Giraph
>          Issue Type: Bug
>    Affects Versions: 0.70.0
>            Reporter: Sebastian Schelter
>            Priority: Minor
>         Attachments: GIRAPH-105-2.patch, GIRAPH-105.patch
>
>
> BspServiceMaster.checkWorkers() is invoked in BspServiceMaster.coordinateSuperstep() and in BspServiceMaster.createInputSplits(). Both check for an empty list to fail the job in case something has gone wrong. However, checkWorkers() returns null in case of problems, causing an NPE in the calling code.

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

        

[jira] [Updated] (GIRAPH-105) BspServiceMaster.checkWorkers() should return empty lists instead of null

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

Sebastian Schelter updated GIRAPH-105:
--------------------------------------

    Attachment: GIRAPH-105.patch
    
> BspServiceMaster.checkWorkers() should return empty lists instead of null
> -------------------------------------------------------------------------
>
>                 Key: GIRAPH-105
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-105
>             Project: Giraph
>          Issue Type: Bug
>    Affects Versions: 0.70.0
>            Reporter: Sebastian Schelter
>            Priority: Minor
>         Attachments: GIRAPH-105.patch
>
>
> BspServiceMaster.checkWorkers() is invoked in BspServiceMaster.coordinateSuperstep() and in BspServiceMaster.createInputSplits(). Both check for an empty list to fail the job in case something has gone wrong. However, checkWorkers() returns null in case of problems, causing an NPE in the calling code.

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