[
https://issues.apache.org/jira/browse/HDFS-16949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17706538#comment-17706538
]
ASF GitHub Bot commented on HDFS-16949:
---------------------------------------
rdingankar commented on code in PR #5495:
URL: https://github.com/apache/hadoop/pull/5495#discussion_r1152326949
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableQuantiles.java:
##########
@@ -52,9 +52,9 @@ public class MutableQuantiles extends MutableMetric {
new Quantile(0.75, 0.025), new Quantile(0.90, 0.010),
new Quantile(0.95, 0.005), new Quantile(0.99, 0.001) };
- private final MetricsInfo numInfo;
- private final MetricsInfo[] quantileInfos;
- private final int interval;
+ private MetricsInfo numInfo;
+ private MetricsInfo[] quantileInfos;
+ private int interval;
Review Comment:
updated
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableQuantiles.java:
##########
@@ -133,7 +135,49 @@ public synchronized void add(long value) {
estimator.insert(value);
}
- public int getInterval() {
+ /**
+ * Set info about the metrics.
+ *
+ * @param numInfo info about the metrics.
+ */
+ public synchronized void setNumInfo(MetricsInfo numInfo) {
+ this.numInfo = numInfo;
+ }
+
+ /**
+ * Initialize quantileInfos array.
+ *
+ * @param length of the quantileInfos array.
+ */
+ public synchronized void setQuantileInfos(int length) {
+ this.quantileInfos = new MetricsInfo[length];
+ }
+
+ /**
+ * Add entry to quantileInfos array.
+ *
+ * @param i array index.
+ * @param info info to be added to quantileInfos array.
+ */
+ public synchronized void addQuantileInfo(int i, MetricsInfo info) {
+ this.quantileInfos[i] = info;
+ }
+
+ /**
+ * Set the rollover interval (in seconds) of the estimator.
+ *
+ * @param interval (in seconds) of the estimator.
+ */
+ public synchronized void setInterval(int interval) {
+ this.interval = interval;
Review Comment:
updated
> Update ReadTransferRate to ReadLatencyPerGB for effective percentile metrics
> ----------------------------------------------------------------------------
>
> Key: HDFS-16949
> URL: https://issues.apache.org/jira/browse/HDFS-16949
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: datanode
> Reporter: Ravindra Dingankar
> Assignee: Ravindra Dingankar
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.3.0, 3.4.0
>
>
> HDFS-16917 added ReadTransferRate quantiles to calculate the rate which data
> is read per unit of time.
> With percentiles the values are sorted in ascending order and hence for the
> transfer rate p90 gives us the value where 90 percent rates are lower
> (worse), p99 gives us the value where 99 percent values are lower (worse).
> Note that value(p90) < p(99) thus p99 is a better transfer rate as compared
> to p90.
> However as the percentile increases the value should become worse in order to
> know how good our system is.
> Hence instead of calculating the data read transfer rate, we should calculate
> it's inverse. We will instead calculate the time taken for a GB of data to be
> read. ( seconds / GB )
> After this the p90 value will give us 90 percentage of total values where the
> time taken is less than value(p90), similarly for p99 and others.
> Also p(90) < p(99) and here p(99) will become a worse value (taking more time
> each byte) as compared to p(90)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]