v3nkatesh commented on a change in pull request #685: default implementation
for HBase index qps allocator
URL: https://github.com/apache/incubator-hudi/pull/685#discussion_r286638908
##########
File path:
hoodie-client/src/main/java/com/uber/hoodie/index/hbase/HBaseIndex.java
##########
@@ -99,10 +103,32 @@ public HBaseIndex(HoodieWriteConfig config) {
}
private void init(HoodieWriteConfig config) {
- multiPutBatchSize = config.getHbaseIndexGetBatchSize();
- qpsFraction = config.getHbaseIndexQPSFraction();
- maxQpsPerRegionServer = config.getHbaseIndexMaxQPSPerRegionServer();
- putBatchSizeCalculator = new HbasePutBatchSizeCalculator();
+ this.multiPutBatchSize = config.getHbaseIndexGetBatchSize();
+ this.qpsFraction = config.getHbaseIndexQPSFraction();
+ this.maxQpsPerRegionServer = config.getHbaseIndexMaxQPSPerRegionServer();
+ this.putBatchSizeCalculator = new HbasePutBatchSizeCalculator();
+ }
+
+ public HBaseIndexQPSResourceAllocator
createQPSResourceAllocator(HoodieWriteConfig config) {
+ try {
+ logger.info("createQPSResourceAllocator :" +
config.getHBaseQPSResourceAllocatorClass());
+ final Class cl =
Class.forName(config.getHBaseQPSResourceAllocatorClass());
+ final Constructor constructor =
cl.getConstructor(HoodieWriteConfig.class);
+ final HBaseIndexQPSResourceAllocator resourceAllocator
+ = (HBaseIndexQPSResourceAllocator) constructor.newInstance(config);
+ return resourceAllocator;
+ } catch (ClassNotFoundException e) {
Review comment:
Also removed all other exceptions as it is handled at ReflectionUtils class.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services