What didn't work? HBase client needs to communicate directly with cluster machines, so things like ssh gateways must be proxied through.
The java client library is multi-thread safe. You'll have a single cluster connection instance in your application. Use that connection as a factory for table instances. Use one table instance per thread. Be sure to close tables and connections when you're finished with them. On Friday, November 28, 2014, Néstor Boscán <[email protected]> wrote: > Hi > > So if I use the HBase Java API is it Thread Safe? > > Regards, > > Néstor > > On Fri, Nov 28, 2014 at 7:00 PM, Néstor Boscán <[email protected] > <javascript:;>> wrote: > > > Hi Stack > > > > Thanks for the quick response. > > > > I tried using the Hbase Java API from my laptop connecting to my HBase > > installation in a server and it didn't work. I tried adding > hbase-site.xml > > to the classpath but it couldn't find the hbase running on the server. > > > > Regards, > > > > Néstor > > > > On Fri, Nov 28, 2014 at 6:53 PM, Stack <[email protected] <javascript:;>> > wrote: > > > >> You are doing java <-> thrift <-> hbase? (Why not just use the java > client > >> directly rather than go via thrift?) > >> > >> Are you referring to the generated code > >> under > src/main/java//org/apache/hadoop/hbase/thrift/generated/Hbase.java? > >> If so, it does not look thread safe. There are some shared data members > >> and > >> there are no synchronizes in the class. > >> > >> St.Ack > >> > >> > >> On Fri, Nov 28, 2014 at 12:57 PM, Néstor Boscán <[email protected] > <javascript:;>> > >> wrote: > >> > >> > Hi > >> > > >> > I'm using the Thrift Java API on a web application. Is the > Hbase.Client > >> > thread safe? > >> > > >> > Regards, > >> > > >> > Néstor > >> > > >> > > > > >
