{"action":"created","comment":{"url":"https://api.github.com/repos/locationtech/geomesa/pulls/comments/54273880","id":54273880,"diff_hunk":"@@ -114,19 +124,86 @@ class LiveKafkaConsumerFeatureSource(entry: ContentEntry,\n     }, 0, 1, TimeUnit.SECONDS)\n   }\n \n-  override def run(): Unit = while (running.get) {\n-    queue.take() match {\n-      case update: CreateOrUpdate => featureCache.createOrUpdateFeature(update)\n-      case del: Delete            => featureCache.removeFeature(del)\n-      case clr: Clear             => featureCache.clear()\n-      case m                      => throw new IllegalArgumentException(s\"Unknown message: $m\")\n+  override def run(): Unit =\n+    while (running.get) {\n+      queue.take() match {\n+        case update: CreateOrUpdate =>\n+          fireEvent(KafkaFeatureEvent.changed(this, update.feature))","path":"geomesa-kafka/geomesa-kafka-datastore/src/main/scala/org/locationtech/geomesa/kafka/LiveKafkaConsumerFeatureSource.scala","position":55,"original_position":55,"commit_id":"8e28ade39af79055d5f7a460b0fd3a6af85d1880","original_commit_id":"8e28ade39af79055d5f7a460b0fd3a6af85d1880","user":{"login":"jnh5y","id":1915111,"avatar_url":"https://avatars.githubusercontent.com/u/1915111?v=3","gravatar_id":"","url":"https://api.github.com/users/jnh5y","html_url":"https://github.com/jnh5y","followers_url":"https://api.github.com/users/jnh5y/followers","following_url":"https://api.github.com/users/jnh5y/following{/other_user}","gists_url":"https://api.github.com/users/jnh5y/gists{/gist_id}","starred_url":"https://api.github.com/users/jnh5y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnh5y/subscriptions","organizations_url":"https://api.github.com/users/jnh5y/orgs","repos_url":"https://api.github.com/users/jnh5y/repos","events_url":"https://api.github.com/users/jnh5y/events{/privacy}","received_events_url":"https://api.github.com/users/jnh5y/received_events","type":"User","site_admin":false},"body":"@anthonyccri correctly noted that we ought to minimize object creation for the more common, no subscribed feature listeners.\r\n\r\nI think the most sensible way to support exactly what you are describing would be to push the listeners down into the FeatureCache.\r\n\r\nContentFeatureSouce.addFeatureListeners is sadly final, so doing that would require a bit of hack.","created_at":"2016-02-26T17:29:07Z","updated_at":"2016-02-26T17:29:07Z","html_url":"https://github.com/locationtech/geomesa/pull/815#discussion_r54273880","pull_request_url":"https://api.github.com/repos/locationtech/geomesa/pulls/815","_links":{"self":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/comments/54273880"},"html":{"href":"https://github.com/locationtech/geomesa/pull/815#discussion_r54273880"},"pull_request":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/815"}}},"pull_request":{"url":"https://api.github.com/repos/locationtech/geomesa/pulls/815","id":60596374,"html_url":"https://github.com/locationtech/geomesa/pull/815","diff_url":"https://github.com/locationtech/geomesa/pull/815.diff","patch_url":"https://github.com/locationtech/geomesa/pull/815.patch","issue_url":"https://api.github.com/repos/locationtech/geomesa/issues/815","number":815,"state":"open","locked":false,"title":"GEOMESA-1110 Implement KDS Feature Listener","user":{"login":"jnh5y","id":1915111,"avatar_url":"https://avatars.githubusercontent.com/u/1915111?v=3","gravatar_id":"","url":"https://api.github.com/users/jnh5y","html_url":"https://github.com/jnh5y","followers_url":"https://api.github.com/users/jnh5y/followers","following_url":"https://api.github.com/users/jnh5y/following{/other_user}","gists_url":"https://api.github.com/users/jnh5y/gists{/gist_id}","starred_url":"https://api.github.com/users/jnh5y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnh5y/subscriptions","organizations_url":"https://api.github.com/users/jnh5y/orgs","repos_url":"https://api.github.com/users/jnh5y/repos","events_url":"https://api.github.com/users/jnh5y/events{/privacy}","received_events_url":"https://api.github.com/users/jnh5y/received_events","type":"User","site_admin":false},"body":"* Adds event firing when KDS receives updates.\r\n* Add KafkaFeatureEvent class which contains the feature updated.\r\n\r\nRun the unit test with\r\n> mvn test -Dtest=LiveKafkaConsumerFeatureSourceTest -Dorg.locationtech.geomesa.test-kafka=true\r\n\r\nSigned-off-by: Jim Hughes <jnh5y@ccri.com>","created_at":"2016-02-24T23:14:23Z","updated_at":"2016-02-26T17:29:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"352cc7c765273773cc19cf42313b1d7a31c769d6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/locationtech/geomesa/pulls/815/commits","review_comments_url":"https://api.github.com/repos/locationtech/geomesa/pulls/815/comments","review_comment_url":"https://api.github.com/repos/locationtech/geomesa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/locationtech/geomesa/issues/815/comments","statuses_url":"https://api.github.com/repos/locationtech/geomesa/statuses/8e28ade39af79055d5f7a460b0fd3a6af85d1880","head":{"label":"jnh5y:fcr_featureEventListener","ref":"fcr_featureEventListener","sha":"8e28ade39af79055d5f7a460b0fd3a6af85d1880","user":{"login":"jnh5y","id":1915111,"avatar_url":"https://avatars.githubusercontent.com/u/1915111?v=3","gravatar_id":"","url":"https://api.github.com/users/jnh5y","html_url":"https://github.com/jnh5y","followers_url":"https://api.github.com/users/jnh5y/followers","following_url":"https://api.github.com/users/jnh5y/following{/other_user}","gists_url":"https://api.github.com/users/jnh5y/gists{/gist_id}","starred_url":"https://api.github.com/users/jnh5y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnh5y/subscriptions","organizations_url":"https://api.github.com/users/jnh5y/orgs","repos_url":"https://api.github.com/users/jnh5y/repos","events_url":"https://api.github.com/users/jnh5y/events{/privacy}","received_events_url":"https://api.github.com/users/jnh5y/received_events","type":"User","site_admin":false},"repo":{"id":21140000,"name":"geomesa","full_name":"jnh5y/geomesa","owner":{"login":"jnh5y","id":1915111,"avatar_url":"https://avatars.githubusercontent.com/u/1915111?v=3","gravatar_id":"","url":"https://api.github.com/users/jnh5y","html_url":"https://github.com/jnh5y","followers_url":"https://api.github.com/users/jnh5y/followers","following_url":"https://api.github.com/users/jnh5y/following{/other_user}","gists_url":"https://api.github.com/users/jnh5y/gists{/gist_id}","starred_url":"https://api.github.com/users/jnh5y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnh5y/subscriptions","organizations_url":"https://api.github.com/users/jnh5y/orgs","repos_url":"https://api.github.com/users/jnh5y/repos","events_url":"https://api.github.com/users/jnh5y/events{/privacy}","received_events_url":"https://api.github.com/users/jnh5y/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jnh5y/geomesa","description":"","fork":true,"url":"https://api.github.com/repos/jnh5y/geomesa","forks_url":"https://api.github.com/repos/jnh5y/geomesa/forks","keys_url":"https://api.github.com/repos/jnh5y/geomesa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jnh5y/geomesa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jnh5y/geomesa/teams","hooks_url":"https://api.github.com/repos/jnh5y/geomesa/hooks","issue_events_url":"https://api.github.com/repos/jnh5y/geomesa/issues/events{/number}","events_url":"https://api.github.com/repos/jnh5y/geomesa/events","assignees_url":"https://api.github.com/repos/jnh5y/geomesa/assignees{/user}","branches_url":"https://api.github.com/repos/jnh5y/geomesa/branches{/branch}","tags_url":"https://api.github.com/repos/jnh5y/geomesa/tags","blobs_url":"https://api.github.com/repos/jnh5y/geomesa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jnh5y/geomesa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jnh5y/geomesa/git/refs{/sha}","trees_url":"https://api.github.com/repos/jnh5y/geomesa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jnh5y/geomesa/statuses/{sha}","languages_url":"https://api.github.com/repos/jnh5y/geomesa/languages","stargazers_url":"https://api.github.com/repos/jnh5y/geomesa/stargazers","contributors_url":"https://api.github.com/repos/jnh5y/geomesa/contributors","subscribers_url":"https://api.github.com/repos/jnh5y/geomesa/subscribers","subscription_url":"https://api.github.com/repos/jnh5y/geomesa/subscription","commits_url":"https://api.github.com/repos/jnh5y/geomesa/commits{/sha}","git_commits_url":"https://api.github.com/repos/jnh5y/geomesa/git/commits{/sha}","comments_url":"https://api.github.com/repos/jnh5y/geomesa/comments{/number}","issue_comment_url":"https://api.github.com/repos/jnh5y/geomesa/issues/comments{/number}","contents_url":"https://api.github.com/repos/jnh5y/geomesa/contents/{+path}","compare_url":"https://api.github.com/repos/jnh5y/geomesa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jnh5y/geomesa/merges","archive_url":"https://api.github.com/repos/jnh5y/geomesa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jnh5y/geomesa/downloads","issues_url":"https://api.github.com/repos/jnh5y/geomesa/issues{/number}","pulls_url":"https://api.github.com/repos/jnh5y/geomesa/pulls{/number}","milestones_url":"https://api.github.com/repos/jnh5y/geomesa/milestones{/number}","notifications_url":"https://api.github.com/repos/jnh5y/geomesa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jnh5y/geomesa/labels{/name}","releases_url":"https://api.github.com/repos/jnh5y/geomesa/releases{/id}","deployments_url":"https://api.github.com/repos/jnh5y/geomesa/deployments","created_at":"2014-06-23T19:49:49Z","updated_at":"2016-01-25T21:26:46Z","pushed_at":"2016-02-26T16:37:52Z","git_url":"git://github.com/jnh5y/geomesa.git","ssh_url":"git@github.com:jnh5y/geomesa.git","clone_url":"https://github.com/jnh5y/geomesa.git","svn_url":"https://github.com/jnh5y/geomesa","homepage":null,"size":55182,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"accumulo1.5.x/1.x"}},"base":{"label":"locationtech:master","ref":"master","sha":"011bb12f92ae6f0226d6f5f2f3769aa96888d90d","user":{"login":"locationtech","id":1991411,"avatar_url":"https://avatars.githubusercontent.com/u/1991411?v=3","gravatar_id":"","url":"https://api.github.com/users/locationtech","html_url":"https://github.com/locationtech","followers_url":"https://api.github.com/users/locationtech/followers","following_url":"https://api.github.com/users/locationtech/following{/other_user}","gists_url":"https://api.github.com/users/locationtech/gists{/gist_id}","starred_url":"https://api.github.com/users/locationtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locationtech/subscriptions","organizations_url":"https://api.github.com/users/locationtech/orgs","repos_url":"https://api.github.com/users/locationtech/repos","events_url":"https://api.github.com/users/locationtech/events{/privacy}","received_events_url":"https://api.github.com/users/locationtech/received_events","type":"Organization","site_admin":false},"repo":{"id":13226069,"name":"geomesa","full_name":"locationtech/geomesa","owner":{"login":"locationtech","id":1991411,"avatar_url":"https://avatars.githubusercontent.com/u/1991411?v=3","gravatar_id":"","url":"https://api.github.com/users/locationtech","html_url":"https://github.com/locationtech","followers_url":"https://api.github.com/users/locationtech/followers","following_url":"https://api.github.com/users/locationtech/following{/other_user}","gists_url":"https://api.github.com/users/locationtech/gists{/gist_id}","starred_url":"https://api.github.com/users/locationtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locationtech/subscriptions","organizations_url":"https://api.github.com/users/locationtech/orgs","repos_url":"https://api.github.com/users/locationtech/repos","events_url":"https://api.github.com/users/locationtech/events{/privacy}","received_events_url":"https://api.github.com/users/locationtech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/locationtech/geomesa","description":"GeoMesa is a suite of tools for working with big geo-spatial data in a distributed fashion.","fork":false,"url":"https://api.github.com/repos/locationtech/geomesa","forks_url":"https://api.github.com/repos/locationtech/geomesa/forks","keys_url":"https://api.github.com/repos/locationtech/geomesa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/locationtech/geomesa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/locationtech/geomesa/teams","hooks_url":"https://api.github.com/repos/locationtech/geomesa/hooks","issue_events_url":"https://api.github.com/repos/locationtech/geomesa/issues/events{/number}","events_url":"https://api.github.com/repos/locationtech/geomesa/events","assignees_url":"https://api.github.com/repos/locationtech/geomesa/assignees{/user}","branches_url":"https://api.github.com/repos/locationtech/geomesa/branches{/branch}","tags_url":"https://api.github.com/repos/locationtech/geomesa/tags","blobs_url":"https://api.github.com/repos/locationtech/geomesa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/locationtech/geomesa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/locationtech/geomesa/git/refs{/sha}","trees_url":"https://api.github.com/repos/locationtech/geomesa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/locationtech/geomesa/statuses/{sha}","languages_url":"https://api.github.com/repos/locationtech/geomesa/languages","stargazers_url":"https://api.github.com/repos/locationtech/geomesa/stargazers","contributors_url":"https://api.github.com/repos/locationtech/geomesa/contributors","subscribers_url":"https://api.github.com/repos/locationtech/geomesa/subscribers","subscription_url":"https://api.github.com/repos/locationtech/geomesa/subscription","commits_url":"https://api.github.com/repos/locationtech/geomesa/commits{/sha}","git_commits_url":"https://api.github.com/repos/locationtech/geomesa/git/commits{/sha}","comments_url":"https://api.github.com/repos/locationtech/geomesa/comments{/number}","issue_comment_url":"https://api.github.com/repos/locationtech/geomesa/issues/comments{/number}","contents_url":"https://api.github.com/repos/locationtech/geomesa/contents/{+path}","compare_url":"https://api.github.com/repos/locationtech/geomesa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/locationtech/geomesa/merges","archive_url":"https://api.github.com/repos/locationtech/geomesa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/locationtech/geomesa/downloads","issues_url":"https://api.github.com/repos/locationtech/geomesa/issues{/number}","pulls_url":"https://api.github.com/repos/locationtech/geomesa/pulls{/number}","milestones_url":"https://api.github.com/repos/locationtech/geomesa/milestones{/number}","notifications_url":"https://api.github.com/repos/locationtech/geomesa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/locationtech/geomesa/labels{/name}","releases_url":"https://api.github.com/repos/locationtech/geomesa/releases{/id}","deployments_url":"https://api.github.com/repos/locationtech/geomesa/deployments","created_at":"2013-09-30T20:13:46Z","updated_at":"2016-02-26T16:51:07Z","pushed_at":"2016-02-26T16:37:53Z","git_url":"git://github.com/locationtech/geomesa.git","ssh_url":"git@github.com:locationtech/geomesa.git","clone_url":"https://github.com/locationtech/geomesa.git","svn_url":"https://github.com/locationtech/geomesa","homepage":"https://www.locationtech.org/projects/technology.geomesa","size":36042,"stargazers_count":130,"watchers_count":130,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":76,"mirror_url":null,"open_issues_count":6,"forks":76,"open_issues":6,"watchers":130,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/815"},"html":{"href":"https://github.com/locationtech/geomesa/pull/815"},"issue":{"href":"https://api.github.com/repos/locationtech/geomesa/issues/815"},"comments":{"href":"https://api.github.com/repos/locationtech/geomesa/issues/815/comments"},"review_comments":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/815/comments"},"review_comment":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/815/commits"},"statuses":{"href":"https://api.github.com/repos/locationtech/geomesa/statuses/8e28ade39af79055d5f7a460b0fd3a6af85d1880"}}}}