Hi,

I have this code to read and write to HBase from MR, and it works fine with
0 reducers, but it gives a type mismatch error when with 1 reducer. What
should I look at? *Thank you!*

*Code:*

    static class RowCounterMapper
            extends TableMapper<Text, IntWritable> {

        private static enum Counters {

            ROWS
        }

        @Override
        public void map(ImmutableBytesWritable row, Result values, Context
context)
                throws IOException, InterruptedException {
            for (KeyValue value : values.list()) {
                if (value.getValue().length > 0) {
                    Text key = new Text(value.getValue());
                    context.write(key, ONE);
                }
            }
        }
    }

*Error: *

java.io.IOException: Type mismatch in key from map: expected
org.apache.hadoop.hbase.io.ImmutableBytesWritable, recieved
org.apache.hadoop.io.Text

Reply via email to