Skip to content

Conversation

@hemantk-12
Copy link
Contributor

What changes were proposed in this pull request?

This change addresses few of the concerns raised in PR #5061.

  • Added check to allow only Ozone admin user to call print compaction dag API.
  • Update the response message stating the file name, parent dir's absolute path and the OM leader node info.

Note: This PR doesn't addressed Having a network call that generates a file on the server is strange. because of following reason.
As we talked in here, it is better to be have it as a OM request to get the in-memory picture of the DAG. It can be solved in following two ways.

  1. Return graph POJO to client and generate the image on client side. But it comes with a problem of graph size and might need pagination.
  2. Stream the generated image to the client. But we don't have existed interface to stream a file.
    Both the solution will require more time and investigation. So for the interest of time, just addressed the security and debug message for now and create a jira: HDDS-9040 for further enhancement.

What is the link to the Apache JIRA

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

How was this patch tested?

Existed unit tests.

@hemantk-12
Copy link
Contributor Author

@errose28 and @smengcl, please take a look.

@smengcl smengcl added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Jul 19, 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the switch? Or should we just print both?

Copy link
Contributor Author

@hemantk-12 hemantk-12 Jul 19, 2023

Choose a reason for hiding this comment

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

It was my miss in previous PR. backwardCompactionDAG will give the same result as in https://user-images.githubusercontent.com/6820020/211372896-c4f6eada-3fb0-4838-bcc6-08c47606a43f.png

Attaching the images to differentiate.

  1. backwardCompactionDAG

  2. forwardCompactionDAG

Copy link
Contributor

@smengcl smengcl left a comment

Choose a reason for hiding this comment

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

Thanks @hemantk-12 for the follow-up patch. I have a few comments inline.

@hemantk-12 hemantk-12 changed the title HDDS-8961. [Snapshot] Added check to allow only Ozone admin user to call print compaction dag HDDS-8961. [Snapshot] Added check to allow only Ozone admin user to call print compaction dag Jul 19, 2023
Copy link
Contributor

@prashantpogde prashantpogde left a comment

Choose a reason for hiding this comment

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

LGTM

@prashantpogde prashantpogde merged commit 607b67e into apache:master Jul 20, 2023
jojochuang pushed a commit to jojochuang/ozone that referenced this pull request Sep 20, 2023
…in user to call print compaction dag (apache#5087)

(cherry picked from commit 607b67e)
Change-Id: I81515543062fb129867bba659b430db6321bf301
@hemantk-12 hemantk-12 deleted the HDDS-8961 branch October 28, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot https://issues.apache.org/jira/browse/HDDS-6517

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants