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