You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Guillermo Ortiz <ko...@gmail.com> on 2014/07/24 13:52:08 UTC

HFile Reader in 0.96 and 0.98

Hi,

I am trying to make compatible HBase 0.96 with 0.98 but, I have seen that
the HFile.createReader has a new parameter "Configuration". I have been
looking for another way to get an Hfile.Reader from two versions with the
same code but I think that it's not possible, is there another way to get
an Hfile.Reader?

I would like that my code works with both versions and I could switch
versions quickly.

Re: HFile Reader in 0.96 and 0.98

Posted by Esteban Gutierrez <es...@cloudera.com>.
Hi Guillermo,

If you need a portable way to access HFiles, lets say in a MR job
the TableSnapshotInputFormat is the best option if that works for your use
case. Otherwise if you still want to use HFile.createReader() across major
releases of HBase you might want to use reflection to verify if the method
has a specific signature and then use the right one depending on the
version of HBase you want to use.

cheers,
esteban.





--
Cloudera, Inc.



On Thu, Jul 24, 2014 at 6:16 AM, Ted Yu <yu...@gmail.com> wrote:

> HFile is marked with @InterfaceAudience.Private
>
> Can you tell us a bit more about your use case ?
>
> Thanks
>
> On Jul 24, 2014, at 3:52 AM, Guillermo Ortiz <ko...@gmail.com> wrote:
>
> > Hi,
> >
> > I am trying to make compatible HBase 0.96 with 0.98 but, I have seen that
> > the HFile.createReader has a new parameter "Configuration". I have been
> > looking for another way to get an Hfile.Reader from two versions with the
> > same code but I think that it's not possible, is there another way to get
> > an Hfile.Reader?
> >
> > I would like that my code works with both versions and I could switch
> > versions quickly.
>

Re: HFile Reader in 0.96 and 0.98

Posted by Ted Yu <yu...@gmail.com>.
HFile is marked with @InterfaceAudience.Private

Can you tell us a bit more about your use case ?

Thanks

On Jul 24, 2014, at 3:52 AM, Guillermo Ortiz <ko...@gmail.com> wrote:

> Hi,
> 
> I am trying to make compatible HBase 0.96 with 0.98 but, I have seen that
> the HFile.createReader has a new parameter "Configuration". I have been
> looking for another way to get an Hfile.Reader from two versions with the
> same code but I think that it's not possible, is there another way to get
> an Hfile.Reader?
> 
> I would like that my code works with both versions and I could switch
> versions quickly.