Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Unit Test: HBase Map/Reduce


Copy link to this message
-
Unit Test: HBase Map/Reduce
Hi,

I am trying to create a unit test using the HBaseClusterTestCase and the
RowCounter example.
I am able to spin up a hbase table, load data inside, access the data
(lookup and scan), but whenever I am trying to launch a map/reduce job
(TableMapper), the map/reduce functions are never executed because the
number of splits returned byt the TableInputFormat is empty. After some
debugging, I noticed that the line (in TableInputFormatBase)
final byte [][] startKeys = table.getStartKeys();
is returning an empty array.

In fact, even if I am able to access table data using HTable#get, the
HTable#getStartKeys is returning nothing. Any ideas on this issue ?
Also, do someone have some advices/examples on how to write and run unit
tests involving hbase ?

Thanks,
Regards
--
Renaud Delbru
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB