You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Néstor Boscán <ne...@gmail.com> on 2014/11/28 21:57:30 UTC

Is Thrift Java API Hbase.Client thread safe?

Hi

I'm using the Thrift Java API on a web application. Is the Hbase.Client
thread safe?

Regards,

Néstor

Re: Is Thrift Java API Hbase.Client thread safe?

Posted by Nick Dimiduk <nd...@gmail.com>.
Ah, okay. Yes, Hadoop and HBase usually require DNS to work properly.

On Sun, Nov 30, 2014 at 9:08 AM, Néstor Boscán <ne...@gmail.com> wrote:

> I got the error.
>
> I think it was because I have a problem with my internet network and the
> host -> ip mappings. I used the IP and it worked.
>
> Regards,
>
> Néstor
>
> On Sun, Nov 30, 2014 at 12:21 PM, Nick Dimiduk <nd...@gmail.com> wrote:
>
> > This is a local mode cluster? Is the process master running -- how did
> you
> > start HBase? Can you paste the last 100 log lines from the client and
> from
> > the server? Can you connect to the zookeeper port, 2181? You can try
> with a
> > simple network tool like telnet.
> >
> > On Sun, Nov 30, 2014 at 6:36 AM, Néstor Boscán <ne...@gmail.com>
> wrote:
> >
> > > 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 <nd...@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 <ne...@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 <nestorjb@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 <stack@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 <
> > nestorjb@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
> > > > > >> >
> > > > > >>
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Is Thrift Java API Hbase.Client thread safe?

Posted by Néstor Boscán <ne...@gmail.com>.
I got the error.

I think it was because I have a problem with my internet network and the
host -> ip mappings. I used the IP and it worked.

Regards,

Néstor

On Sun, Nov 30, 2014 at 12:21 PM, Nick Dimiduk <nd...@gmail.com> wrote:

> This is a local mode cluster? Is the process master running -- how did you
> start HBase? Can you paste the last 100 log lines from the client and from
> the server? Can you connect to the zookeeper port, 2181? You can try with a
> simple network tool like telnet.
>
> On Sun, Nov 30, 2014 at 6:36 AM, Néstor Boscán <ne...@gmail.com> wrote:
>
> > 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 <nd...@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 <ne...@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 <nestorjb@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 <stack@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 <
> nestorjb@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
> > > > >> >
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: Is Thrift Java API Hbase.Client thread safe?

Posted by Nick Dimiduk <nd...@gmail.com>.
This is a local mode cluster? Is the process master running -- how did you
start HBase? Can you paste the last 100 log lines from the client and from
the server? Can you connect to the zookeeper port, 2181? You can try with a
simple network tool like telnet.

On Sun, Nov 30, 2014 at 6:36 AM, Néstor Boscán <ne...@gmail.com> wrote:

> 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 <nd...@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 <ne...@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 <nestorjb@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 <stack@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 <nestorjb@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
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
>

Re: Is Thrift Java API Hbase.Client thread safe?

Posted by Néstor Boscán <ne...@gmail.com>.
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 <nd...@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 <ne...@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 <nestorjb@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 <stack@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 <nestorjb@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
> > >> >
> > >>
> > >
> > >
> >
>

Re: Is Thrift Java API Hbase.Client thread safe?

Posted by Néstor Boscán <ne...@tcs.com.ve>.
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.

Regards,

Néstor

On Fri, Nov 28, 2014 at 8:09 PM, Nick Dimiduk <nd...@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 <ne...@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 <nestorjb@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 <stack@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 <nestorjb@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
> > >> >
> > >>
> > >
> > >
> >
>

Re: Is Thrift Java API Hbase.Client thread safe?

Posted by Nick Dimiduk <nd...@gmail.com>.
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 <ne...@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 <nestorjb@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 <stack@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 <nestorjb@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
> >> >
> >>
> >
> >
>

Re: Is Thrift Java API Hbase.Client thread safe?

Posted by Néstor Boscán <ne...@gmail.com>.
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 <ne...@gmail.com> 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> 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 <ne...@gmail.com>
>> wrote:
>>
>> > Hi
>> >
>> > I'm using the Thrift Java API on a web application. Is the Hbase.Client
>> > thread safe?
>> >
>> > Regards,
>> >
>> > Néstor
>> >
>>
>
>

Re: Is Thrift Java API Hbase.Client thread safe?

Posted by Néstor Boscán <ne...@gmail.com>.
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> 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 <ne...@gmail.com>
> wrote:
>
> > Hi
> >
> > I'm using the Thrift Java API on a web application. Is the Hbase.Client
> > thread safe?
> >
> > Regards,
> >
> > Néstor
> >
>

Re: Is Thrift Java API Hbase.Client thread safe?

Posted by Stack <st...@duboce.net>.
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 <ne...@gmail.com> wrote:

> Hi
>
> I'm using the Thrift Java API on a web application. Is the Hbase.Client
> thread safe?
>
> Regards,
>
> Néstor
>