hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward J. Yoon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HAMA-852) Add MessageClass property in BSPJob
Date Thu, 16 Jan 2014 01:28:19 GMT

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

Mime
View raw message