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~