HTable is explicitly not thread-safe when using the write buffer.

> -----Original Message-----
> From: Ryan Rawson [mailto:[email protected]]
> Sent: Thursday, June 10, 2010 2:34 PM
> To: [email protected]
> Cc: hbase-user
> Subject: Re: dead-lock at HTable flusCommits with multiple clients...
> 
> I'd would need to see more of jstack to feel comfortable on calling
> this a deadlock... However, HTable is not designed to be used by
> multiple threads.  Each thread should have it's own copy of HTable.
> 
> -ryan
> 
> On Thu, Jun 10, 2010 at 2:26 PM, Sujee Maniyam <[email protected]> wrote:
> > I am importing data into Hbase with a client running 10 threads.  I
> > explicitly call 'flushCommit' from each thread (after a few thousand
> puts)
> >
> > Here is the thread-dump:
> >
> > "pool-1-thread-20" prio=10 tid=0x0000000041072800 nid=0x17d8 in
> > Object.wait() [0x00007fdaee6c8000]
> >   java.lang.Thread.State: WAITING (on object monitor)
> >        at java.lang.Object.wait(Native Method)
> >        at java.lang.Object.wait(Object.java:485)
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:721)
> >        - locked <0x00007fdb26342780> (a
> > org.apache.hadoop.hbase.ipc.HBaseClient$Call)
> >        at
> >
> org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:333)
> >        at $Proxy0.put(Unknown Source)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers$3$1.call
> (HConnectionManager.java:1243)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers$3$1.call
> (HConnectionManager.java:1241)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.getRegio
> nServerWithRetries(HConnectionManager.java:1050)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers$3.doCall
> (HConnectionManager.java:1240)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers$Batch.pr
> ocess(HConnectionManager.java:1162)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.processB
> atchOfRows(HConnectionManager.java:1248)
> >        at
> > org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:666)
> >        at org.apache.hadoop.hbase.client.HTable.put(HTable.java:510)
> >        - locked <0x00007fdafc35da30> (a
> > org.apache.hadoop.hbase.client.HTable)
> >
> > "pool-1-thread-19" prio=10 tid=0x000000004100c800 nid=0x17cd in
> > Object.wait() [0x00007fdaee7c9000]
> >   java.lang.Thread.State: WAITING (on object monitor)
> >        at java.lang.Object.wait(Native Method)
> >        at java.lang.Object.wait(Object.java:485)
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:721)
> >        - locked <0x00007fdb25b487c0> (a
> > org.apache.hadoop.hbase.ipc.HBaseClient$Call)
> >        at
> >
> org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:333)
> >        at $Proxy0.put(Unknown Source)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers$3$1.call
> (HConnectionManager.java:1243)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers$3$1.call
> (HConnectionManager.java:1241)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.getRegio
> nServerWithRetries(HConnectionManager.java:1050)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers$3.doCall
> (HConnectionManager.java:1240)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers$Batch.pr
> ocess(HConnectionManager.java:1162)
> >        at
> >
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.processB
> atchOfRows(HConnectionManager.java:1248)
> >        at
> > org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:666)
> >        at org.apache.hadoop.hbase.client.HTable.put(HTable.java:510)
> >        - locked <0x00007fdafc69d290> (a
> > org.apache.hadoop.hbase.client.HTable)
> >
> >
> > and so on...
> >
> > Is this is a known issue?  otherwise I can open a ticket.
> >
> > thanks
> > Sujee
> >
> > http://sujee.net
> >

Reply via email to