metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattf-horton <>
Subject [GitHub] metron pull request #600: METRON-976 KafkaUtils doesn't handle SASL_PLAINTEX...
Date Fri, 02 Jun 2017 22:10:08 GMT
Github user mattf-horton commented on a diff in the pull request:
    --- Diff: metron-platform/metron-common/src/main/java/org/apache/metron/common/utils/
    @@ -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)[].
 It appears you've exactly reversed a chunk of @cestella 's patch of Mar 23.  Was this intended?
 I'm even more confused :-)

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

View raw message