diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 663d9cd609f..56a8c9cb28b 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -457,6 +457,9 @@ Release 2.3.0 - UNRELEASED HADOOP-9652. Allow RawLocalFs#getFileLinkStatus to fill in the link owner and mode if requested. (Andrew Wang via Colin Patrick McCabe) + HADOOP-10305. Add "rpc.metrics.quantile.enable" and + "rpc.metrics.percentiles.intervals" to core-default.xml. + (Akira Ajisaka via wang) OPTIMIZATIONS diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeys.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeys.java index b12a0fb8b29..b57b3f2ce5a 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeys.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeys.java @@ -245,6 +245,7 @@ public class CommonConfigurationKeys extends CommonConfigurationKeysPublic { public static final String RPC_METRICS_QUANTILE_ENABLE = "rpc.metrics.quantile.enable"; + public static final boolean RPC_METRICS_QUANTILE_ENABLE_DEFAULT = false; public static final String RPC_METRICS_PERCENTILES_INTERVALS_KEY = "rpc.metrics.percentiles.intervals"; } diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java index 54b02277899..4b2269d6b6a 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java @@ -54,7 +54,8 @@ public class RpcMetrics { int[] intervals = conf.getInts( CommonConfigurationKeys.RPC_METRICS_PERCENTILES_INTERVALS_KEY); rpcQuantileEnable = (intervals.length > 0) && conf.getBoolean( - CommonConfigurationKeys.RPC_METRICS_QUANTILE_ENABLE, false); + CommonConfigurationKeys.RPC_METRICS_QUANTILE_ENABLE, + CommonConfigurationKeys.RPC_METRICS_QUANTILE_ENABLE_DEFAULT); if (rpcQuantileEnable) { rpcQueueTimeMillisQuantiles = new MutableQuantiles[intervals.length]; diff --git a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml index 69607009a45..a94d0c144b2 100644 --- a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml +++ b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml @@ -1275,4 +1275,26 @@ Default, "dr.who=;" will consider "dr.who" as user without groups. + + + rpc.metrics.quantile.enable + false + + Setting this property to true and rpc.metrics.percentiles.intervals + to a comma-separated list of the granularity in seconds, the + 50/75/90/95/99th percentile latency for rpc queue/processing time in + milliseconds are added to rpc metrics. + + + + + rpc.metrics.percentiles.intervals + + + A comma-separated list of the granularity in seconds for the metrics which + describe the 50/75/90/95/99th percentile latency for rpc queue/processing + time. The metrics are outputted if rpc.metrics.quantile.enable is set to + true. + +