hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Kerzner <markkerz...@gmail.com>
Subject Type mismatch
Date Thu, 03 Feb 2011 20:23:55 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message