phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mujtaba Chohan <mujt...@apache.org>
Subject Re: Local Phoenix installation for testing
Date Thu, 21 Jul 2016 22:50:14 GMT
Would be simpler and reliable if you used mini-cluster with Phoenix for
unit tests. In your project which should already have phoenix-core as a
dependency just extend your test class from
org.apache.phoenix.end2end.BaseHBaseManagedTimeIT which will take care of
mini cluster setup with Phoenix. Example
https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=blob;f=phoenix-pherf/src/it/java/org/apache/phoenix/pherf/SchemaReaderIT.java;h=4ff1fb506ad9d362f493ee394dbe161d4e47e501;hb=refs/heads/4.x-HBase-0.98

On Thu, Jul 21, 2016 at 2:49 PM, James Taylor <jamestaylor@apache.org>
wrote:

> Ah, I see. You can run the unit tests against a real cluster by
> setting hbase.test.cluster.distributed to true as an environment variable
> or in your hbase-site.xml. See BaseTest.isDistributedClusterModeEnabled().
> I believe the connection information is gotten from the hbase-site.xml in
> this case.
>
> HTH,
> James
>
> On Thu, Jul 21, 2016 at 2:43 PM, Simon Wang <simon.wang@airbnb.com> wrote:
>
>> I should have been more clear about the use case. I apologize.
>>
>> So we have a java service that queries Phoenix through jdbc. For security
>> reasons, directly connecting to HBase cluster from local isn’t allowed.
>> Uploading and rebuilding on remote machine every time for testing isn’t the
>> most efficient dev process. So we are wondering if we can do end2end tests
>> locally by setting up Phoenix & HBase on local machine.
>>
>> For example, a way to make Phoenix work with standalone/minicluster mode
>> HBase would be nice.
>>
>> Best,
>> Simon
>>
>> On Jul 21, 2016, at 2:37 PM, James Taylor <jamestaylor@apache.org> wrote:
>>
>> Hi Simon,
>> Do you mean to run the unit tests? There's no setup required. You can
>> directly run the unit tests through maven or Eclipse.
>> Thanks,
>> James
>>
>> On Thu, Jul 21, 2016 at 2:34 PM, Simon Wang <simon.wang@airbnb.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> Does anyone have previous experience of setting up Phoenix locally for
>>> testing purposes? I looked into HBase mini cluster but I can’t figure out
>>> how Phoenix should work with it.
>>>
>>> Thanks in advance!
>>>
>>> Best,
>>> Simon
>>
>>
>>
>>
>

Mime
View raw message