This is an automated email from the ASF dual-hosted git repository.
angerszhuuuu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new 0c2d3e647 [CELEBORN-532][METRICS] Refine push-related failure metrics
(#1442)
0c2d3e647 is described below
commit 0c2d3e647de312afa1710c89a8f470581685eef3
Author: Angerszhuuuu <[email protected]>
AuthorDate: Fri Apr 21 17:05:43 2023 +0800
[CELEBORN-532][METRICS] Refine push-related failure metrics (#1442)
* [CELEBORN-532][METRICS] Refine push-related failure metrics
---
METRICS.md | 57 ++++++++++++----------
docs/monitoring.md | 7 ++-
.../service/deploy/worker/PushDataHandler.scala | 30 +++++++-----
.../service/deploy/worker/WorkerSource.scala | 14 +++++-
4 files changed, 68 insertions(+), 40 deletions(-)
diff --git a/METRICS.md b/METRICS.md
index 4f191a92e..8aa51f070 100644
--- a/METRICS.md
+++ b/METRICS.md
@@ -61,32 +61,37 @@ Here is an example of grafana dashboard importing.
## Details
-| MetricName | Role |
Description
|
-|:-------------------------:|:-----------------:|:--------------------------------------------------------------------------------------------------------------:|
-| WorkerCount | master |
The count of active workers.
|
-| BlacklistedWorkerCount | master |
The count of workers in blacklist.
|
-| OfferSlotsTime | master |
The time of offer slots.
|
-| PartitionSize | master | The estimated
partition size of last 20 flush window whose length is 15 seconds by defaults.
|
-| RegisteredShuffleCount | master and worker |
The value means count of registered shuffle.
|
-| CommitFilesTime | worker |
CommitFiles means flush and close a shuffle partition file.
|
-| ReserveSlotsTime | worker |
ReserveSlots means acquire a disk buffer and record partition location.
|
-| FlushDataTime | worker |
FlushData means flush a disk buffer to disk.
|
-| OpenStreamTime | worker | OpenStream means
read a shuffle file and send client about chunks size and stream index.
|
-| FetchChunkTime | worker |
FetchChunk means read a chunk from a shuffle file and send to client.
|
-| MasterPushDataTime | worker |
MasterPushData means handle pushdata of master partition location.
|
-| SlavePushDataTime | worker |
SlavePushData means handle pushdata of slave partition location.
|
-| PushDataFailCount | worker |
The count of failed PushData or PushMergedData.
|
-| TakeBufferTime | worker |
TakeBuffer means get a disk buffer from disk flusher.
|
-| SlotsAllocated | worker |
Slots allocated in last hour
|
-| NettyMemory | worker | The
value measures all kinds of transport memory used by netty.
|
-| SortTime | worker |
SortTime measures the time used by sorting a shuffle file.
|
-| SortMemory | worker |
SortMemory means total reserved memory for sorting shuffle files .
|
-| SortingFiles | worker |
This value means the count of sorting shuffle files.
|
-| SortedFiles | worker |
This value means the count of sorted shuffle files.
|
-| SortedFileSize | worker | This
value means the count of sorted shuffle files 's total size.
|
-| DiskBuffer | worker | Disk buffers are part of
netty used memory, means data need to write to disk but haven't been written to
disk. |
-| PausePushData | worker |
PausePushData means the count of worker stopped receiving data from client.
|
-| PausePushDataAndReplicate | worker | PausePushDataAndReplicate
means the count of worker stopped receiving data from client and other workers.
|
+| MetricName | Role |
Description
|
+|:--------------------------------------:|:-----------------:|:---------------------------------------------------------------------------------------------------------------:|
+| WorkerCount | master |
The count of active workers.
|
+| BlacklistedWorkerCount | master |
The count of workers in blacklist.
|
+| OfferSlotsTime | master |
The time of offer slots.
|
+| PartitionSize | master | The
estimated partition size of last 20 flush window whose length is 15 seconds by
defaults. |
+| RegisteredShuffleCount | master and worker |
The value means count of registered shuffle.
|
+| CommitFilesTime | worker |
CommitFiles means flush and close a shuffle partition file.
|
+| ReserveSlotsTime | worker |
ReserveSlots means acquire a disk buffer and record partition location.
|
+| FlushDataTime | worker |
FlushData means flush a disk buffer to disk.
|
+| OpenStreamTime | worker |
OpenStream means read a shuffle file and send client about chunks size and
stream index. |
+| FetchChunkTime | worker |
FetchChunk means read a chunk from a shuffle file and send to client.
|
+| MasterPushDataTime | worker |
MasterPushData means handle pushdata of master partition location.
|
+| SlavePushDataTime | worker |
SlavePushData means handle pushdata of slave partition location.
|
+| WriteDataFailCount | worker |
The count of writing PushData or PushMergedData failed in current worker.
|
+| ReplicateDataFailCount | worker |
The count of replicating PushData or PushMergedData failed in current worker.
|
+| ReplicateDataWriteFailCount | worker | The count
of replicating PushData or PushMergedData failed caused by write failure in
peer worker. |
+| ReplicateDataCreateConnectionFailCount | worker | The count of
replicating PushData or PushMergedData failed caused by creating connection
failed in peer worker. |
+| ReplicateDataConnectionExceptionCount | worker | The count of
replicating PushData or PushMergedData failed caused by connection exception in
peer worker. |
+| ReplicateDataTimeoutCount | worker | The
count of replicating PushData or PushMergedData failed caused by push timeout
in peer worker. |
+| TakeBufferTime | worker |
TakeBuffer means get a disk buffer from disk flusher.
|
+| SlotsAllocated | worker |
Slots allocated in last hour
|
+| NettyMemory | worker |
The value measures all kinds of transport memory used by netty.
|
+| SortTime | worker |
SortTime measures the time used by sorting a shuffle file.
|
+| SortMemory | worker |
SortMemory means total reserved memory for sorting shuffle files .
|
+| SortingFiles | worker |
This value means the count of sorting shuffle files.
|
+| SortedFiles | worker |
This value means the count of sorted shuffle files.
|
+| SortedFileSize | worker |
This value means the count of sorted shuffle files 's total size.
|
+| DiskBuffer | worker | Disk buffers
are part of netty used memory, means data need to write to disk but haven't
been written to disk. |
+| PausePushData | worker |
PausePushData means the count of worker stopped receiving data from client.
|
+| PausePushDataAndReplicate | worker |
PausePushDataAndReplicate means the count of worker stopped receiving data from
client and other workers. |
## Implementation
diff --git a/docs/monitoring.md b/docs/monitoring.md
index 68a15a563..7d6bb0285 100644
--- a/docs/monitoring.md
+++ b/docs/monitoring.md
@@ -125,7 +125,12 @@ These metrics are exposed by Celeborn worker.
- FetchChunkTime
- MasterPushDataTime
- SlavePushDataTime
- - PushDataFailCount
+ - WriteDataFailCount
+ - ReplicateDataFailCount
+ - ReplicateDataWriteFailCount
+ - ReplicateDataCreateConnectionFailCount
+ - ReplicateDataConnectionExceptionCount
+ - ReplicateDataTimeoutCount
- PushDataHandshakeFailCount
- RegionStartFailCount
- RegionFinishFailCount
diff --git
a/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/PushDataHandler.scala
b/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/PushDataHandler.scala
index bdd390337..d57017c38 100644
---
a/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/PushDataHandler.scala
+++
b/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/PushDataHandler.scala
@@ -218,6 +218,7 @@ class PushDataHandler extends BaseMessageHandler with
Logging {
logError(
s"While handling PushData, throw $cause, fileWriter $fileWriter has
exception.",
exception)
+ workerSource.incCounter(WorkerSource.WriteDataFailCount)
callbackWithTimer.onFailure(new CelebornIOException(cause))
return
}
@@ -240,7 +241,7 @@ class PushDataHandler extends BaseMessageHandler with
Logging {
peer.getReplicatePort)
if (unavailablePeers.containsKey(peerWorker)) {
pushData.body().release()
- workerSource.incCounter(WorkerSource.PushDataFailCount)
+
workerSource.incCounter(WorkerSource.ReplicateDataCreateConnectionFailCount)
logError(
s"PushData replication failed caused by unavailable peer for
partitionLocation: $location")
callbackWithTimer.onFailure(
@@ -284,14 +285,17 @@ class PushDataHandler extends BaseMessageHandler with
Logging {
override def onFailure(e: Throwable): Unit = {
logError(s"PushData replication failed for partitionLocation:
$location", e)
- workerSource.incCounter(WorkerSource.PushDataFailCount)
// 1. Throw PUSH_DATA_FAIL_SLAVE by slave peer worker
// 2. Throw PUSH_DATA_TIMEOUT_SLAVE by TransportResponseHandler
// 3. Throw IOException by channel, convert to
PUSH_DATA_CONNECTION_EXCEPTION_SLAVE
- if
(e.getMessage.startsWith(StatusCode.PUSH_DATA_WRITE_FAIL_SLAVE.name()) ||
-
e.getMessage.startsWith(StatusCode.PUSH_DATA_TIMEOUT_SLAVE.name())) {
+ if
(e.getMessage.startsWith(StatusCode.PUSH_DATA_WRITE_FAIL_SLAVE.name())) {
+
workerSource.incCounter(WorkerSource.ReplicateDataWriteFailCount)
+ callbackWithTimer.onFailure(e)
+ } else if
(e.getMessage.startsWith(StatusCode.PUSH_DATA_TIMEOUT_SLAVE.name())) {
+ workerSource.incCounter(WorkerSource.ReplicateDataTimeoutCount)
callbackWithTimer.onFailure(e)
} else {
+
workerSource.incCounter(WorkerSource.ReplicateDataConnectionExceptionCount)
callbackWithTimer.onFailure(
new
CelebornIOException(StatusCode.PUSH_DATA_CONNECTION_EXCEPTION_SLAVE))
}
@@ -309,7 +313,7 @@ class PushDataHandler extends BaseMessageHandler with
Logging {
case e: Exception =>
pushData.body().release()
unavailablePeers.put(peerWorker, System.currentTimeMillis())
- workerSource.incCounter(WorkerSource.PushDataFailCount)
+
workerSource.incCounter(WorkerSource.ReplicateDataCreateConnectionFailCount)
logError(
s"PushData replication failed during connecting peer for
partitionLocation: $location",
e)
@@ -478,6 +482,7 @@ class PushDataHandler extends BaseMessageHandler with
Logging {
logError(
s"While handling PushMergedData, throw $cause, fileWriter
$fileWriterWithException has exception.",
exception)
+ workerSource.incCounter(WorkerSource.WriteDataFailCount)
callbackWithTimer.onFailure(new CelebornIOException(cause))
return
}
@@ -498,7 +503,7 @@ class PushDataHandler extends BaseMessageHandler with
Logging {
peer.getReplicatePort)
if (unavailablePeers.containsKey(peerWorker)) {
pushMergedData.body().release()
- workerSource.incCounter(WorkerSource.PushDataFailCount)
+
workerSource.incCounter(WorkerSource.ReplicateDataCreateConnectionFailCount)
logError(
s"PushMergedData replication failed caused by unavailable peer
for partitionLocation: $location")
callbackWithTimer.onFailure(
@@ -536,14 +541,17 @@ class PushDataHandler extends BaseMessageHandler with
Logging {
override def onFailure(e: Throwable): Unit = {
logError(s"PushMergedData replicate failed for
partitionLocation: $location", e)
- workerSource.incCounter(WorkerSource.PushDataFailCount)
// 1. Throw PUSH_DATA_FAIL_SLAVE by slave peer worker
// 2. Throw PUSH_DATA_TIMEOUT_SLAVE by TransportResponseHandler
// 3. Throw IOException by channel, convert to
PUSH_DATA_CONNECTION_EXCEPTION_SLAVE
- if
(e.getMessage.startsWith(StatusCode.PUSH_DATA_WRITE_FAIL_SLAVE.name()) ||
-
e.getMessage.startsWith(StatusCode.PUSH_DATA_TIMEOUT_SLAVE.name())) {
+ if
(e.getMessage.startsWith(StatusCode.PUSH_DATA_WRITE_FAIL_SLAVE.name())) {
+
workerSource.incCounter(WorkerSource.ReplicateDataWriteFailCount)
+ callbackWithTimer.onFailure(e)
+ } else if
(e.getMessage.startsWith(StatusCode.PUSH_DATA_TIMEOUT_SLAVE.name())) {
+ workerSource.incCounter(WorkerSource.ReplicateDataTimeoutCount)
callbackWithTimer.onFailure(e)
} else {
+
workerSource.incCounter(WorkerSource.ReplicateDataConnectionExceptionCount)
callbackWithTimer.onFailure(
new
CelebornIOException(StatusCode.PUSH_DATA_CONNECTION_EXCEPTION_SLAVE))
}
@@ -566,7 +574,7 @@ class PushDataHandler extends BaseMessageHandler with
Logging {
case e: Exception =>
pushMergedData.body().release()
unavailablePeers.put(peerWorker, System.currentTimeMillis())
- workerSource.incCounter(WorkerSource.PushDataFailCount)
+
workerSource.incCounter(WorkerSource.ReplicateDataCreateConnectionFailCount)
logError(
s"PushMergedData replication failed during connecting peer for
partitionLocation: $location",
e)
@@ -938,7 +946,7 @@ class PushDataHandler extends BaseMessageHandler with
Logging {
workerSource.incCounter(WorkerSource.RegionFinishFailCount)
callback.onFailure(new
CelebornIOException(StatusCode.REGION_FINISH_FAIL_SLAVE, e))
case _ =>
- workerSource.incCounter(WorkerSource.PushDataFailCount)
+ workerSource.incCounter(WorkerSource.ReplicateDataFailCount)
if (e.isInstanceOf[CelebornIOException]) {
callback.onFailure(e)
} else {
diff --git
a/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/WorkerSource.scala
b/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/WorkerSource.scala
index fb9b073c6..7931ff058 100644
---
a/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/WorkerSource.scala
+++
b/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/WorkerSource.scala
@@ -27,7 +27,12 @@ class WorkerSource(conf: CelebornConf) extends
AbstractSource(conf, MetricsSyste
import WorkerSource._
// add counters
- addCounter(PushDataFailCount)
+ addCounter(WriteDataFailCount)
+ addCounter(ReplicateDataFailCount)
+ addCounter(ReplicateDataWriteFailCount)
+ addCounter(ReplicateDataCreateConnectionFailCount)
+ addCounter(ReplicateDataConnectionExceptionCount)
+ addCounter(ReplicateDataTimeoutCount)
// add Timers
addTimer(CommitFilesTime)
@@ -66,7 +71,12 @@ object WorkerSource {
// push data
val MasterPushDataTime = "MasterPushDataTime"
val SlavePushDataTime = "SlavePushDataTime"
- val PushDataFailCount = "PushDataFailCount"
+ val WriteDataFailCount = "WriteDataFailCount"
+ val ReplicateDataFailCount = "ReplicateDataFailCount"
+ val ReplicateDataWriteFailCount = "ReplicateDataWriteFailCount"
+ val ReplicateDataCreateConnectionFailCount =
"ReplicateDataCreateConnectionFailCount"
+ val ReplicateDataConnectionExceptionCount =
"ReplicateDataConnectionExceptionCount"
+ val ReplicateDataTimeoutCount = "ReplicateDataTimeoutCount"
val PushDataHandshakeFailCount = "PushDataHandshakeFailCount"
val RegionStartFailCount = "RegionStartFailCount"
val RegionFinishFailCount = "RegionFinishFailCount"