2020 *
2121 * @param nodeId Node ID.
2222 * @param totalWriteThreadPoolThreads Total number of threads in the write thread pool.
23- * @param percentWriteThreadPoolUtilization Percent of write thread pool threads that are in use, averaged over some period of time.
24- * @param maxTaskTimeInWriteQueueMillis How long the oldest task (next to be run) in the write thread pool queue has been queued . Zero if
25- * there is no write thread pool queue .
23+ * @param averageWriteThreadPoolUtilization Percent of write thread pool threads that are in use, averaged over some period of time.
24+ * @param averageWriteThreadPoolQueueLatencyMillis How much time tasks spend in the write thread pool queue. Zero if there is nothing being
25+ * queued in the write thread pool.
2626 */
2727public record NodeWriteLoad (
2828 String nodeId ,
2929 int totalWriteThreadPoolThreads ,
30- int percentWriteThreadPoolUtilization ,
31- long maxTaskTimeInWriteQueueMillis
30+ float averageWriteThreadPoolUtilization ,
31+ long averageWriteThreadPoolQueueLatencyMillis
3232) implements Writeable {
3333
3434 public NodeWriteLoad (StreamInput in ) throws IOException {
@@ -39,8 +39,8 @@ public NodeWriteLoad(StreamInput in) throws IOException {
3939 public void writeTo (StreamOutput out ) throws IOException {
4040 out .writeString (this .nodeId );
4141 out .writeVInt (this .totalWriteThreadPoolThreads );
42- out .writeVInt (this .percentWriteThreadPoolUtilization );
43- out .writeVLong (this .maxTaskTimeInWriteQueueMillis );
42+ out .writeDouble (this .averageWriteThreadPoolUtilization );
43+ out .writeVLong (this .averageWriteThreadPoolQueueLatencyMillis );
4444 }
4545
4646 @ Override
@@ -50,8 +50,8 @@ public boolean equals(Object o) {
5050 NodeWriteLoad other = (NodeWriteLoad ) o ;
5151 return nodeId .equals (other .nodeId )
5252 && totalWriteThreadPoolThreads == other .totalWriteThreadPoolThreads
53- && percentWriteThreadPoolUtilization == other .percentWriteThreadPoolUtilization
54- && maxTaskTimeInWriteQueueMillis == other .maxTaskTimeInWriteQueueMillis ;
53+ && averageWriteThreadPoolUtilization == other .averageWriteThreadPoolUtilization
54+ && averageWriteThreadPoolQueueLatencyMillis == other .averageWriteThreadPoolQueueLatencyMillis ;
5555 }
5656
5757 @ Override
@@ -61,10 +61,10 @@ public String toString() {
6161 + nodeId
6262 + "], totalWriteThreadPoolThreads=["
6363 + totalWriteThreadPoolThreads
64- + "], percentWriteThreadPoolUtilization =["
65- + percentWriteThreadPoolUtilization
66- + "], maxTaskTimeInWriteQueueMillis =["
67- + maxTaskTimeInWriteQueueMillis
64+ + "], averageWriteThreadPoolUtilization =["
65+ + averageWriteThreadPoolUtilization
66+ + "], averageWriteThreadPoolQueueLatencyMillis =["
67+ + averageWriteThreadPoolQueueLatencyMillis
6868 + "]}" ;
6969 }
7070
0 commit comments