On 19 Aug 2010, at 17:24, Stack wrote: > @ Andrew: Your HTable mock sounds interesting. Do you think it > others would find it useful and if so, would you consider contributing > it?
I just used Mockito in my tests, captured the Puts etc and checked that they had the data I expected them to have. I was really only testing that I'd turned my objects into byte arrays and was putting them in the right place. I left the workings of HBase to it's self and just assumed it was working. Andrew > > @Imran, on 2.), James Kennedy and his cohort are working on making > THBase work w/ 0.89/0.90 hbase. See their github repo for the latest > state. > > St.Ack > > On Wed, Aug 18, 2010 at 11:10 PM, Andrew McCall > <[email protected]> wrote: >> >> On 19 Aug 2010, at 05:57, Imran M Yousuf wrote: >> >>> Hi, >>> >>> I need some clarification on the following issues - >>> >>> 1. TransactionalTable seems to be present in the current API docs, >>> does that mean it will be present in the course of 0.89 and continue >>> to 0.90? >>> >>> 2. Is there a way to start up a single node in memory HBase server >>> programatically? I want to do it from a JUnit class to use it from >>> within some tests. Where can I find some sample code in this regard? >>> >> >> I can't offer any insight on the first, but I encountered the same issues as >> you in the second. In the end there wasn't anyway to bring a HBase instance >> up I felt was fast enough to be useful in tests. >> >> I went with mock objects, which is probably better anyway since you >> shouldn't really need to test the HBase code in your unit tests. >> >> I mocked HTable in my tests and just made sure I was putting what I expected >> for writes and returned what I expected HBase to return for reads. >> >> Andrew
