You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by ffbin <gi...@git.apache.org> on 2015/09/01 05:16:12 UTC

[GitHub] flink pull request: [FLINK-2525]Add configuration support in Storm...

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

    https://github.com/apache/flink/pull/1046#discussion_r38382368
  
    --- Diff: flink-contrib/flink-storm-compatibility/flink-storm-compatibility-core/src/main/java/org/apache/flink/stormcompatibility/wrappers/AbstractStormSpoutWrapper.java ---
    @@ -97,9 +106,42 @@ public AbstractStormSpoutWrapper(final IRichSpout spout,
     	}
     
     	@Override
    +	public void open(Configuration parameters) throws Exception {
    +		stormConf = new HashMap();
    +
    +		/* parameters is task configuration, we can get storm configuration only from job configuration */
    +		RuntimeContext ctx = super.getRuntimeContext();
    +		if (ctx instanceof StreamingRuntimeContext) {
    +			Configuration jobConfiguration = ((StreamingRuntimeContext) ctx).getJobConfiguration();
    +
    --- End diff --
    
    The open() is usually called by openAllOperators(), and the Configuration config parameter is usually task Configuration, not job Configuration. 


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