[
https://issues.apache.org/jira/browse/HAMA-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266850#comment-13266850
]
Suraj Menon commented on HAMA-567:
----------------------------------
Let me know if the following API access in BSPPeer is enough and named
correctly? Shall we add this in 0.5 release, considering it is a simple change
of adding a Map<String, Object> and would be needed for anyone who uses
Superstep class. Checkpointing can be added for the next release.
{code}
/**
* Save object in peer for future reference. This could be used by
* sequence of supersteps. If there is already an object saved under the key,
* calling this function overwrites the object for the key.
* @param token The String value that should be used as key to save object.
* @param value The object to be saved for the key.
*/
public void save(String token, Object value);
/**
* Returns true if there is already an object saved for the key.
* @param token The key for which we check if there is already an object
* present.
* @return Return true if object is present for the key.
*/
public boolean isObjectPresentFor(String token);
/**
* Returns the object saved for the key.
* @param token The key for which an object is to be retrieved.
* @return object The object saved with the key. If the key is not present
* the function returns null.
*/
public Object getSavedObject(String token);
{code}
> BSPPeer should provide means for chaining supersteps to share data among them.
> ------------------------------------------------------------------------------
>
> Key: HAMA-567
> URL: https://issues.apache.org/jira/browse/HAMA-567
> Project: Hama
> Issue Type: Improvement
> Components: bsp core
> Affects Versions: 0.6.0
> Reporter: Suraj Menon
> Fix For: 0.6.0
>
>
> In most scenarios, a superstep would need certain values or objects that were
> computed in the previous superstep. When using the chaining Superstep design
> to implement BSP algorithms, this gets a little ugly/difficult to implement.
> BSPPeer should provide means (preferably a map<String,Object>) so that the
> next Superstep can ask for the values in previous superstep using String
> token to query the map. Also, this map could be checkpointed periodically in
> the background so that we can completely recover the state of a task after
> failure. The BSPPeer object should have a dedicated get and set function for
> updating values in the peer.
--
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