Github user justinleet commented on a diff in the pull request:

    https://github.com/apache/metron/pull/600#discussion_r120369355
  
    --- Diff: 
metron-platform/metron-common/src/main/java/org/apache/metron/common/utils/KafkaUtils.java
 ---
    @@ -68,12 +68,14 @@
         return ret;
       }
     
    -  public List<String> fromEndpoint(String url) throws URISyntaxException {
    +  public List<String> fromEndpoint(String url){
         List<String> ret = new ArrayList<>();
         if(url != null) {
    -      URI uri = new URI(url);
    -      int port = uri.getPort();
    -      ret.add(uri.getHost() + ((port > 0)?(":" + port):""));
    +      Iterable<String> splits = Splitter.on("//").split(url);
    +      if(Iterables.size(splits) == 2) {
    +        String hostPort = Iterables.getLast(splits);
    +        ret.add(hostPort);
    --- End diff --
    
    The problem is that the URI based solution that was implemented in that 
patch (I believe based on my suggestion, sigh) doesn't allow for protocols with 
underscore characters.  It's entirely independent of SASL_PLAINTEXT, other than 
the fact that underscore is in it.
    
    The intention was to exactly reverse the chunk you mention, because the 
original didn't care about underscores.
    
    On further inspection (which I'm glad you did!), these are not equivalent 
before and after.  Which begs the question of why things worked in testing.  
I'll dig in a bit more to figure out what's going on under the hood here.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to