All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.hadoop.sample.InputConverter Maven / Gradle / Ivy

There is a newer version: 0.4
Show newest version
package org.infinispan.hadoop.sample;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.infinispan.hadoop.KeyValueConverter;

/***
 * Simple KeyValueConverter used to adapt mapper that operates on Writables
 *
 * @author Pedro Ruivo
 * @author gustavonalle
 */
public class InputConverter implements KeyValueConverter {

   @Override
   public LongWritable convertKey(Integer key) {
      return new LongWritable((long) key);
   }

   @Override
   public Text convertValue(String value) {
      return new Text(value);
   }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy