hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Illecker (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HAMA-852) Add MessageClass property in BSPJob
Date Wed, 15 Jan 2014 20:47:19 GMT
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)

Mime
View raw message