Skip to content

HDDS-8697 Recon - Expose API for total count for blocks pending for deletion.#4791

Closed
ArafatKhan2198 wants to merge 1 commit intoapache:masterfrom
ArafatKhan2198:HDDS-8697
Closed

HDDS-8697 Recon - Expose API for total count for blocks pending for deletion.#4791
ArafatKhan2198 wants to merge 1 commit intoapache:masterfrom
ArafatKhan2198:HDDS-8697

Conversation

@ArafatKhan2198
Copy link
Contributor

What changes were proposed in this pull request?

Improvements have been made to the existing BlocksEndpoint API response. Now, the total count of blocks pending deletion is displayed in the API response. The updated response will appear as follows:

{
  "totalCount": 1000,
  "containerStateBlockInfoListMap": {
    "OPEN": [
      {
        "containerId": 100,
        "localIDList": [
          1,
          2,
          3,
          4
        ],
        "localIDCount": 4,
        "txID": 1
      }
    ]
  }
}

This new response includes the total count of pending deletions blocks and a list of containers, each with their state, container ID, list of local IDs, count of local IDs, and transaction ID.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-8697

How was this patch tested?

Added new and made modifications to the existing UT's

@ArafatKhan2198
Copy link
Contributor Author

ArafatKhan2198 commented May 29, 2023

@devmadhuu @adoroszlai @symious Can you please take a look !!

* }
* ]
* "totalCount": 1000,
* "containerStateBlockInfoListMap": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ArafatKhan2198 thanks for working on this patch, We need total count and unreplicated and replicated size mapped to those blocks. You should provide a new API, below API is only based on pagination.

try (
Table<Long,
StorageContainerDatanodeProtocolProtos.DeletedBlocksTransaction>
deletedBlocksTable = DELETED_BLOCKS.getTable(this.scmDBStore)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls don't change in existing API. This API should work based on pagination params only.

Table<Long,
StorageContainerDatanodeProtocolProtos.DeletedBlocksTransaction>
deletedBlocksTable = DELETED_BLOCKS.getTable(this.scmDBStore)) {
long totalCount = deletedBlocksTable.getEstimatedKeyCount();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't give correct count. We should not use this method.

@ArafatKhan2198 ArafatKhan2198 marked this pull request as draft May 30, 2023 06:41
@ArafatKhan2198 ArafatKhan2198 marked this pull request as ready for review May 30, 2023 12:18
@ArafatKhan2198 ArafatKhan2198 marked this pull request as draft June 25, 2023 07:37
@adoroszlai
Copy link
Contributor

/pending

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking this issue as un-mergeable as requested.

Please use /ready comment when it's resolved.

Please note that the PR will be closed after 21 days of inactivity from now. (But can be re-opened anytime later...)

/pending

@github-actions
Copy link

github-actions bot commented Feb 5, 2024

Thank you very much for the patch. I am closing this PR temporarily as there was no activity recently and it is waiting for response from its author.

It doesn't mean that this PR is not important or ignored: feel free to reopen the PR at any time.

It only means that attention of committers is not required. We prefer to keep the review queue clean. This ensures PRs in need of review are more visible, which results in faster feedback for all PRs.

If you need ANY help to finish this PR, please contact the community on the mailing list or the slack channel."

@github-actions github-actions bot closed this Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants