paxadax opened a new pull request, #3827:
URL: https://github.com/apache/storm/pull/3827
## 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;
}
Map<String, Bolt> bolts = topology.get_bolts();
if (Utils.isSystemId(compId) || bolts.containsKey(compId)) {
return ClientStatsUtil.BOLT;
}
return ClientStatsUtil.SPOUT;
}
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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]