Pedro Azevedo created STORM-4148:
------------------------------------

             Summary: Storm UI throwing error on Component page
                 Key: STORM-4148
                 URL: https://issues.apache.org/jira/browse/STORM-4148
             Project: Apache Storm
          Issue Type: Bug
          Components: storm-server
    Affects Versions: 2.7.0
            Reporter: Pedro Azevedo


After bumping our Storm services from Storm 1 to Storm 2, we faced an issue 
where some components fail to load through the UI.
{code:java}
500 Server Error
org.apache.storm.thrift.TApplicationException: Internal error processing 
getComponentPageInfo
 {code}
h3. 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.

h3. Root Cause:

The issue lies on how the parameter componentId is being passed. For example, 
in the {{StatsUtils.componentType}} method:
{code:java}
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;
}{code}
 

*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.

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to