[ 
https://issues.apache.org/jira/browse/METRON-976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035512#comment-16035512
 ] 

ASF GitHub Bot commented on METRON-976:
---------------------------------------

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

    https://github.com/apache/metron/pull/600#discussion_r119961464
  
    --- 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 --
    
    Hi @justinleet , perhaps it is because I don't know how SASL_PLAINTEXT 
endpoints work, but I don't get the change above. I fully understand the 
deleted lines, and don't see how the substituted lines are equivalent, or what 
was wrong with the former.  Would you mind giving a bit of explanation?  Thanks.
    
    Also, I just went back and re-read your introduction to this PR, and 
followed the link to 
(5d36c79)[https://github.com/apache/metron/commit/5d36c79effec75f6ac95fa587f80da0bd5420135].
  It appears you've exactly reversed a chunk of @cestella 's patch of Mar 23.  
Was this intended?  I'm even more confused :-)


> KafkaUtils doesn't handle SASL_PLAINTEXT
> ----------------------------------------
>
>                 Key: METRON-976
>                 URL: https://issues.apache.org/jira/browse/METRON-976
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Justin Leet
>            Assignee: Justin Leet
>
> Java's URI class throws an error because '_' isn't allowed to be in a URI.  
> We'll need to move to a manually split approach.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to