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

    https://github.com/apache/flink/pull/1046#discussion_r37744576
  
    --- Diff: 
flink-contrib/flink-storm-compatibility/flink-storm-compatibility-core/src/main/java/org/apache/flink/stormcompatibility/wrappers/AbstractStormSpoutWrapper.java
 ---
    @@ -97,9 +103,21 @@ public AbstractStormSpoutWrapper(final IRichSpout spout,
        }
     
        @Override
    +   public void open(Configuration parameters) throws Exception {
    +           /* 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();
    +                   stormConf = new HashMap<String, Object>();
    +                   stormConf.putAll(jobConfiguration.getConfData());
    --- End diff --
    
    I will add null test.In fact, jobConfiguration can not be null. Because 
StromBoltWrapper unit test mock StreamingRuntimeContext object, so its 
jobConfiguration  can be null.


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

Reply via email to