title: How to extract key,value pairs from hbase SequenceFile using mapreduce?
body: <p>I used the <code>Hbase Export utility tool</code> to export a hbase table into HDFS as a <code>SequenceFile</code>.</p>
  
  <p>And now I want to use a mapreduce job to process this file:</p>
  
  <pre><code>public class MapSequencefile {
          public static class MyMapper extends Mapper&lt;LongWritable, Text, Text, Text&gt;{
              @Override
              protected void map(LongWritable key, Text value,
                      Mapper&lt;LongWritable, Text, Text, Text&gt;.Context context)
                      throws IOException, InterruptedException {
                  System.out.println(key+"...."+value);
              }
          }
  
          public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException {  
  
              Configuration conf = new Configuration();
              Job job = Job.getInstance(conf , MapSequencefile.class.getSimpleName());
  
              job.setJarByClass(MapSequencefile.class);
              job.setNumReduceTasks(0);
              job.setMapperClass(MyMapper.class);
              job.setMapOutputKeyClass(Text.class);
              job.setMapOutputValueClass(Text.class);
              job.setInputFormatClass(SequenceFileInputFormat.class); //use SequenceFileInputFormat
              FileInputFormat.setInputPaths(job, "hdfs://192.16.31.10:8020/input/");
              FileOutputFormat.setOutputPath(job, new Path("hdfs://192.16.31.10:8020/out/"));
              job.waitForCompletion(true);
          }  
  }
  </code></pre>
  
  <p>but it always throws this exception:</p>
  
  <pre><code>Caused by: java.io.IOException: Could not find a deserializer for the Value class: 'org.apache.hadoop.hbase.client.Result'. Please ensure that the configuration 'io.serializations' is properly configured, if you're using custom serialization.
      at org.apache.hadoop.io.SequenceFile$Reader.init(SequenceFile.java:1964)
      at org.apache.hadoop.io.SequenceFile$Reader.initialize(SequenceFile.java:1811)
      at org.apache.hadoop.io.SequenceFile$Reader.&lt;init&gt;(SequenceFile.java:1760)
      at org.apache.hadoop.io.SequenceFile$Reader.&lt;init&gt;(SequenceFile.java:1774)
      at org.apache.hadoop.mapreduce.lib.input.SequenceFileRecordReader.initialize(SequenceFileRecordReader.java:54)
      at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:548)
  </code></pre>
  
  <p>What can i do to fix this error?</p>