You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by caofangkun <gi...@git.apache.org> on 2014/11/11 07:38:41 UTC

[GitHub] storm pull request: STORM-550:fix bug get an error when use --conf...

GitHub user caofangkun opened a pull request:

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

    STORM-550:fix bug get an error when use --config option to override conf...

    fix bug get an error when use --config option to override conf...
    
    bin/storm --config ~/deploy/storm-conf/user.yamls  supervisor
    


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

    $ git pull https://github.com/caofangkun/apache-storm storm-550

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

    https://github.com/apache/storm/pull/310.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 #310
    
----
commit dd944de09ef30b45306ba3a69b660e6adc8697b7
Author: caofangkun <ca...@gmail.com>
Date:   2014-11-11T06:35:07Z

    STORM-550:fix bug get an error when use --config option to override config file

----


---
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: STORM-550:fix bug get an error when use --conf...

Posted by caofangkun <gi...@git.apache.org>.
Github user caofangkun commented on the pull request:

    https://github.com/apache/storm/pull/310#issuecomment-63588709
  
    duplicate of STORM-188


---
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: STORM-550:fix bug get an error when use --conf...

Posted by clockfly <gi...@git.apache.org>.
Github user clockfly commented on the pull request:

    https://github.com/apache/storm/pull/310#issuecomment-62510083
  
    Seems this is duplicate of STORM-188


---
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: STORM-550:fix bug get an error when use --conf...

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

    https://github.com/apache/storm/pull/310#discussion_r20134376
  
    --- Diff: storm-core/src/jvm/backtype/storm/utils/Utils.java ---
    @@ -121,6 +126,27 @@ public static void sleep(long millis) {
                 throw new RuntimeException(e);
             }
         }
    +    
    +	@SuppressWarnings("unchecked")
    +	public static Map<String, Object> loadConfigFile(String file) {
    +		Map<String, Object> result = new HashMap<String, Object>();
    +		if (file == null) {
    +			return result;
    --- End diff --
    
    Shouldn't this throw a RunTime exception? 


---
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: STORM-550:fix bug get an error when use --conf...

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

    https://github.com/apache/storm/pull/310#discussion_r20134395
  
    --- Diff: storm-core/src/jvm/backtype/storm/utils/Utils.java ---
    @@ -121,6 +126,27 @@ public static void sleep(long millis) {
                 throw new RuntimeException(e);
             }
         }
    +    
    +	@SuppressWarnings("unchecked")
    +	public static Map<String, Object> loadConfigFile(String file) {
    +		Map<String, Object> result = new HashMap<String, Object>();
    +		if (file == null) {
    +			return result;
    +		}
    +		Yaml yaml = new Yaml();
    +		InputStream in;
    +		try {
    +			in = new FileInputStream(new File(file));
    +			Object obj = yaml.load(in);
    +			if (!(obj instanceof Map)) {
    --- End diff --
    
    Same as above.


---
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: STORM-550:fix bug get an error when use --conf...

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

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


---
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: STORM-550:fix bug get an error when use --conf...

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

    https://github.com/apache/storm/pull/310#discussion_r20135808
  
    --- Diff: storm-core/src/jvm/backtype/storm/utils/Utils.java ---
    @@ -121,6 +126,27 @@ public static void sleep(long millis) {
                 throw new RuntimeException(e);
             }
         }
    +    
    +	@SuppressWarnings("unchecked")
    +	public static Map<String, Object> loadConfigFile(String file) {
    +		Map<String, Object> result = new HashMap<String, Object>();
    +		if (file == null) {
    +			return result;
    --- End diff --
    
    Any wrong in this way?


---
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: STORM-550:fix bug get an error when use --conf...

Posted by revans2 <gi...@git.apache.org>.
Github user revans2 commented on the pull request:

    https://github.com/apache/storm/pull/310#issuecomment-63493192
  
    This is a duplicate of STORM-188 as @clockfly suggested.  This patch has a regression, in that it does not search the classpath for the --config option.  I don't expect there are many people using this functionality, but I would rather not regress if possible. STROM-188 looks to be a lot closer to a fully functional patch, so I would rather go with that.


---
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.
---