Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # user >> Modified file gives me the same old output.

Copy link to this message
Modified file gives me the same old output.
  Following HAdoop in action, i changed the IntSumReducer like the
below, but my output continues to show the original output including
the 1s and the 2s....I verified with jad that the classfile has the
said modification.... What could i be missing...

[sitaraman@localhost hadoopplayground]$
/usr/local/Software/hadoop-2.2.0/bin/hadoop fs -cat
Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library
/usr/local/Software/hadoop-2.2.0/lib/native/libhadoop.so.1.0.0 which
might have disabled stack guard. The VM will try to fix the stack
guard now.
It's highly recommended that you fix the library with 'execstack -c
<libfile>', or link it with '-z noexecstack'.
13/12/28 18:59:53 WARN util.NativeCodeLoader: Unable to load
native-hadoop library for your platform... using builtin-java classes
where applicable
This    1
a       4
as      2
do      1
do:     1
file    1
i       2
if      1
is      4
not     1
say     1
see     4
test    4
this    4
to      4
works.  1
 public static class IntSumReducer
            extends Reducer<Text, IntWritable, Text, IntWritable> {

        private IntWritable result = new IntWritable();

        public void reduce(Text key, Iterable<IntWritable> values,
                Context context
        ) throws IOException, InterruptedException {
            int sum = 0;
            for (IntWritable val : values) {
                sum += val.get();
            if (sum >= 4) {
                context.write(key, result);