hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sleiman Jneidi <jneidi.slei...@gmail.com>
Subject Re: HBase Object Mapper
Date Sun, 15 Feb 2015 15:08:01 GMT
Gora requires that you generate your classes through its compiler and you
can't touch these classes , do you really want to do that??
Kundera on the other hand is JPA which is a good idea, but I don't find it
natural for HBase, for ex: row key is very important in HBase, so you can't
just have a field that represents an id like you do for a relational
database, this why in my mapper I provide a function to generate the row
key. ex:

FluentEntityMapper.builder(Foo.class, "tableName")
        .withRowKeyGenerator(new Function<Foo, String>() {
            @Override
            public String apply(Foo input) {
               return input.name + (Long.MAX_VALUE -
System.currentTimeMillis()); // reversed timestamp
              }
          })


On Sun, Feb 15, 2015 at 2:53 PM, Jean-Marc Spaggiari <
jean-marc@spaggiari.org> wrote:

> Nice,
>
> thanks for Sharing Sleiman.
>
> Can you do a quick pros and cons to compare Gora, Kundera and yours? Might
> help so see which one fits best for other people usecases?
>
> Thanks,
>
> JM
>
> 2015-02-15 9:49 GMT-05:00 Sleiman Jneidi <jneidi.sleiman@gmail.com>:
>
> > Hi Guys, hope you all had a great weekend.
> > Recently, I had  to do a lot  of HBase data access and I needed a mapper,
> > but I didn't like any of the existing mappers (Gora, Kundera, etc.. )
> maybe
> > I am mistaken. I just needed a light weight and easy to use mapper. So I
> > created one and put it on Github. It is very primitive at the moment, so
> if
> > any of you guys interested in doing some open source hacking, please give
> > me hand.
> >
> > https://github.com/SleimanJneidi/HBaseMapper
> >
> > looking forward to hearing your feedback. Thanks
> >
>

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