Github user mattf-horton commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/308#discussion_r83980978
  
    --- Diff: 
metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/bolt/ParserBolt.java
 ---
    @@ -181,7 +185,8 @@ public void declareOutputFields(OutputFieldsDeclarer 
declarer) {
       @Override
       public void updateConfig(String path, byte[] data) throws IOException {
         super.updateConfig(path, data);
    -    if (path.startsWith(ConfigurationType.PARSER.getZookeeperRoot() + "/" 
+ getSensorType())) {
    +    String pathWithoutTrailingSlash = path.replaceAll("/+$", "");
    +    if 
(pathWithoutTrailingSlash.equals(ConfigurationType.PARSER.getZookeeperRoot() + 
"/" + getSensorType())) {
    --- End diff --
    
    I'm concerned that there may be at least one segment of structured name 
between sensorType and a value that may have changed, thus still requiring a 
"starts with"-like calculation.  How about replace both lines 188 and 189 with:
    if (path.matches("^" + ConfigurationType.PARSER.getZookeeperRoot() + "/" + 
getSensorType() + "(/|$)")) {



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to