Ok, I got it. Thank you! 2014-11-03 2:20 GMT+03:00 Sean Busbey <bus...@cloudera.com>:
> On Sun, Nov 2, 2014 at 5:09 PM, Ted Yu <yuzhih...@gmail.com> wrote: > > > bq. context.write(hbaseKey, put); //Exception here > > > > I am not mrunit expert. But as long as you call the following method > prior > > to the above method invocation, you should be able to proceed: > > > > conf.setStrings("io.serializations", conf.get("io.serializations"), > > > > MutationSerialization.class.getName(), ResultSerialization.class > > .getName(), > > > > KeyValueSerialization.class.getName()); > > > > > > Those classes are not a part of the public HBase API, so directly > referencing them is a bad idea. Doing so just sets them up to break on some > future HBase upgrade. > > The OP needs a place in MRUnit to call one of > HFileOutputFormat.configureIncrementalLoad, > HFileOutputFormat2.configureIncrementalLoad, or > TableMapReduceUtil.initTableReducerJob. Those are the only public API ways > to configure the needed Serialization. > > -- > Sean >