1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.hadoop.hbase.mapred;
20
21 import java.io.IOException;
22 import java.util.Iterator;
23
24 import org.apache.commons.logging.Log;
25 import org.apache.commons.logging.LogFactory;
26 import org.apache.hadoop.classification.InterfaceAudience;
27 import org.apache.hadoop.classification.InterfaceStability;
28 import org.apache.hadoop.hbase.client.Put;
29 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
30 import org.apache.hadoop.mapred.MapReduceBase;
31 import org.apache.hadoop.mapred.OutputCollector;
32 import org.apache.hadoop.mapred.Reporter;
33
34
35
36
37 @Deprecated
38 @InterfaceAudience.Public
39 @InterfaceStability.Stable
40 public class IdentityTableReduce
41 extends MapReduceBase
42 implements TableReduce<ImmutableBytesWritable, Put> {
43 @SuppressWarnings("unused")
44 private static final Log LOG =
45 LogFactory.getLog(IdentityTableReduce.class.getName());
46
47
48
49
50
51
52
53
54
55 public void reduce(ImmutableBytesWritable key, Iterator<Put> values,
56 OutputCollector<ImmutableBytesWritable, Put> output,
57 Reporter reporter)
58 throws IOException {
59
60 while(values.hasNext()) {
61 output.collect(key, values.next());
62 }
63 }
64 }