nickwallen commented on a change in pull request #1346: METRON-2016: Parser 
aggregate groups should be persisted and available through REST
URL: https://github.com/apache/metron/pull/1346#discussion_r262644328
 
 

 ##########
 File path: 
metron-interface/metron-rest/src/main/java/org/apache/metron/rest/service/impl/StormStatusServiceImpl.java
 ##########
 @@ -145,4 +136,35 @@ protected String getStormUiProperty() {
     }
     return baseValue;
   }
+
+  /**
+   * Retrieves the Storm topology id from the given topology name.  If a 
topology name is detected to be an aggregate
+   * parser topology, the SensorParserGroups are checked for a match.
+   * @param name Topology or SensorParserGroup name
+   * @return Topology id
+   */
+  protected String getTopologyId(String name) {
+    String id = null;
+    for (TopologyStatus topology : getTopologySummary().getTopologies()) {
+      String topologyName = topology.getName();
+
+      // check sensor group
+      if (topologyName.contains(ParserTopologyCLI.STORM_JOB_SEPARATOR)) {
+        Set<String> sensors = new 
HashSet<>(Arrays.asList(topologyName.split(ParserTopologyCLI.STORM_JOB_SEPARATOR)));
 
 Review comment:
   If there is not an obvious way to do it, then let's not.  Thanks for taking 
a look.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to