Hi Nick

I've changed my code so it runs with the HBase Java API 0.98.7-hadoop2
trying to connect to my HBase 0.98.7 installation in my laptop. My
hbase-site.xml in the HBase software and CLASSPATH file are this:

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>file:///C:/Desarrollo/hbase-0.98.7-hadoop2/data/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>C:\Desarrollo\hbase-0.98.7-hadoop2\data\zookeeper</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.clientPort</name>
    <value>2181</value>
  </property>
  <property>
    <name>hbase.master.port</name>
    <value>60000</value>
  </property>
  <property>
    <name>hbase.master.info.port</name>
    <value>60010</value>
  </property>
  <property>
    <name>hbase.regionserver.port</name>
    <value>60020</value>
  </property>
  <property>
    <name>hbase.regionserver.info.port</name>
    <value>60030</value>
  </property>
</configuration>

When my application tries to create the HBaseAdmin object it takes
approximately 12 seconds and when it tries to create a table it hangs.
There are no visible errors in the HBase console.

Regards,

Néstor

On Fri, Nov 28, 2014 at 8:09 PM, Nick Dimiduk <ndimi...@gmail.com> wrote:

> 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 <nesto...@gmail.com> 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 <nesto...@gmail.com
> > <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 <st...@duboce.net
> <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 <nesto...@gmail.com
> > <javascript:;>>
> > >> wrote:
> > >>
> > >> > Hi
> > >> >
> > >> > I'm using the Thrift Java API on a web application. Is the
> > Hbase.Client
> > >> > thread safe?
> > >> >
> > >> > Regards,
> > >> >
> > >> > Néstor
> > >> >
> > >>
> > >
> > >
> >
>

Reply via email to