Hi, all.
I'm testing hbase client using camel-hbase component.
But in this test, data put performance is low.
( about 20 put operation / second, I use Core i7 2700K machine.)
I confirmed performance bottleneck.
And I find bottleneck below
- Everytime camel-hbase component put data,
camel-hbase component creates and closes HTableInterface.
- But HTableInterface create cost is high.
So camel-hbase component performance is low.
I modified HBaseProducer using HTablePool,
data put performance is improved 20 operetion/second to 200 operation/second.
Modified source is below( and attach patchfile.txt)
-HBaseProducer.java(orig)
----------------------------
103 } finally {
104 table.close();
105 }
----------------------------
-HBaseProducer.java(improved)
----------------------------
103 } finally {
104 tablePool.putTable(table);
105 }
----------------------------
What should I do for contribution it.
regards.
--
#################################
Sotaro Kimura
<[email protected]>
#################################
--- HBaseProducer.java.orig 2012-10-11 12:23:40.000000000 +0900
+++ HBaseProducer.java 2012-11-26 06:29:09.000000000 +0900
@@ -101,7 +101,7 @@
mappingStrategy.applyScanResults(exchange.getOut(), new
HBaseData(scanOperationResult));
}
} finally {
- table.close();
+ tablePool.putTable(table);
}
}