errose28 commented on PR #8146:
URL: https://github.com/apache/ozone/pull/8146#issuecomment-2759957965
Thanks @sarvekshayr I have some high level suggestions for the json:
- Change key fields to match `ozone sh key list` output
- All numeric fields should be numbers, not strings
- Use hex to represent the checksum string
- Group datanode fields and add UUID
- Change `chunkFiles` list to just a single block file, since we don't have
file per chunk layout anymore after 2.0.
- Move `file` towards the top of the object (serialize it first) so it is
more visible.
```diff
diff --git a/json1.json b/json2.json
index 794238f..c3f68e0 100644
--- a/json1.json
+++ b/json2.json
@@ -1,17 +1,21 @@
{
"volumeName": "vol1",
"bucketName": "buck1",
- "keyName": "ratiskeyone",
+ "name": "ratiskeyone",
"keyLocations": [
[
{
- "datanodeHostName": "ozone-datanode-1.ozone_default",
- "datanodeIP": "192.168.32.6",
+ "datanode": {
+ "hostname": "ozone-datanode-1.ozone_default",
+ "ip": "192.168.32.6",
+ "uuid": "abc-123"
+ },
+ "file":
"/data/hdds/hdds/CID-47d9c5df-a3a1-4452-a7e1-f07f3f6684fd/current/containerDir0/2/chunks/115816896921600002.block",
"blockData": {
"blockID": {
- "containerID": "2",
+ "containerID": 2,
"localID": "115816896921600002",
- "blockCommitSequenceId": "2"
+ "blockCommitSequenceId": 2
},
"metadata": [
{
@@ -22,22 +26,19 @@
"chunks": [
{
"chunkName": "115816896921600002_chunk_1",
- "offset": "0",
- "len": "6",
+ "offset": 0,
+ "len": 6,
"checksumData": {
"type": "CRC32",
"bytesPerChecksum": 16384,
"checksums": [
- "NjowIA=="
+ "acb123"
]
}
}
],
- "size": "6"
- },
- "chunkFiles": [
-
"/data/hdds/hdds/CID-47d9c5df-a3a1-4452-a7e1-f07f3f6684fd/current/containerDir0/2/chunks/115816896921600002.block"
- ]
+ "size": 6
+ }
}
]
]
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]