Skip to content

Commit

Permalink
Refactoring:
Browse files Browse the repository at this point in the history
- fixed typo in comment
- changed class field to be final
  • Loading branch information
ilievladiulian committed May 3, 2023
1 parent ca18da1 commit bb38e7f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ public class IntraBrokerDiskCapacityGoal extends AbstractGoal {
private static final Logger LOG = LoggerFactory.getLogger(IntraBrokerDiskCapacityGoal.class);
private static final int MIN_NUM_VALID_WINDOWS = 1;
private static final Resource RESOURCE = Resource.DISK;
private boolean _shouldEmptyZeroCapacityDisks = false;
private final boolean _shouldEmptyZeroCapacityDisks;

/**
* Constructor for Capacity Goal.
*/
public IntraBrokerDiskCapacityGoal() {

_shouldEmptyZeroCapacityDisks = false;
}

/**
Expand All @@ -66,6 +66,7 @@ public IntraBrokerDiskCapacityGoal(boolean shouldEmptyZeroCapacityDisks) {
*/
IntraBrokerDiskCapacityGoal(BalancingConstraint constraint) {
_balancingConstraint = constraint;
_shouldEmptyZeroCapacityDisks = false;
}

@Override
Expand Down Expand Up @@ -257,7 +258,7 @@ public ModelCompletenessRequirements clusterModelCompletenessRequirements() {

/**
* Check whether the combined replica utilization is above the given disk capacity limits.
* If _shouldEmptyZeroCapacityDisks is true, the disk utilization is over limit only if it greater than 0.
* If _shouldEmptyZeroCapacityDisks is true, the disk utilization is over limit only if it is greater than 0.
*
* @param disk Disk to be checked for capacity limit violation.
* @return {@code true} if utilization is over the limit, {@code false} otherwise.
Expand Down

0 comments on commit bb38e7f

Please sign in to comment.