HDFS-10600. PlanCommand#getThrsholdPercentage should not use throughput value. (Yiqun Lin via lei)
This commit is contained in:
parent
429347289c
commit
382dff7475
|
@ -947,9 +947,9 @@ public class DFSConfigKeys extends CommonConfigurationKeys {
|
||||||
"dfs.disk.balancer.enabled";
|
"dfs.disk.balancer.enabled";
|
||||||
public static final boolean DFS_DISK_BALANCER_ENABLED_DEFAULT = false;
|
public static final boolean DFS_DISK_BALANCER_ENABLED_DEFAULT = false;
|
||||||
|
|
||||||
public static final String DFS_DISK_BALANCER_MAX_DISK_THRUPUT =
|
public static final String DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT =
|
||||||
"dfs.disk.balancer.max.disk.throughputInMBperSec";
|
"dfs.disk.balancer.max.disk.throughputInMBperSec";
|
||||||
public static final int DFS_DISK_BALANCER_MAX_DISK_THRUPUT_DEFAULT =
|
public static final int DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT_DEFAULT =
|
||||||
10;
|
10;
|
||||||
|
|
||||||
public static final String DFS_DISK_BALANCER_MAX_DISK_ERRORS =
|
public static final String DFS_DISK_BALANCER_MAX_DISK_ERRORS =
|
||||||
|
@ -961,6 +961,10 @@ public class DFSConfigKeys extends CommonConfigurationKeys {
|
||||||
"dfs.disk.balancer.block.tolerance.percent";
|
"dfs.disk.balancer.block.tolerance.percent";
|
||||||
public static final int DFS_DISK_BALANCER_BLOCK_TOLERANCE_DEFAULT = 5;
|
public static final int DFS_DISK_BALANCER_BLOCK_TOLERANCE_DEFAULT = 5;
|
||||||
|
|
||||||
|
public static final String DFS_DISK_BALANCER_PLAN_THRESHOLD =
|
||||||
|
"dfs.disk.balancer.plan.threshold.percent";
|
||||||
|
public static final int DFS_DISK_BALANCER_PLAN_THRESHOLD_DEFAULT = 10;
|
||||||
|
|
||||||
|
|
||||||
// dfs.client.retry confs are moved to HdfsClientConfigKeys.Retry
|
// dfs.client.retry confs are moved to HdfsClientConfigKeys.Retry
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|
|
@ -109,8 +109,8 @@ public class DiskBalancer {
|
||||||
DFSConfigKeys.DFS_DISK_BALANCER_ENABLED,
|
DFSConfigKeys.DFS_DISK_BALANCER_ENABLED,
|
||||||
DFSConfigKeys.DFS_DISK_BALANCER_ENABLED_DEFAULT);
|
DFSConfigKeys.DFS_DISK_BALANCER_ENABLED_DEFAULT);
|
||||||
this.bandwidth = conf.getInt(
|
this.bandwidth = conf.getInt(
|
||||||
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT,
|
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT,
|
||||||
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT_DEFAULT);
|
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -656,8 +656,8 @@ public class DiskBalancer {
|
||||||
shouldRun = new AtomicBoolean(false);
|
shouldRun = new AtomicBoolean(false);
|
||||||
|
|
||||||
this.diskBandwidth = conf.getLong(
|
this.diskBandwidth = conf.getLong(
|
||||||
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT,
|
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT,
|
||||||
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT_DEFAULT);
|
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT_DEFAULT);
|
||||||
|
|
||||||
this.blockTolerance = conf.getLong(
|
this.blockTolerance = conf.getLong(
|
||||||
DFSConfigKeys.DFS_DISK_BALANCER_BLOCK_TOLERANCE,
|
DFSConfigKeys.DFS_DISK_BALANCER_BLOCK_TOLERANCE,
|
||||||
|
@ -673,7 +673,7 @@ public class DiskBalancer {
|
||||||
LOG.debug("Found 0 or less as max disk throughput, ignoring config " +
|
LOG.debug("Found 0 or less as max disk throughput, ignoring config " +
|
||||||
"value. value : " + diskBandwidth);
|
"value. value : " + diskBandwidth);
|
||||||
diskBandwidth =
|
diskBandwidth =
|
||||||
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT_DEFAULT;
|
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT_DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.blockTolerance <= 0) {
|
if (this.blockTolerance <= 0) {
|
||||||
|
|
|
@ -214,8 +214,8 @@ public class PlanCommand extends Command {
|
||||||
|
|
||||||
if ((value <= 0.0) || (value > 100.0)) {
|
if ((value <= 0.0) || (value > 100.0)) {
|
||||||
value = getConf().getDouble(
|
value = getConf().getDouble(
|
||||||
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT,
|
DFSConfigKeys.DFS_DISK_BALANCER_PLAN_THRESHOLD,
|
||||||
DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT_DEFAULT);
|
DFSConfigKeys.DFS_DISK_BALANCER_PLAN_THRESHOLD_DEFAULT);
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4158,4 +4158,13 @@
|
||||||
balancer is disabled.
|
balancer is disabled.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<property>
|
||||||
|
<name>dfs.disk.balancer.plan.threshold.percent</name>
|
||||||
|
<value>10</value>
|
||||||
|
<description>
|
||||||
|
The percentage that disk tolerance that we are ok with in
|
||||||
|
a plan.
|
||||||
|
</description>
|
||||||
|
</property>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
Loading…
Reference in New Issue