Created
February 7, 2012 16:25
-
-
Save nstasino/1760541 to your computer and use it in GitHub Desktop.
Hadoop reuse reducer value input (buffer style)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void reduce(LongWritable key, Iterable<LongWritable> values, | |
Context context) throws IOException, InterruptedException { | |
List<LongWritable> buffer = new ArrayList<LongWritable>(); | |
List<LongWritable> buffer2 = new ArrayList<LongWritable>(); | |
for (LongWritable val : values) { | |
buffer.add(new LongWritable(val.get())); | |
buffer2.add(new LongWritable(val.get())); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment