You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hama.apache.org by "Edward J. Yoon (JIRA)" <ji...@apache.org> on 2010/10/20 03:41:26 UTC

[jira] Created: (HAMA-316) Refactoring BSPPeerInterface

Refactoring BSPPeerInterface
----------------------------

                 Key: HAMA-316
                 URL: https://issues.apache.org/jira/browse/HAMA-316
             Project: Hama
          Issue Type: Improvement
          Components: bsp
    Affects Versions: 0.2.0
            Reporter: Edward J. Yoon
            Assignee: Edward J. Yoon
             Fix For: 0.2.0


The getAddress() and getHostName() are somewhat odd to me. WDYT?

And, It would be nice if we could get the number of BSP peers and BSP messages.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HAMA-316) Renaming and Refactoring methods in BSPPeerInterface

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

Hudson commented on HAMA-316:
-----------------------------

Integrated in Hama-Patch #270 (See [https://hudson.apache.org/hudson/job/Hama-Patch/270/])
    

> Renaming and Refactoring methods in BSPPeerInterface
> ----------------------------------------------------
>
>                 Key: HAMA-316
>                 URL: https://issues.apache.org/jira/browse/HAMA-316
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp
>    Affects Versions: 0.2.0
>            Reporter: Edward J. Yoon
>            Assignee: Filipe Manana
>             Fix For: 0.2.0
>
>         Attachments: hama-316.patch, hama-316_2.patch, hama-316_fix_tests.patch
>
>
> The getAddress() and getHostName() are somewhat odd to me. WDYT?
> And, It would be nice if we could get the number of BSP peers and BSP messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HAMA-316) Renaming and Refactoring methods in BSPPeerInterface

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

Filipe Manana updated HAMA-316:
-------------------------------

    Attachment: hama-316_2.patch

In this second patch, I renamed as well the 'host' field in GroomServerStatus to 'peerName'. In fact it's used as a peer name elsewhere.

> Renaming and Refactoring methods in BSPPeerInterface
> ----------------------------------------------------
>
>                 Key: HAMA-316
>                 URL: https://issues.apache.org/jira/browse/HAMA-316
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp
>    Affects Versions: 0.2.0
>            Reporter: Edward J. Yoon
>            Assignee: Filipe Manana
>             Fix For: 0.2.0
>
>         Attachments: hama-316.patch, hama-316_2.patch
>
>
> The getAddress() and getHostName() are somewhat odd to me. WDYT?
> And, It would be nice if we could get the number of BSP peers and BSP messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HAMA-316) Renaming and Refactoring methods in BSPPeerInterface

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

Edward J. Yoon resolved HAMA-316.
---------------------------------

    Resolution: Fixed

I've just committed this. Thanks Filipe!

> Renaming and Refactoring methods in BSPPeerInterface
> ----------------------------------------------------
>
>                 Key: HAMA-316
>                 URL: https://issues.apache.org/jira/browse/HAMA-316
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp
>    Affects Versions: 0.2.0
>            Reporter: Edward J. Yoon
>            Assignee: Filipe Manana
>             Fix For: 0.2.0
>
>         Attachments: hama-316.patch, hama-316_2.patch
>
>
> The getAddress() and getHostName() are somewhat odd to me. WDYT?
> And, It would be nice if we could get the number of BSP peers and BSP messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HAMA-316) Renaming and Refactoring methods in BSPPeerInterface

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

Filipe Manana updated HAMA-316:
-------------------------------

    Attachment: hama-316_fix_tests.patch

Hi,

I made a mistake with the peer names in the test TestBSPPeer. The names should have ':' instead of '_' characters.

The following patch fixes it.
cheers


> Renaming and Refactoring methods in BSPPeerInterface
> ----------------------------------------------------
>
>                 Key: HAMA-316
>                 URL: https://issues.apache.org/jira/browse/HAMA-316
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp
>    Affects Versions: 0.2.0
>            Reporter: Edward J. Yoon
>            Assignee: Filipe Manana
>             Fix For: 0.2.0
>
>         Attachments: hama-316.patch, hama-316_2.patch, hama-316_fix_tests.patch
>
>
> The getAddress() and getHostName() are somewhat odd to me. WDYT?
> And, It would be nice if we could get the number of BSP peers and BSP messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HAMA-316) Renaming and Refactoring methods in BSPPeerInterface

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

Filipe Manana updated HAMA-316:
-------------------------------

    Attachment: hama-316.patch

So, here's the patch.
BSPPeerInterface (and BSPPeer) got simplified and cleaned up:

1) InetSocketAddress is no longer necessary. To send a message to other Peer, a Peer uses the other Peer's name (a String);

2) getHostName() got renamed to getPeerName()

3) getAllPeers() renamed to getAllPeerNames(). Also, it returns now a Set<String> instead of a Map<String, String> - the Peer doesn't need to, and neither it should, know the name of the groom servers (even if now the groom server bsp Peer relation is just 1 to 1).

4) added getNumCurrentMessages()

I didn't had a getNumPeers() since the same result can be obtained with getAllPeerNames().size() - unnecessary to extended the API just for this (imho).

Also, ClusterStatus, now uses a Map<String, String> for the list of groom servers. Keys are groom server names, values are the Peer names. When we support multiple Peers per Groom server (that is, multiple task slots) the Map should possibly be changed to Map<String, List<String>> or something similar. We'll deal with it when the time comes, what do you think?

Updated the examples PiEstimator and HelloBSP as well as some of the tests.
Also removed GroomServer.getServerName() since it was not used anywhere.

feedback please
cheers

> Renaming and Refactoring methods in BSPPeerInterface
> ----------------------------------------------------
>
>                 Key: HAMA-316
>                 URL: https://issues.apache.org/jira/browse/HAMA-316
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp
>    Affects Versions: 0.2.0
>            Reporter: Edward J. Yoon
>            Assignee: Filipe Manana
>             Fix For: 0.2.0
>
>         Attachments: hama-316.patch
>
>
> The getAddress() and getHostName() are somewhat odd to me. WDYT?
> And, It would be nice if we could get the number of BSP peers and BSP messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HAMA-316) Renaming and Refactoring methods in BSPPeerInterface

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

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

Oh.. Thanks!

> Renaming and Refactoring methods in BSPPeerInterface
> ----------------------------------------------------
>
>                 Key: HAMA-316
>                 URL: https://issues.apache.org/jira/browse/HAMA-316
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp
>    Affects Versions: 0.2.0
>            Reporter: Edward J. Yoon
>            Assignee: Filipe Manana
>             Fix For: 0.2.0
>
>         Attachments: hama-316.patch, hama-316_2.patch, hama-316_fix_tests.patch
>
>
> The getAddress() and getHostName() are somewhat odd to me. WDYT?
> And, It would be nice if we could get the number of BSP peers and BSP messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HAMA-316) Renaming and Refactoring methods in BSPPeerInterface

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

Filipe Manana commented on HAMA-316:
------------------------------------

Yes, in fact getHostName returns the same as getAddress().toString().
I can write a patch today to remove getHostName.

Oh yes, but are useful. Number of BSP peers should exclude the caller, right? (N-1)

If you don't mind I'll write patch.

cheers

> Renaming and Refactoring methods in BSPPeerInterface
> ----------------------------------------------------
>
>                 Key: HAMA-316
>                 URL: https://issues.apache.org/jira/browse/HAMA-316
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp
>    Affects Versions: 0.2.0
>            Reporter: Edward J. Yoon
>            Assignee: Edward J. Yoon
>             Fix For: 0.2.0
>
>
> The getAddress() and getHostName() are somewhat odd to me. WDYT?
> And, It would be nice if we could get the number of BSP peers and BSP messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HAMA-316) Renaming and Refactoring methods in BSPPeerInterface

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

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

hama-316_2.patch looks great! +1

> Renaming and Refactoring methods in BSPPeerInterface
> ----------------------------------------------------
>
>                 Key: HAMA-316
>                 URL: https://issues.apache.org/jira/browse/HAMA-316
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp
>    Affects Versions: 0.2.0
>            Reporter: Edward J. Yoon
>            Assignee: Filipe Manana
>             Fix For: 0.2.0
>
>         Attachments: hama-316.patch, hama-316_2.patch
>
>
> The getAddress() and getHostName() are somewhat odd to me. WDYT?
> And, It would be nice if we could get the number of BSP peers and BSP messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HAMA-316) Renaming and Refactoring methods in BSPPeerInterface

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

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

{code}
  public boolean isRunning();
{code}

In addition, ...
I'd like to remove the isRunning() method. I can't think any scenarios where this api can be used.

> Renaming and Refactoring methods in BSPPeerInterface
> ----------------------------------------------------
>
>                 Key: HAMA-316
>                 URL: https://issues.apache.org/jira/browse/HAMA-316
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp
>    Affects Versions: 0.2.0
>            Reporter: Edward J. Yoon
>            Assignee: Filipe Manana
>             Fix For: 0.2.0
>
>
> The getAddress() and getHostName() are somewhat odd to me. WDYT?
> And, It would be nice if we could get the number of BSP peers and BSP messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HAMA-316) Renaming and Refactoring methods in BSPPeerInterface

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

Edward J. Yoon reassigned HAMA-316:
-----------------------------------

    Assignee: Filipe Manana  (was: Edward J. Yoon)

>> Oh yes, but are useful. Number of BSP peers should exclude the caller, right? (N-1)

Yes. N-1.

And FYI, the number of BSP messages mean the size of BSPPeer.localQueue.

>> If you don't mind I'll write patch.

Sure, i just assigned to you. If you have some other questions, please comment here!


> Renaming and Refactoring methods in BSPPeerInterface
> ----------------------------------------------------
>
>                 Key: HAMA-316
>                 URL: https://issues.apache.org/jira/browse/HAMA-316
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp
>    Affects Versions: 0.2.0
>            Reporter: Edward J. Yoon
>            Assignee: Filipe Manana
>             Fix For: 0.2.0
>
>
> The getAddress() and getHostName() are somewhat odd to me. WDYT?
> And, It would be nice if we could get the number of BSP peers and BSP messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HAMA-316) Renaming and Refactoring methods in BSPPeerInterface

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

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

    Summary: Renaming and Refactoring methods in BSPPeerInterface  (was: Refactoring BSPPeerInterface)

> Renaming and Refactoring methods in BSPPeerInterface
> ----------------------------------------------------
>
>                 Key: HAMA-316
>                 URL: https://issues.apache.org/jira/browse/HAMA-316
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp
>    Affects Versions: 0.2.0
>            Reporter: Edward J. Yoon
>            Assignee: Edward J. Yoon
>             Fix For: 0.2.0
>
>
> The getAddress() and getHostName() are somewhat odd to me. WDYT?
> And, It would be nice if we could get the number of BSP peers and BSP messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.