fix: Decode ComponentId to avoid UI throwing errors#3827
Merged
reiabreu merged 1 commit intoJan 10, 2025
Merged
Conversation
reiabreu
approved these changes
Jan 10, 2025
rzo1
approved these changes
Jan 10, 2025
Contributor
Contributor
|
Thanks @richard Zowalla ***@***.***> , I just noticed that we did not
have an issue for it, sorry about that.
…On Fri, 10 Jan 2025 at 12:22, Richard Zowalla ***@***.***> wrote:
https://issues.apache.org/jira/browse/STORM-4149
—
Reply to this email directly, view it on GitHub
<#3827 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG5GIRUDWCWD3ZAQNLBJSL2J63RHAVCNFSM6AAAAABU6GLUWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBSGU4DSMJUHE>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Contributor
Author
|
Hey, sorry, I've forgot to link the issue, we had already created. |
Contributor
|
Thanks for the PR @paxadax |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
After bumping our Storm services from Storm 1 to Storm 2, we faced an issue where some components fail to load through the UI.
500 Server Error
org.apache.storm.thrift.TApplicationException: Internal error processing getComponentPageInfo
Findings:
We verified that the getComponentPageInfo method works correctly for Spouts and Bolts with names that do not contain spaces.
However, it fails for components with names that contain spaces.
Root Cause:
The issue lies on how the parameter componentId is being passed. For example, in the StatsUtils.componentType method:
public static String componentType(StormTopology topology, String compId) {
if (compId == null) {
return null;
}
}
Error Scenario:
When accessing the component page of a Bolt named Test Error, the compId value is "Test+Error".
However, in the bolts map, the component key is stored as "Test Error".
This mismatch prevents the bolts map from finding the component, leading the method to incorrectly return the SPOUT value for a Bolt.
On this PR we're decoding the componentId string so it will match the correct value.
How was the change tested
Compiled the project, copied the jar into my machine and verified that the UI is now loading the components for names with spaces