-
Notifications
You must be signed in to change notification settings - Fork 589
HDDS-8961. Write a standalone tool to create a visual graph from compaction log files. #5061
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
...tools/src/main/java/org/apache/hadoop/ozone/shell/snapshot/PrintCompactionLogDagHandler.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
...tools/src/main/java/org/apache/hadoop/ozone/shell/snapshot/PrintCompactionLogDagHandler.java
Outdated
Show resolved
Hide resolved
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.
Add a check here to allow only Ozone admins to run this.
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.
Do we need this check explicitly?
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.
Yes. Otherwise anyone can call this and fill up the /tmp
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.
I'll raise a PR addressing this comment and @errose28's concern.
prashantpogde
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
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/CompactionLogDagPrinter.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/CompactionLogDagPrinter.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Siyao Meng <[email protected]>
This reverts commit a27701bc118ae60d6d2e6ace66735049355f8462.
|
Thank you @hemantk-12 for this PR and addressing review comments. |
|
@hemantk-12 @smengcl @prashantpogde I think this PR was incorrectly merged with some existing problems:
If this command can be made to run locally on an OM host without depending on the OM process then a lot of the above concerns should be addressed. Otherwise I think these will need to be fixed, preferably with high priority (especially the security concern). We have enough tech debt around Ozone troubleshooting, let's not add more. |
Thanks for the review and suggestion @errose28 The reason I made it a OM call because I needed current state of DAG. You can argue that we can get that from compaction log but I had slight doubt that it won't give you exact picture as in memory. Should we revert this PR in meanwhile I make the change to address your concern? Or just create new one with fix? |
I'm not currently familiar with the snapshot implementation so this is up to you. As a debug tool it might actually be better to return the state from memory like you suggested since that is what the OM is actually using.
Yeah some way to pass the result as either a java/proto object or a stream of bytes that the client writes as an image file sounds good, assuming the sizes of either response will not be prohibitively large. We may need to check which approach is easier to implement and generates the smallest size response. Another option is to return the bytes as an svg instead of png. png is not as compressed, jpg would be lossy, but svg should give all the info in the most compact form factor. Gzipping as svgz before sending and then unpacking client side could help reduce size on the wire even more.
If the fix can be completed in a few days, let's just create a new one with the fix. I don't think we should cut a release with these changes as is, but I don't think that is happening from apache master too soon. |
Raised PR: #5087 to address major concerns. |
What changes were proposed in this pull request?
This change is to create a operational tool to create an image for the compaction log DAG at any given point in time.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-8961
How was this patch tested?
Manually tested it on Docker.