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 Plain View
HBase >> mail # user >> maven junit test of a coprocessor


+
Wei Tan 2013-01-31, 07:27
Copy link to this message
-
Re: maven junit test of a coprocessor
If you're writing a junit test that spins up a mini cluster to test the
coprocessor, then there's no need to deploy the jar into HDFS just for
testing.  The coprocessor class should already be on your test classpath.
 In your test's setup method, you just need to either: a) add the
coprocessor class name to the configuration (as
hbase.coprocessor.region.classes) or b) to the HTableDescriptor before you
create the table.

Take a look at the following HBase test classes as an example:

org.apache.hadoop.hbase.coprocessor.TestRegionObserverInterface
org.apache.hadoop.hbase.coprocessor.TestCoprocessorEndpoint
On Wed, Jan 30, 2013 at 11:27 PM, Wei Tan <[EMAIL PROTECTED]> wrote:

> Hi,
> I am writing a maven junit test for a HBase coprocessor. The problem is
> that, I want to write a junit test that deploy the cp jar into a cluster,
> and test its function. However, test is before install so I cannot get a
> cp jar to deploy at that time.
> Is this like a chicken-and-egg problem? Any advice? Thanks!
> Wei
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