You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hama.apache.org by "Martin Illecker (JIRA)" <ji...@apache.org> on 2014/01/15 21:47:19 UTC

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

Martin Illecker created HAMA-852:
------------------------------------

             Summary: 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
             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)