hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NNever <nnever...@gmail.com>
Subject HBase0.92: In Coprocessor's prePut method, muilt put on same HTable cause HBase crash
Date Mon, 20 Feb 2012 14:03:33 GMT
Hi~

On HBase0.92.

I write a coprosessor on table 'File'.In the prePut method,  I put several
new rows on File HTable instance. As u know , this op will trigger prePut
again.
I use this logic to realize something like "copy a File and auto copy its
all level's subfiles" .
The code seems no wrong, but everytime i trigger this coprocessor, the
HBase stuck and couldn't shutdown.
(through the log I found the coprocssor's code fall into dead-loop, but the
prePut's code don't have any place may cause dead-loop)

I try lot of times and finally get the reason: I cache the File's HTable
instance and use it like this

*private HTableInterface htFile = null;*
*...*
*@Override*
*public void prePut(...){*

*...*
*if(null == htFile){*
*   htFile = e.getEnvironment().getTable(Bytes.toBytes("File"));*
*}*
*...*
*htFile.put(some list of new puts);*
*...*

*}*

if I change the code and get HTable's instance everytime, the problem fixed.
But I want to know why* using the same Instance of HTable to put puts in
same prePut method may cause coprocessor dead-loop*?
(it just trigger prePut with same put again and again util the HBase
stuck...)

Thanks~

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message