|
|
-
maven junit test of a coprocessor
Wei Tan 2013-01-31, 07:27
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
+
Wei Tan 2013-01-31, 07:27
-
Re: maven junit test of a coprocessor
Gary Helmling 2013-01-31, 17:24
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
+
Gary Helmling 2013-01-31, 17:24
|
|
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by
Sematext