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 2014/01/16 02:28:19 UTC

[jira] [Commented] (HAMA-852) Add MessageClass property in BSPJob

    [ https://issues.apache.org/jira/browse/HAMA-852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13872914#comment-13872914 ] 

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

+1

> Add MessageClass property in BSPJob
> -----------------------------------
>
>                 Key: HAMA-852
>                 URL: https://issues.apache.org/jira/browse/HAMA-852
>             Project: Hama
>          Issue Type: Improvement
>          Components: bsp core, pipes
>    Affects Versions: 0.6.3
>            Reporter: Martin Illecker
>            Priority: Minor
>              Labels: pipes
>             Fix For: 0.7.0
>
>         Attachments: HAMA-852_v1.patch
>
>
> h3. Add MessageClass property in BSPJob
> {code}
>  +  /**
>  +   * Get the message class.
>  +   * 
>  +   * @return the message class.
>  +   */
>  +  public Class<?> getMessageClass() {
>  +    return conf.getClass(Constants.MESSAGE_CLASS, Text.class, Object.class);
>  +  }
>  +
>  +  /**
>  +   * Set the message class.
>  +   * 
>  +   * @param theClass the message class.
>  +   */
>  +  public void setMessageClass(Class<?> theClass) {
>  +    conf.setClass(Constants.MESSAGE_CLASS, theClass, Object.class);
>  +  }
> {code}
> Use *Constans.MESSAGE_CLASS*
> {code}
> -  public static final String MESSAGE_CLASS = "bsp.message.type.class";
> +  public static final String MESSAGE_CLASS = "bsp.message.class";
> {code}
> Then it would be possible to set the MessageClass by
> {code}
> -    bsp.set("bsp.message.class", DoubleWritable.class.getName());
> +    bsp.setMessageClass(DoubleWritable.class);
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)