{"action":"created","issue":{"url":"https://api.github.com/repos/apache/flink/issues/1046","labels_url":"https://api.github.com/repos/apache/flink/issues/1046/labels{/name}","comments_url":"https://api.github.com/repos/apache/flink/issues/1046/comments","events_url":"https://api.github.com/repos/apache/flink/issues/1046/events","html_url":"https://github.com/apache/flink/pull/1046","id":102745613,"number":1046,"title":"[FLINK-2525]Add configuration support in Storm-compatibility","user":{"login":"ffbin","id":13081808,"avatar_url":"https://avatars.githubusercontent.com/u/13081808?v=3","gravatar_id":"","url":"https://api.github.com/users/ffbin","html_url":"https://github.com/ffbin","followers_url":"https://api.github.com/users/ffbin/followers","following_url":"https://api.github.com/users/ffbin/following{/other_user}","gists_url":"https://api.github.com/users/ffbin/gists{/gist_id}","starred_url":"https://api.github.com/users/ffbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffbin/subscriptions","organizations_url":"https://api.github.com/users/ffbin/orgs","repos_url":"https://api.github.com/users/ffbin/repos","events_url":"https://api.github.com/users/ffbin/events{/privacy}","received_events_url":"https://api.github.com/users/ffbin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-24T09:12:37Z","updated_at":"2015-08-24T13:01:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/1046","html_url":"https://github.com/apache/flink/pull/1046","diff_url":"https://github.com/apache/flink/pull/1046.diff","patch_url":"https://github.com/apache/flink/pull/1046.patch"},"body":"- enable config can used in Spouts.open() and Bout.prepare().\r\n\r\nExample like this:\r\npublic static void main(final String[] args) {\r\n\tString topologyId = \"Streaming WordCount\";\r\n\tfinal FlinkTopologyBuilder builder = new FlinkTopologyBuilder();\r\n\t...\r\n\tfinal Config conf = new Config();\r\n\tconf.put(\"wordsFile\", \"/home/user/\");\r\n\tconf.put(\"delimitSize\", 1024);\r\n\tfinal FlinkLocalCluster cluster = FlinkLocalCluster.getLocalCluster();\r\n\tcluster.submitTopology(topologyId, conf, builder.createTopology());\r\n\tUtils.sleep(10 * 1000);\r\n\tcluster.killTopology(topologyId);\r\n\tcluster.shutdown();\t\r\n}\r\n\r\npublic class WordReader implements IRichSpout {\r\n\t....\r\n\tpublic void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {\r\n\t\ttry {\r\n\t\t\tthis.context = context;\r\n\t\t\tthis.fileReader = new FileReader(conf.get(\"wordsFile\"));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new RuntimeException(\"Error reading file [\"+conf.get(\"wordFile\")+\"]\");\r\n\t\t}\r\n\t\tthis.collector = collector;\r\n\t}\r\n}\r\n\r\npublic final class StormBoltTokenizer implements IRichBolt {\r\n\t....\r\n\tpublic void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {\r\n\t\tthis.delimitSize = stormConf.get(\"delimitSize\");\r\n\t\tthis.collector = collector;\r\n\t}\t\r\n}\r\n"},"comment":{"url":"https://api.github.com/repos/apache/flink/issues/comments/134190885","html_url":"https://github.com/apache/flink/pull/1046#issuecomment-134190885","issue_url":"https://api.github.com/repos/apache/flink/issues/1046","id":134190885,"user":{"login":"mjsax","id":8959638,"avatar_url":"https://avatars.githubusercontent.com/u/8959638?v=3","gravatar_id":"","url":"https://api.github.com/users/mjsax","html_url":"https://github.com/mjsax","followers_url":"https://api.github.com/users/mjsax/followers","following_url":"https://api.github.com/users/mjsax/following{/other_user}","gists_url":"https://api.github.com/users/mjsax/gists{/gist_id}","starred_url":"https://api.github.com/users/mjsax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjsax/subscriptions","organizations_url":"https://api.github.com/users/mjsax/orgs","repos_url":"https://api.github.com/users/mjsax/repos","events_url":"https://api.github.com/users/mjsax/events{/privacy}","received_events_url":"https://api.github.com/users/mjsax/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T13:01:44Z","updated_at":"2015-08-24T13:01:44Z","body":"It fails in two test. You should actually see it, if you execute test locally. You should run test each time before you open/update an PR (at least for the module you did changes).\r\n\r\n```\r\nTests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.751 sec <<< FAILURE! - in org.apache.flink.stormcompatibility.split.BoltSplitITCase\r\ntestTopology(org.apache.flink.stormcompatibility.split.BoltSplitITCase) Time elapsed: 0.635 sec <<< ERROR!\r\njava.lang.NullPointerException: null\r\nat org.apache.flink.stormcompatibility.api.FlinkLocalCluster.submitTopologyWithOpts(FlinkLocalCluster.java:52)\r\nat org.apache.flink.stormcompatibility.api.FlinkLocalCluster.submitTopology(FlinkLocalCluster.java:41)\r\nat org.apache.flink.stormcompatibility.split.StormSplitStreamBoltLocal.main(StormSplitStreamBoltLocal.java:42)\r\nat org.apache.flink.stormcompatibility.split.BoltSplitITCase.testTopology(BoltSplitITCase.java:25)\r\n```\r\nand\r\n```\r\nTests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.704 sec <<< FAILURE! - in org.apache.flink.stormcompatibility.split.SpoutSplitITCase\r\ntestTopology(org.apache.flink.stormcompatibility.split.SpoutSplitITCase) Time elapsed: 0.584 sec <<< ERROR!\r\njava.lang.NullPointerException: null\r\nat org.apache.flink.stormcompatibility.api.FlinkLocalCluster.submitTopologyWithOpts(FlinkLocalCluster.java:52)\r\nat org.apache.flink.stormcompatibility.api.FlinkLocalCluster.submitTopology(FlinkLocalCluster.java:41)\r\nat org.apache.flink.stormcompatibility.split.StormSplitStreamSpoutLocal.main(StormSplitStreamSpoutLocal.java:42)\r\nat org.apache.flink.stormcompatibility.split.SpoutSplitITCase.testTopology(SpoutSplitITCase.java:25)\r\n```\r\n\r\nJust out of curiosity: why can you not see Travis details? "}}