You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by haewanj <gi...@git.apache.org> on 2017/06/24 06:42:54 UTC

[GitHub] storm pull request #2177: STORM-2568: Fix getTopicsString

GitHub user haewanj opened a pull request:

    https://github.com/apache/storm/pull/2177

    STORM-2568: Fix getTopicsString

    - String.valueOf returns square bracket, because 'topics' is Collection
    - removed square bracket to use storm-kafka-monitor

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/haewanj/storm 1.x-branch

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/2177.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2177
    
----
commit 6c93f11534688a46a3be784130498fe3ea7dad67
Author: haewanj <ha...@gmail.com>
Date:   2017-06-24T06:07:34Z

    STORM-2568: Fix getTopicsString
    - String.valueOf returns square bracket, because topics is Collection
    - removed square bracket to use storm-kafka-monitor

----


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

[GitHub] storm issue #2177: STORM-2568: Fix getTopicsString

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/2177
  
    +1
    I checked the master branch and confirmed that branch is OK: master branch uses `String.join()`
    So don't need to port forward to the master branch.


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

[GitHub] storm issue #2177: STORM-2568: Fix getTopicsString

Posted by haewanj <gi...@git.apache.org>.
Github user haewanj commented on the issue:

    https://github.com/apache/storm/pull/2177
  
    @HeartSaVioR 
    I added license. and squashed the commits into one. Thanks for the advice!


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

[GitHub] storm pull request #2177: STORM-2568: Fix getTopicsString

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/storm/pull/2177


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

[GitHub] storm pull request #2177: STORM-2568: Fix getTopicsString

Posted by haewanj <gi...@git.apache.org>.
Github user haewanj commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2177#discussion_r123888471
  
    --- Diff: external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/NamedSubscription.java ---
    @@ -56,6 +57,6 @@ public NamedSubscription(String ... topics) {
     
         @Override
         public String getTopicsString() {
    -        return String.valueOf(topics);
    +        return StringUtils.join(topics, ",");
    --- End diff --
    
    Thanks for the suggestion. 
    As you know, To keep java 1.7+ build, 'String.join()' is not a solution like master branch. And 'storm-core' has dependency both commons-lang and guava. So I choose commons-lang but If to pass the test that travis MODUELS='!storm-core', storm-kafka-client needs the dependency even Guava too. That's why I added commons-lang to storm-kafka-client's pom file.
    If avoid adding a new dependency in storm-kafka-client, we can code maybe like this
            StringBuilder sb = new StringBuilder();
            for(String topic: topics) {
                sb.append(topic).append(",");
            }
            sb.deleteCharAt(sb.lastIndexOf(","));
            return sb.toString();
    Many of external/packages have commons-lang dependency so, I thought it was fine.
    
    By the way It has not been passed the Integration-test on travis-ci, I have no idea. but in my local integration-test is fine. (ex: mvn -P  integration-tests-only integration-test)


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

[GitHub] storm issue #2177: STORM-2568: Fix getTopicsString

Posted by hmcl <gi...@git.apache.org>.
Github user hmcl commented on the issue:

    https://github.com/apache/storm/pull/2177
  
    +1


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

[GitHub] storm issue #2177: STORM-2568: Fix getTopicsString

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/2177
  
    +1
    Thanks for the contribution.


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

[GitHub] storm issue #2177: STORM-2568: Fix getTopicsString

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/2177
  
    @haewanj 
    Sorry I revoked +1 because of missing license. Could you add Apache license header to the new file?
    And please squash the commits into one after fixing. Thanks in advance!


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

[GitHub] storm pull request #2177: STORM-2568: Fix getTopicsString

Posted by hmcl <gi...@git.apache.org>.
Github user hmcl commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2177#discussion_r123886555
  
    --- Diff: external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/NamedSubscription.java ---
    @@ -56,6 +57,6 @@ public NamedSubscription(String ... topics) {
     
         @Override
         public String getTopicsString() {
    -        return String.valueOf(topics);
    +        return StringUtils.join(topics, ",");
    --- End diff --
    
    I would like to suggest that you use instead Guava's `Joiner.on(",").join(topics);` which will avoid adding a new dependency


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