You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hama.apache.org by "Yuesheng Hu (JIRA)" <ji...@apache.org> on 2012/09/24 10:13:07 UTC

[jira] [Created] (HAMA-648) Fix supercount in BSPPeer

Yuesheng Hu created HAMA-648:
--------------------------------

             Summary: Fix supercount in BSPPeer
                 Key: HAMA-648
                 URL: https://issues.apache.org/jira/browse/HAMA-648
             Project: Hama
          Issue Type: Bug
          Components: bsp core
    Affects Versions: 0.5.0
            Reporter: Yuesheng Hu
            Assignee: Yuesheng Hu
             Fix For: 0.6.0


Because super-step start with 0, so the superstep cout should be current Superstep - 1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HAMA-648) Fix supercount in BSPPeer

Posted by "Edward J. Yoon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HAMA-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462445#comment-13462445 ] 

Edward J. Yoon commented on HAMA-648:
-------------------------------------

I think, you can verify whether superstep counter is working correctly as following:

{code}
bsp() {

  for (int i = 0; i < 10; i++) {
    assertEquals(i, peer.getSuperstepCount());
    peer.sync();
  }

}
{code}
                
> Fix supercount in BSPPeer
> -------------------------
>
>                 Key: HAMA-648
>                 URL: https://issues.apache.org/jira/browse/HAMA-648
>             Project: Hama
>          Issue Type: Bug
>          Components: bsp core
>    Affects Versions: 0.5.0
>            Reporter: Yuesheng Hu
>            Assignee: Yuesheng Hu
>             Fix For: 0.6.0
>
>         Attachments: HAMA-648.patch
>
>
> Because super-step start with 0, so the superstep cout should be current Superstep - 1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HAMA-648) Fix supercount in BSPPeer

Posted by "Yuesheng Hu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HAMA-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462569#comment-13462569 ] 

Yuesheng Hu commented on HAMA-648:
----------------------------------

If I put the peer.getSuperstepCount() before peer.sync(), like this:
{code}
      for (int i = 0; i < 5; i++) {
        System.out.println("Before sync(), getSuperstepCount: "
            + peer.getSuperstepCount());
        peer.sync();
      }
{code}
The output is:
{code}
INFO: Running job: job_localrunner_0001
Sep 25, 2012 4:34:31 PM org.apache.hama.bsp.LocalBSPRunner$LocalSyncClient init
INFO: Setting up a new barrier for 1 tasks!
Before sync(), getSuperstepCount: 0
Before sync(), getSuperstepCount: 1
Before sync(), getSuperstepCount: 2
Before sync(), getSuperstepCount: 3
Before sync(), getSuperstepCount: 4
Sep 25, 2012 4:34:34 PM org.apache.hama.bsp.BSPJobClient monitorAndPrintJob
INFO: Current supersteps number: 4
Sep 25, 2012 4:34:34 PM org.apache.hama.bsp.BSPJobClient monitorAndPrintJob
INFO: The total number of supersteps: 4
Sep 25, 2012 4:34:34 PM org.apache.hama.bsp.Counters log
{code}

else if put the peer.getSuperstepCount() after peer.sync(), 
{code}
      for (int i = 0; i < 5; i++) {
        peer.sync();
        System.out.println("Before sync(), getSuperstepCount: "
            + peer.getSuperstepCount());
      }
{code}

The output is:
{code}
INFO: Running job: job_localrunner_0001
Sep 25, 2012 4:36:21 PM org.apache.hama.bsp.LocalBSPRunner$LocalSyncClient init
INFO: Setting up a new barrier for 1 tasks!
After sync(), getSuperstepCount: 1
After sync(), getSuperstepCount: 2
After sync(), getSuperstepCount: 3
After sync(), getSuperstepCount: 4
After sync(), getSuperstepCount: 5
Sep 25, 2012 4:36:24 PM org.apache.hama.bsp.BSPJobClient monitorAndPrintJob
INFO: Current supersteps number: 4
Sep 25, 2012 4:36:24 PM org.apache.hama.bsp.BSPJobClient monitorAndPrintJob
INFO: The total number of supersteps: 4
Sep 25, 2012 4:36:24 PM org.apache.hama.bsp.Counters log
{code}
Test run without HAMA-648.patch. It looks like puting peer.getSuperstepCount() before peer.sync() is consistent with the Counter
                
> Fix supercount in BSPPeer
> -------------------------
>
>                 Key: HAMA-648
>                 URL: https://issues.apache.org/jira/browse/HAMA-648
>             Project: Hama
>          Issue Type: Bug
>          Components: bsp core
>    Affects Versions: 0.5.0
>            Reporter: Yuesheng Hu
>            Assignee: Yuesheng Hu
>             Fix For: 0.6.0
>
>         Attachments: HAMA-648.patch
>
>
> Because super-step start with 0, so the superstep cout should be current Superstep - 1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HAMA-648) Fix supercount in BSPPeer

Posted by "Edward J. Yoon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HAMA-648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edward J. Yoon updated HAMA-648:
--------------------------------

    Resolution: Won't Fix
        Status: Resolved  (was: Patch Available)

Won't fix.
                
> Fix supercount in BSPPeer
> -------------------------
>
>                 Key: HAMA-648
>                 URL: https://issues.apache.org/jira/browse/HAMA-648
>             Project: Hama
>          Issue Type: Bug
>          Components: bsp core
>    Affects Versions: 0.5.0
>            Reporter: Yuesheng Hu
>            Assignee: Yuesheng Hu
>             Fix For: 0.6.0
>
>         Attachments: HAMA-648.patch
>
>
> Because super-step start with 0, so the superstep cout should be current Superstep - 1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HAMA-648) Fix supercount in BSPPeer

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

Yuesheng Hu updated HAMA-648:
-----------------------------

    Status: Patch Available  (was: Open)
    
> Fix supercount in BSPPeer
> -------------------------
>
>                 Key: HAMA-648
>                 URL: https://issues.apache.org/jira/browse/HAMA-648
>             Project: Hama
>          Issue Type: Bug
>          Components: bsp core
>    Affects Versions: 0.5.0
>            Reporter: Yuesheng Hu
>            Assignee: Yuesheng Hu
>             Fix For: 0.6.0
>
>         Attachments: HAMA-648.patch
>
>
> Because super-step start with 0, so the superstep cout should be current Superstep - 1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HAMA-648) Fix supercount in BSPPeer

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

Yuesheng Hu updated HAMA-648:
-----------------------------

    Attachment: HAMA-648.patch
    
> Fix supercount in BSPPeer
> -------------------------
>
>                 Key: HAMA-648
>                 URL: https://issues.apache.org/jira/browse/HAMA-648
>             Project: Hama
>          Issue Type: Bug
>          Components: bsp core
>    Affects Versions: 0.5.0
>            Reporter: Yuesheng Hu
>            Assignee: Yuesheng Hu
>             Fix For: 0.6.0
>
>         Attachments: HAMA-648.patch
>
>
> Because super-step start with 0, so the superstep cout should be current Superstep - 1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HAMA-648) Fix supercount in BSPPeer

Posted by "Yuesheng Hu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HAMA-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462395#comment-13462395 ] 

Yuesheng Hu commented on HAMA-648:
----------------------------------

hi edward,
Sorry for my mistake, it should be superstep + 1, not superstep - 1.

This is a little complicated, the return value of getSuperstepCount depend on where you use the method, before sync() the superstep is *S*, after sync() it is *S + 1*. So, in kmeansBSP, we should put the clause "if (maxIterations > 0 && maxIterations < peer.getSuperstepCount())" before sync() (also need before "assignCenters(peer)", otherwise, one additional "assignCenters(peer);" will execute. 

My opinion: the getSuperstepCount method can remain unchanged, but user have to take care of the position where you put the method(before sync() or after).
                
> Fix supercount in BSPPeer
> -------------------------
>
>                 Key: HAMA-648
>                 URL: https://issues.apache.org/jira/browse/HAMA-648
>             Project: Hama
>          Issue Type: Bug
>          Components: bsp core
>    Affects Versions: 0.5.0
>            Reporter: Yuesheng Hu
>            Assignee: Yuesheng Hu
>             Fix For: 0.6.0
>
>         Attachments: HAMA-648.patch
>
>
> Because super-step start with 0, so the superstep cout should be current Superstep - 1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HAMA-648) Fix supercount in BSPPeer

Posted by "Edward J. Yoon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HAMA-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461826#comment-13461826 ] 

Edward J. Yoon commented on HAMA-648:
-------------------------------------

Hi, could you please provide unit test for this?
                
> Fix supercount in BSPPeer
> -------------------------
>
>                 Key: HAMA-648
>                 URL: https://issues.apache.org/jira/browse/HAMA-648
>             Project: Hama
>          Issue Type: Bug
>          Components: bsp core
>    Affects Versions: 0.5.0
>            Reporter: Yuesheng Hu
>            Assignee: Yuesheng Hu
>             Fix For: 0.6.0
>
>         Attachments: HAMA-648.patch
>
>
> Because super-step start with 0, so the superstep cout should be current Superstep - 1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira