Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing via htablemock or similar #13

Open
du291 opened this issue Jun 2, 2014 · 3 comments
Open

testing via htablemock or similar #13

du291 opened this issue Jun 2, 2014 · 3 comments

Comments

@du291
Copy link

du291 commented Jun 2, 2014

Hello,
what are the options on testing hbase access? I can use scalding's JobTest but that would mock out the whole source. Is there a way to use SpyGlass with some test double for the database, like htablemock? Currently I'm testing against a live hbase, but that's quite non-scalable.

@crajah
Copy link
Member

crajah commented Jun 2, 2014

Hi,

SpyGlass doesn't lend itself quite so well to mocked HBase. However, that said, yes, you can use HTableMock to test the implementation. Remember that SpyGlass takes into account region server locality as well as region locality. This has to be mocked I. HTableMock as well to ensure proper functionality in production.

Personally, is create dummy tables in an active HBase system and force splitting to test all functionality.

Cheers,
Chandan

On 2 Jun 2014, at 12:52, du291 [email protected] wrote:

Hello,
what are the options on testing hbase? I can use scalding's JobTest but that would mock out the whole source. Is there a way to use SpyGlass with some test double for the database, like htablemock? Currently I'm testing against a live hbase, but that's quite non-scalable.


Reply to this email directly or view it on GitHub.

@du291
Copy link
Author

du291 commented Jun 2, 2014

Thanks for the response. I'm a little lost with the details though. I guess "force splitting" means to make sure that table has multiple regions? Do you have an example for the HTableMock approach?

@crajah
Copy link
Member

crajah commented Jun 2, 2014

Yes. If you use the SPLITS option when creating a table you can be guaranteed to have the splits you created.

create 'tableName', 'cf1', {SPLITS => ['10','20','30','40']}

Cheers,
Chandan

On 2 Jun 2014, at 13:07, du291 [email protected] wrote:

Thanks for the response. I'm a little lost with the details though. I guess "force splitting" means to make sure that table has multiple regions? Do you have an example for the HTableMock approach?


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants