hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Beaudreault <bbeaudrea...@hubspot.com>
Subject Re: Mock HTableInterface
Date Tue, 19 May 2015 14:30:03 GMT
One possibility is fake-hbase from the guys working on kiji:

Alternatively, HTableInterface is just that, an interface. You can put
whatever implementation you want behind it. We have many implementations of
HTableInterface for a variety of use cases. At one time we had one that
backs everything by a series of maps, for testing. We've moved away from
that in favor of fake-hbase though.

Finally, mockito does work like you said, in that way you can specialize
each mocked table on a per-test basis

On Tuesday, May 19, 2015, hongbin ma <mahongbin@apache.org> wrote:

> hi, experts
> i'm looking for some mock for HTableInterface for my unit tests.
> I googled and found it can be done by mockito or minicluster.
> However, I'm looking for some HTableInterface mock that persist my data(for
> a little while before it is used), i'm not sure if mockito will do it.
> For minicluster approach, it is obviously too heavy for my unit tests.
> I know there used to be some implementations like:
> https://gist.github.com/agaoglu/613217, but seems outdated.
> https://issues.apache.org/jira/browse/HBASE-10894 seems pointing to the
> same problem as mine.
> --
> Regards,
> *Bin Mahone | 马洪宾*
> Apache Kylin: http://kylin.io
> Github: https://github.com/binmahone

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message