unit testing - How to test hbase mapreduce code? -
class reduce { private htable table = null; protected void setup() { table = new htable(context.getconfiguration,"tablename"); } public void reduce() { ... } }
i'd write unit test above code, not know how mock htable, run error (not find hbase-default.xml error..). think happened in new htable(). there methods mock object , pass reduce class?
now i'm using junit, mrunit, powermock+mockito.
Comments
Post a Comment