dombizita opened a new pull request #2987:
URL: https://github.com/apache/ozone/pull/2987
## What changes were proposed in this pull request?
In this change I added a debug CLI tool, called read-replicas. The tool for
a given key will download every blocks every replicas (from each datanode) and
also creates a manifest file with informations about the key, its blocks and
replicas.
The command can be used like this:
`ozone debug read-replicas /vol1/bucket1/testfile
`
It will create a directory with the volume, bucket and key name; it also
adds a timestamp, so you can re-run it. The downloaded replicas and the
manifest file will be in this directory. The manifest file will look something
like this:
```
cat vol1_bucket1_testfile_20220113142642/testfile_manifest
{
"filename": "vol1/bucket1/testfile",
"datasize": 20000000,
"blocks": [
{
"block index": 1,
"container id": 1,
"local id": 109611004723200001,
"length": 20000000,
"offset": 0,
"replicas": [
{
"hostname": "ozone_datanode_3.ozone_default",
"uuid": "075c52cf-0876-4cd8-94d1-104de5ba700f"
},
{
"hostname": "ozone_datanode_2.ozone_default",
"uuid": "ee456701-95fa-4277-a44f-7fff9cd07ace"
},
{
"hostname": "ozone_datanode_1.ozone_default",
"uuid": "6554007e-ec0b-46b0-aa29-9ba162bdbd9c"
}
]
}
]
}
```
If there is a checksum mismatch with one of the replicas it will be marked
in the manifest file and the corrupt replica is still going to be downloaded.
If one of the datanodes is down (and still alive) it will also be marked in the
manifest file.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6128
## How was this patch tested?
Built the project successfully and tested the command locally in docker
environment. Specific tests will be added as the next sub-task.
--
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]