{"action":"created","issue":{"url":"https://api.github.com/repos/twitter/heron/issues/1146","repository_url":"https://api.github.com/repos/twitter/heron","labels_url":"https://api.github.com/repos/twitter/heron/issues/1146/labels{/name}","comments_url":"https://api.github.com/repos/twitter/heron/issues/1146/comments","events_url":"https://api.github.com/repos/twitter/heron/issues/1146/events","html_url":"https://github.com/twitter/heron/issues/1146","id":167329750,"number":1146,"title":"ERROR when upgrade storm topology with KafkaSpout","user":{"login":"mycFelix","id":4719414,"avatar_url":"https://avatars.githubusercontent.com/u/4719414?v=3","gravatar_id":"","url":"https://api.github.com/users/mycFelix","html_url":"https://github.com/mycFelix","followers_url":"https://api.github.com/users/mycFelix/followers","following_url":"https://api.github.com/users/mycFelix/following{/other_user}","gists_url":"https://api.github.com/users/mycFelix/gists{/gist_id}","starred_url":"https://api.github.com/users/mycFelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mycFelix/subscriptions","organizations_url":"https://api.github.com/users/mycFelix/orgs","repos_url":"https://api.github.com/users/mycFelix/repos","events_url":"https://api.github.com/users/mycFelix/events{/privacy}","received_events_url":"https://api.github.com/users/mycFelix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/twitter/heron/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/twitter/heron/labels/new%20feature","name":"new feature","color":"e99695"}],"state":"open","locked":false,"assignee":{"login":"caofangkun","id":1931407,"avatar_url":"https://avatars.githubusercontent.com/u/1931407?v=3","gravatar_id":"","url":"https://api.github.com/users/caofangkun","html_url":"https://github.com/caofangkun","followers_url":"https://api.github.com/users/caofangkun/followers","following_url":"https://api.github.com/users/caofangkun/following{/other_user}","gists_url":"https://api.github.com/users/caofangkun/gists{/gist_id}","starred_url":"https://api.github.com/users/caofangkun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caofangkun/subscriptions","organizations_url":"https://api.github.com/users/caofangkun/orgs","repos_url":"https://api.github.com/users/caofangkun/repos","events_url":"https://api.github.com/users/caofangkun/events{/privacy}","received_events_url":"https://api.github.com/users/caofangkun/received_events","type":"User","site_admin":false},"assignees":[{"login":"caofangkun","id":1931407,"avatar_url":"https://avatars.githubusercontent.com/u/1931407?v=3","gravatar_id":"","url":"https://api.github.com/users/caofangkun","html_url":"https://github.com/caofangkun","followers_url":"https://api.github.com/users/caofangkun/followers","following_url":"https://api.github.com/users/caofangkun/following{/other_user}","gists_url":"https://api.github.com/users/caofangkun/gists{/gist_id}","starred_url":"https://api.github.com/users/caofangkun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caofangkun/subscriptions","organizations_url":"https://api.github.com/users/caofangkun/orgs","repos_url":"https://api.github.com/users/caofangkun/repos","events_url":"https://api.github.com/users/caofangkun/events{/privacy}","received_events_url":"https://api.github.com/users/caofangkun/received_events","type":"User","site_admin":false},{"login":"objmagic","id":3656079,"avatar_url":"https://avatars.githubusercontent.com/u/3656079?v=3","gravatar_id":"","url":"https://api.github.com/users/objmagic","html_url":"https://github.com/objmagic","followers_url":"https://api.github.com/users/objmagic/followers","following_url":"https://api.github.com/users/objmagic/following{/other_user}","gists_url":"https://api.github.com/users/objmagic/gists{/gist_id}","starred_url":"https://api.github.com/users/objmagic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/objmagic/subscriptions","organizations_url":"https://api.github.com/users/objmagic/orgs","repos_url":"https://api.github.com/users/objmagic/repos","events_url":"https://api.github.com/users/objmagic/events{/privacy}","received_events_url":"https://api.github.com/users/objmagic/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/twitter/heron/milestones/6","html_url":"https://github.com/twitter/heron/milestones/0.14.3","labels_url":"https://api.github.com/repos/twitter/heron/milestones/6/labels","id":1750713,"number":6,"title":"0.14.3","description":"","creator":{"login":"kramasamy","id":367684,"avatar_url":"https://avatars.githubusercontent.com/u/367684?v=3","gravatar_id":"","url":"https://api.github.com/users/kramasamy","html_url":"https://github.com/kramasamy","followers_url":"https://api.github.com/users/kramasamy/followers","following_url":"https://api.github.com/users/kramasamy/following{/other_user}","gists_url":"https://api.github.com/users/kramasamy/gists{/gist_id}","starred_url":"https://api.github.com/users/kramasamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kramasamy/subscriptions","organizations_url":"https://api.github.com/users/kramasamy/orgs","repos_url":"https://api.github.com/users/kramasamy/repos","events_url":"https://api.github.com/users/kramasamy/events{/privacy}","received_events_url":"https://api.github.com/users/kramasamy/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":11,"state":"open","created_at":"2016-05-06T00:40:20Z","updated_at":"2016-09-02T17:12:40Z","due_on":null,"closed_at":null},"comments":31,"created_at":"2016-07-25T10:00:52Z","updated_at":"2016-09-08T18:10:29Z","closed_at":null,"body":"Hi,\r\n\r\nI tried to upgrade Storm topology with KafkaSpout following [http://twitter.github.io/heron/docs/upgrade-storm-to-heron/](http://twitter.github.io/heron/docs/upgrade-storm-to-heron/) guide.\r\n\r\nThe code is very simple and runs well in Storm, which looks like:\r\n\r\n````Java\r\npackage heron.kafka;\r\n\r\nimport backtype.storm.LocalCluster;\r\nimport backtype.storm.StormSubmitter;\r\nimport backtype.storm.generated.AlreadyAliveException;\r\nimport backtype.storm.topology.TopologyBuilder;\r\nimport com.twitter.heron.api.Config;\r\nimport storm.kafka.BrokerHosts;\r\nimport storm.kafka.KafkaSpout;\r\nimport storm.kafka.SpoutConfig;\r\nimport storm.kafka.ZkHosts;\r\n\r\nimport java.util.Arrays;\r\n\r\n/**\r\n * Created by Felix on 16/7/25.\r\n */\r\npublic class KafkaBaseTest {\r\n    public static void main(String[] args) throws AlreadyAliveException, backtype.storm.generated.InvalidTopologyException {\r\n\r\n        String zkConnString = \"127.0.0.1:2181\";\r\n        String topicName = \"test\";\r\n        String zkRoot = \"/felix/brokers\";\r\n\r\n        BrokerHosts hosts = new ZkHosts(zkConnString, zkRoot);\r\n        SpoutConfig spoutConfig = new SpoutConfig(hosts, topicName, \"/kafka/\" + topicName, \"felix\");\r\n        spoutConfig.scheme = new PrintScheme();\r\n\r\n        spoutConfig.zkServers = Arrays.asList(\"127.0.0.1\");\r\n        spoutConfig.zkPort = 2181;\r\n\r\n        KafkaSpout kafkaSpout = new KafkaSpout(spoutConfig);\r\n\r\n        TopologyBuilder builder = new TopologyBuilder();\r\n        builder.setSpout(\"kafka\", kafkaSpout);\r\n\r\n        Config conf = new Config();\r\n        // must set,or it will cause null exceptions\r\n        conf.put(\"storm.zookeeper.session.timeout\", 20000);\r\n        conf.put(\"storm.zookeeper.connection.timeout\", 15000);\r\n        conf.put(\"storm.zookeeper.retry.times\", 5);\r\n        conf.put(\"storm.zookeeper.retry.interval\", 1000);\r\n\r\n        StormSubmitter.submitTopology(\"Kafka-Base-Test\", conf, builder.createTopology());\r\n\r\n    }\r\n}\r\n````\r\n\r\nThere are two problems.\r\n*  I got an `NoClassDefFoundError: storm/trident/spout/ISpoutPartition` exception. When I put `storm-core` jar to my jar, the error disappeared, and the topology was running well. Logs are the following:\r\n````\r\n[2016-07-25 17:26:34 +0800] com.twitter.heron.instance.HeronInstance 严重:  Exception caught in thread: SlaveThread with id: 13 \r\njava.lang.NoClassDefFoundError: storm/trident/spout/ISpoutPartition\r\n\tat java.lang.ClassLoader.defineClass1(Native Method)\r\n\tat java.lang.ClassLoader.defineClass(ClassLoader.java:763)\r\n\tat java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)\r\n\tat java.net.URLClassLoader.defineClass(URLClassLoader.java:467)\r\n\tat java.net.URLClassLoader.access$100(URLClassLoader.java:73)\r\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:368)\r\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:362)\r\n\tat java.security.AccessController.doPrivileged(Native Method)\r\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:361)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:424)\r\n\tat sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n\tat storm.kafka.trident.GlobalPartitionInformation.getOrderedPartitions(GlobalPartitionInformation.java:54)\r\n\tat storm.kafka.KafkaUtils.calculatePartitionsForTask(KafkaUtils.java:214)\r\n\tat storm.kafka.ZkCoordinator.refresh(ZkCoordinator.java:80)\r\n\tat storm.kafka.ZkCoordinator.getMyManagedPartitions(ZkCoordinator.java:69)\r\n\tat storm.kafka.KafkaSpout.nextTuple(KafkaSpout.java:135)\r\n\tat backtype.storm.topology.IRichSpoutDelegate.nextTuple(IRichSpoutDelegate.java:63)\r\n\tat com.twitter.heron.instance.spout.SpoutInstance.produceTuple(SpoutInstance.java:271)\r\n\tat com.twitter.heron.instance.spout.SpoutInstance.access$100(SpoutInstance.java:42)\r\n\tat com.twitter.heron.instance.spout.SpoutInstance$1.run(SpoutInstance.java:176)\r\n\tat com.twitter.heron.common.basics.WakeableLooper.executeTasksOnWakeup(WakeableLooper.java:142)\r\n\tat com.twitter.heron.common.basics.WakeableLooper.runOnce(WakeableLooper.java:74)\r\n\tat com.twitter.heron.common.basics.WakeableLooper.loop(WakeableLooper.java:64)\r\n\tat com.twitter.heron.instance.Slave.run(Slave.java:169)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: java.lang.ClassNotFoundException: storm.trident.spout.ISpoutPartition\r\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:381)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:424)\r\n\tat sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n\t... 28 more\r\n````\r\n\r\n* The configurations like `storm.zookeeper.session.timeout`,`storm.zookeeper.connection.timeout`... etc must be set,or it will cause `null` exceptions when create `CuratorFramework` object in `ZkState` and `DynamicPartitionConnections` class. Logs are following:\r\n````\r\n[2016-07-25 15:26:39 +0800] com.twitter.heron.instance.HeronInstance 严重:  Exception caught in thread: SlaveThread with id: 13\r\n        java.lang.NullPointerException\r\n        at storm.kafka.KafkaSpout.open(KafkaSpout.java:80)\r\n        at backtype.storm.topology.IRichSpoutDelegate.open(IRichSpoutDelegate.java:43)\r\n        at com.twitter.heron.instance.spout.SpoutInstance.start(SpoutInstance.java:125)\r\n        at com.twitter.heron.instance.Slave.startInstance(Slave.java:173)\r\n        at com.twitter.heron.instance.Slave.handleNewAssignment(Slave.java:159)\r\n        at com.twitter.heron.instance.Slave.access$200(Slave.java:40)\r\n        at com.twitter.heron.instance.Slave$1.run(Slave.java:85)\r\n        at com.twitter.heron.common.basics.WakeableLooper.executeTasksOnWakeup(WakeableLooper.java:142)\r\n        at com.twitter.heron.common.basics.WakeableLooper.runOnce(WakeableLooper.java:74)\r\n        at com.twitter.heron.common.basics.WakeableLooper.loop(WakeableLooper.java:64)\r\n        at com.twitter.heron.instance.Slave.run(Slave.java:169)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n        at java.lang.Thread.run(Thread.java:745)\r\n````\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/twitter/heron/issues/comments/245687544","html_url":"https://github.com/twitter/heron/issues/1146#issuecomment-245687544","issue_url":"https://api.github.com/repos/twitter/heron/issues/1146","id":245687544,"user":{"login":"kramasamy","id":367684,"avatar_url":"https://avatars.githubusercontent.com/u/367684?v=3","gravatar_id":"","url":"https://api.github.com/users/kramasamy","html_url":"https://github.com/kramasamy","followers_url":"https://api.github.com/users/kramasamy/followers","following_url":"https://api.github.com/users/kramasamy/following{/other_user}","gists_url":"https://api.github.com/users/kramasamy/gists{/gist_id}","starred_url":"https://api.github.com/users/kramasamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kramasamy/subscriptions","organizations_url":"https://api.github.com/users/kramasamy/orgs","repos_url":"https://api.github.com/users/kramasamy/repos","events_url":"https://api.github.com/users/kramasamy/events{/privacy}","received_events_url":"https://api.github.com/users/kramasamy/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T18:10:29Z","updated_at":"2016-09-08T18:10:29Z","body":"this is fixed in #1299 "}}
{"actor":{"display_login":"kramasamy"}}