You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Jakob Homan (Created) (JIRA)" <ji...@apache.org> on 2012/01/30 21:25:10 UTC

[jira] [Created] (GIRAPH-132) Simplify boolean expression in GraphMapper::map()

Simplify boolean expression in GraphMapper::map()
-------------------------------------------------

                 Key: GIRAPH-132
                 URL: https://issues.apache.org/jira/browse/GIRAPH-132
             Project: Giraph
          Issue Type: Improvement
            Reporter: Jakob Homan
            Priority: Trivial


The boolean expression in:
{noformat}    @Override
    public void map(Object key, Object value, Context context)
        throws IOException, InterruptedException {
        // map() only does computation
        // 1) Run checkpoint per frequency policy.
        // 2) For every vertex on this mapper, run the compute() function
        // 3) Wait until all messaging is done.
        // 4) Check if all vertices are done.  If not goto 2).
        // 5) Dump output.
        if (done == true) {
            return;
        }{noformat}
can be simplified.

--
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-132) Simplify boolean expression in GraphMapper::map()

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

Eli Reisman commented on GIRAPH-132:
------------------------------------

This seems to have been fixed already but is still on this list. Don't know who did it. Looking at GraphMapper::map() I see this:

@Override
  public void map(Object key, Object value, Context context)
    throws IOException, InterruptedException {
    // map() only does computation
    // 1) Run checkpoint per frequency policy.
    // 2) For every vertex on this mapper, run the compute() function
    // 3) Wait until all messaging is done.
    // 4) Check if all vertices are done.  If not goto 2).
    // 5) Dump output.
    if (done) {
      return;
    }
...more code...

just letting everyone know, this might be resolved already?

                
> Simplify boolean expression in GraphMapper::map()
> -------------------------------------------------
>
>                 Key: GIRAPH-132
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-132
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Jakob Homan
>            Priority: Trivial
>              Labels: newbie
>
> The boolean expression in:
> {noformat}    @Override
>     public void map(Object key, Object value, Context context)
>         throws IOException, InterruptedException {
>         // map() only does computation
>         // 1) Run checkpoint per frequency policy.
>         // 2) For every vertex on this mapper, run the compute() function
>         // 3) Wait until all messaging is done.
>         // 4) Check if all vertices are done.  If not goto 2).
>         // 5) Dump output.
>         if (done == true) {
>             return;
>         }{noformat}
> can be simplified.

--
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-132) Simplify boolean expression in GraphMapper::map()

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

Jakob Homan commented on GIRAPH-132:
------------------------------------

bq. Unsure what you mean here – is it to refine the comments or the way map() itself is implemented per that?
{{done == true}} is redundant.
                
> Simplify boolean expression in GraphMapper::map()
> -------------------------------------------------
>
>                 Key: GIRAPH-132
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-132
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Jakob Homan
>            Priority: Trivial
>              Labels: newbie
>
> The boolean expression in:
> {noformat}    @Override
>     public void map(Object key, Object value, Context context)
>         throws IOException, InterruptedException {
>         // map() only does computation
>         // 1) Run checkpoint per frequency policy.
>         // 2) For every vertex on this mapper, run the compute() function
>         // 3) Wait until all messaging is done.
>         // 4) Check if all vertices are done.  If not goto 2).
>         // 5) Dump output.
>         if (done == true) {
>             return;
>         }{noformat}
> can be simplified.

--
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] [Resolved] (GIRAPH-132) Simplify boolean expression in GraphMapper::map()

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

Avery Ching resolved GIRAPH-132.
--------------------------------

    Resolution: Not A Problem

Thanks Eli, this was resolved in the massive checkstyle fix (GIRAPH-40).
                
> Simplify boolean expression in GraphMapper::map()
> -------------------------------------------------
>
>                 Key: GIRAPH-132
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-132
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Jakob Homan
>            Priority: Trivial
>              Labels: newbie
>
> The boolean expression in:
> {noformat}    @Override
>     public void map(Object key, Object value, Context context)
>         throws IOException, InterruptedException {
>         // map() only does computation
>         // 1) Run checkpoint per frequency policy.
>         // 2) For every vertex on this mapper, run the compute() function
>         // 3) Wait until all messaging is done.
>         // 4) Check if all vertices are done.  If not goto 2).
>         // 5) Dump output.
>         if (done == true) {
>             return;
>         }{noformat}
> can be simplified.

--
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-132) Simplify boolean expression in GraphMapper::map()

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

Harsh J commented on GIRAPH-132:
--------------------------------

Unsure what you mean here -- is it to refine the comments or the way map() itself is implemented per that?
                
> Simplify boolean expression in GraphMapper::map()
> -------------------------------------------------
>
>                 Key: GIRAPH-132
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-132
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Jakob Homan
>            Priority: Trivial
>              Labels: newbie
>
> The boolean expression in:
> {noformat}    @Override
>     public void map(Object key, Object value, Context context)
>         throws IOException, InterruptedException {
>         // map() only does computation
>         // 1) Run checkpoint per frequency policy.
>         // 2) For every vertex on this mapper, run the compute() function
>         // 3) Wait until all messaging is done.
>         // 4) Check if all vertices are done.  If not goto 2).
>         // 5) Dump output.
>         if (done == true) {
>             return;
>         }{noformat}
> can be simplified.

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