You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/09/03 18:22:06 UTC

[GitHub] [hbase] virajjasani commented on pull request #2261: HBASE-24528 : BalancerDecision queue implementation in HMaster with Admin API

virajjasani commented on pull request #2261:
URL: https://github.com/apache/hbase/pull/2261#issuecomment-686667507


   I am considering to use the same filter based approach I did for the slow log method in Admin.java, where a `LogEntryFilter` can express a limit.
   `LogEntryFilter` expresses "limit" for slow/large log and similarly `BalancerDecisionRequest` expresses "limit" for balancerDecision.
   Both have built-in "limit" values and user can change it, but without constructing LogEntryFilter/BalancerDecisionRequest objects, user can not even invoke Admin.getLogEntries API. So either default or user provided "limit" will definitely reach to Admin.getLogEntries().
   
   ```
   1.
   public class BalancerDecisionRequest extends LogRequest {
   ...
     private int limit = 250;
   ...
   ...
   
   2.
   public class LogQueryFilter extends LogRequest {
   ...
   ...
     private int limit = 10;
   ...
   ...
   ```
   Admin.getLogEntries() takes one argument, which is object of either of above classes, hence we are already passing `limit` with this object.
   
   Here is how shell invokes call to Admin.getLogEntries:
   ```
       def get_balancer_decisions(args)
         balancer_decisions_req = org.apache.hadoop.hbase.client.BalancerDecisionRequest.new
         if args.key? 'LIMIT'   
           limit = args['LIMIT']
           balancer_decisions_req.setLimit(limit)   # if user provided limit in shell argument, use it, else default will be used.
         end
         balancer_decisions_responses = @admin.getLogEntries(balancer_decisions_req)
   ...
   ...
   ```


----------------------------------------------------------------
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:
users@infra.apache.org