Uploaded image for project: 'Hama'
  1. Hama
  2. HAMA-852

Add MessageClass property in BSPJob

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.6.3
    • 0.7.0
    • bsp core, pipes

    Description

      Add MessageClass property in BSPJob

       +  /**
       +   * 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);
       +  }
      

      Use Constans.MESSAGE_CLASS

      -  public static final String MESSAGE_CLASS = "bsp.message.type.class";
      +  public static final String MESSAGE_CLASS = "bsp.message.class";
      

      Then it would be possible to set the MessageClass by

      -    bsp.set("bsp.message.class", DoubleWritable.class.getName());
      +    bsp.setMessageClass(DoubleWritable.class);
      

      Attachments

        1. HAMA-852_v1.patch
          6 kB
          Martin Illecker

        Activity

          People

            bafu Martin Illecker
            bafu Martin Illecker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: