-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-11069. Block location is missing in output of Ozone debug chunkinfo command for EC. #6909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@swamirishi could you please take a look? |
| int replicaIdx = pipeline.getReplicaIndex(dn); | ||
| ContainerProtos.GetBlockRequestProto getBlockRequestProto = | ||
| request.getGetBlock(); | ||
| DatanodeBlockID datanodeBlockID = getBlockRequestProto.getBlockID(); | ||
| DatanodeBlockID newDatanodeBlockID = | ||
| DatanodeBlockID.newBuilder(datanodeBlockID) | ||
| .setReplicaIndex(replicaIdx).build(); | ||
| ContainerProtos.GetBlockRequestProto newGetBlockRequestProto = | ||
| ContainerProtos.GetBlockRequestProto.newBuilder(getBlockRequestProto) | ||
| .setBlockID(newDatanodeBlockID).build(); | ||
| request = ContainerCommandRequestProto.newBuilder(request) | ||
| .setGetBlock(newGetBlockRequestProto).build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| int replicaIdx = pipeline.getReplicaIndex(dn); | |
| ContainerProtos.GetBlockRequestProto getBlockRequestProto = | |
| request.getGetBlock(); | |
| DatanodeBlockID datanodeBlockID = getBlockRequestProto.getBlockID(); | |
| DatanodeBlockID newDatanodeBlockID = | |
| DatanodeBlockID.newBuilder(datanodeBlockID) | |
| .setReplicaIndex(replicaIdx).build(); | |
| ContainerProtos.GetBlockRequestProto newGetBlockRequestProto = | |
| ContainerProtos.GetBlockRequestProto.newBuilder(getBlockRequestProto) | |
| .setBlockID(newDatanodeBlockID).build(); | |
| request = ContainerCommandRequestProto.newBuilder(request) | |
| .setGetBlock(newGetBlockRequestProto).build(); | |
| ContainerProtos.GetBlockRequestProto gbr = request.getGetBlock(); | |
| request = request.toBuilder().setGetBlock(gbr.toBuilder().setBlockID( | |
| gbr.getBlockID().toBuilder().setReplicaIndex( | |
| pipeline.getReplicaIndex(dn)).build()).build()).build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks , updated the patch.
aryangupta1998
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Thanks @sadanand48 for the patch, @nandakumar131 for the review. |
…nfo command for EC. (apache#6909) (cherry picked from commit a8c377f)
What changes were proposed in this pull request?
After HDDS-10983 , it requires every getBlock request be assigned a replicaIndex in case of an EC block. The request constructed for getBlock in this tool didn't have that. This change sets the replicaIndex if key is EC in the getBlock request.
I have reconstructed the request after unpacking the existing request which could have been avoided but since the usecase is just a debug tool and it was simple change, I went with it.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11069
How was this patch tested?
Unit test