satishkotha commented on a change in pull request #1484:
URL: https://github.com/apache/incubator-hudi/pull/1484#discussion_r411749174
##########
File path: hudi-client/src/main/java/org/apache/hudi/index/hbase/HBaseIndex.java
##########
@@ -322,66 +347,94 @@ private boolean checkIfValidCommit(HoodieTableMetaClient
metaClient, String comm
/**
* Helper method to facilitate performing mutations (including puts and
deletes) in Hbase.
*/
- private void doMutations(BufferedMutator mutator, List<Mutation> mutations)
throws IOException {
+ private void doMutations(BufferedMutator mutator, List<Mutation> mutations,
RateLimiter limiter) throws IOException {
if (mutations.isEmpty()) {
return;
}
+ // report number of operations to account per second with rate limiter.
+ // If #limiter.getRate() operations are acquired within 1 second,
ratelimiter will limit the rest of calls
+ // for within that second
+ limiter.acquire(mutations.size());
mutator.mutate(mutations);
mutator.flush();
mutations.clear();
Review comment:
another question, what is the typical latency of these mutate
operations? If time taken here combined with time taken to collect
'multiPutBatchSize' is > 1 second, then it seems like limiter would generate
enough tokens for next run and would not wait at all.
----------------------------------------------------------------
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]