[ 
https://issues.apache.org/jira/browse/HBASE-25801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang resolved HBASE-25801.
-------------------------------
    Resolution: Won't Fix

Seems the interface is narrow enough.

{code}
  private void sendRegionPlansToRingBuffer(List<RegionPlan> plans, double 
currentCost,
      double initCost, String initFunctionTotalCosts, long step) {
    if (this.namedQueueRecorder != null) {
      List<String> regionPlans = new ArrayList<>();
      for (RegionPlan plan : plans) {
        regionPlans.add(
          "table: " + plan.getRegionInfo().getTable() + " , region: " + 
plan.getRegionName()
            + " , source: " + plan.getSource() + " , destination: " + 
plan.getDestination());
      }
      BalancerDecision balancerDecision =
        new BalancerDecision.Builder()
          .setInitTotalCost(initCost)
          .setInitialFunctionCosts(initFunctionTotalCosts)
          .setComputedTotalCost(currentCost)
          .setFinalFunctionCosts(totalCostsPerFunc())
          .setComputedSteps(step)
          .setRegionPlans(regionPlans).build();
      namedQueueRecorder.addRecord(new 
BalancerDecisionDetails(balancerDecision));
    }
  }
{code}

This is the only place where we use NamedQueueRecord in LoadBalancer, I think 
we could just introduce a sendRegionPlansToRingBuffer method in 
ClusterInfoProvider, and implement the actual code where we create 
BalancerDecision in MasterClusterInfoProvider, so we do not need to depend on 
NamedQueueRecord in hbase-balancer module.

Resolve as won't fix for now.

> Move NamedQueuePayload to hbase-common
> --------------------------------------
>
>                 Key: HBASE-25801
>                 URL: https://issues.apache.org/jira/browse/HBASE-25801
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Operability
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>            Priority: Major
>
> We use this class to record the balancer decision in LoadBalancer, so if we 
> want to move LoadBalancer to hbae-balancer, we also need to move 
> NamedQueueRecord related classes out of hbase-server. Since we use a system 
> table to record, hbase-client will be a suitable place.
> ====== Update ======
> A we depend on disruptor for NamedQueueRecord, I do not think it is a good 
> idea to introduce this dependency to our client library. So let's just move 
> the minimum classes to hbase-client or hbase-common instead of the whole 
> namedqueues implementation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to