s0nskar opened a new pull request, #2672:
URL: https://github.com/apache/celeborn/pull/2672
### What changes were proposed in this pull request?
Adding option to choose between human friendly vs single line logging.
Currently changes are done only for `WorkerInfo` and `StorageManager`. I will
extend these to other places as well.
### Why are the changes needed?
Currently lot of Celeborn logging is done in multiline format, which makes
it human readable but at the same time this is not search/ingestion friendly if
we process these logs they get mixed with other logs generated during same
timestamp which makes it difficult to use the logs.
Ex –
```
s"""
|Host: $host
|RpcPort: $rpcPort
|PushPort: $pushPort
|FetchPort: $fetchPort
|ReplicatePort: $replicatePort
|InternalPort: $internalPort
|SlotsUsed: $slots
|LastHeartbeat: $lastHeartbeat
|HeartbeatElapsedSeconds: ${TimeUnit.MILLISECONDS.toSeconds(
System.currentTimeMillis() - lastHeartbeat)}
|Disks: $diskInfosString
|UserResourceConsumption: $userResourceConsumptionString
|WorkerRef: $endpoint
|WorkerStatus: $workerStatus
|""".stripMargin
```
Logs after ingestion
```
2024-07-30T12:33:18+05:30 ReplicatePort: 40643
2024-07-30T12:33:18+05:30 SlotsUsed: 0
2024-07-30T12:33:18+05:30 PushPort: 44507
2024-07-30T12:33:18+05:30 InternalPort: 35331
2024-07-30T12:33:18+05:30 HeartbeatElapsedSeconds: 1722322998
2024-07-30T12:33:18+05:30 07:03:18.377 [celeborn-dispatcher-53] INFO
org.apache.celeborn.service.deploy.master.Master - Registered worker
2024-07-30T12:33:18+05:30 RpcPort: 35331
2024-07-30T12:33:18+05:30 UserIdentifier: `default`.`default`,
ResourceConsumption: ResourceConsumption(diskBytesWritten: 0.0 B,
diskFileCount: 0, hdfsBytesWritten: 0.0 B, hdfsFileCount: 0,
subResourceConsumptions: empty)
2024-07-30T12:33:18+05:30 WorkerStatus: WorkerStatus{state=Normal,
stateStartTime=1722322998376}
2024-07-30T12:33:18+05:30 WorkerRef: null
2024-07-30T12:33:18+05:30 .
2024-07-30T12:33:18+05:30 07:03:18.500 [celeborn-dispatcher-59] WARN
org.apache.celeborn.service.deploy.master.Master - Received heartbeat from
unknown worker 10.68.220.83:33925:38829:46463:41093.
2024-07-30T12:33:18+05:30 PushPort: 38829
2024-07-30T12:33:18+05:30 FetchPort: 46463
2024-07-30T12:33:18+05:30 SlotsUsed: 0
2024-07-30T12:33:18+05:30 WorkerRef: null
2024-07-30T12:33:18+05:30 InternalPort: 33925
2024-07-30T12:33:18+05:30 .
2024-07-30T12:33:18+05:30 LastHeartbeat: 0
2024-07-30T12:33:18+05:30 DiskInfo0: DiskInfo(maxSlots: 1600, committed
shuffles 0, running applications 0, shuffleAllocations: Map(), mountPoint: /,
usableSpace: 100.0 GiB, totalSpace: 100.0 GiB, avgFlushTime: 206429 ns,
avgFetchTime: 6.1 ms, activeSlots: 0, storageType: HDD) status: HEALTHY dirs
```
### Does this PR introduce _any_ user-facing change?
User can toggle `celeborn.humanFriendlyLog.enabled` flag to enable/disable
the human friendly logging. By default it will be true to preserve the current
behaviour.
### How was this patch tested?
Working on testing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]