{"action":"created","comment":{"url":"https://api.github.com/repos/locationtech/geomesa/pulls/comments/27124934","id":27124934,"diff_hunk":"@@ -65,7 +67,20 @@ class KafkaConsumerFeatureSource(entry: ContentEntry,\n     }\n   }\n \n-  val features = Maps.newConcurrentMap[String, FeatureHolder]()\n+  val cb = CacheBuilder.newBuilder()\n+\n+  if (expiry) {\n+    cb.expireAfterWrite(expirationPeriod, TimeUnit.MILLISECONDS)\n+      .removalListener(\n+        new RemovalListener[String, FeatureHolder] {\n+          def onRemoval(removal: RemovalNotification[String, FeatureHolder]) = {\n+            removeFeature(new Delete(removal.getKey))","path":"geomesa-kafka/geomesa-kafka-datastore/src/main/scala/org/locationtech/geomesa/kafka/KafkaConsumerFeatureSource.scala","position":35,"original_position":35,"commit_id":"166d193f9c36116bb8b2bfe22af8c534484acf9a","original_commit_id":"166d193f9c36116bb8b2bfe22af8c534484acf9a","user":{"login":"elahrvivaz","id":7715322,"avatar_url":"https://avatars.githubusercontent.com/u/7715322?v=3","gravatar_id":"","url":"https://api.github.com/users/elahrvivaz","html_url":"https://github.com/elahrvivaz","followers_url":"https://api.github.com/users/elahrvivaz/followers","following_url":"https://api.github.com/users/elahrvivaz/following{/other_user}","gists_url":"https://api.github.com/users/elahrvivaz/gists{/gist_id}","starred_url":"https://api.github.com/users/elahrvivaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elahrvivaz/subscriptions","organizations_url":"https://api.github.com/users/elahrvivaz/orgs","repos_url":"https://api.github.com/users/elahrvivaz/repos","events_url":"https://api.github.com/users/elahrvivaz/events{/privacy}","received_events_url":"https://api.github.com/users/elahrvivaz/received_events","type":"User","site_admin":false},"body":"Maybe add a test that doesn't call cleanup() on the cache and see if it works or not.","created_at":"2015-03-25T14:27:28Z","updated_at":"2015-03-25T14:27:28Z","html_url":"https://github.com/locationtech/geomesa/pull/504#discussion_r27124934","pull_request_url":"https://api.github.com/repos/locationtech/geomesa/pulls/504","_links":{"self":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/comments/27124934"},"html":{"href":"https://github.com/locationtech/geomesa/pull/504#discussion_r27124934"},"pull_request":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/504"}}},"pull_request":{"url":"https://api.github.com/repos/locationtech/geomesa/pulls/504","id":31645321,"html_url":"https://github.com/locationtech/geomesa/pull/504","diff_url":"https://github.com/locationtech/geomesa/pull/504.diff","patch_url":"https://github.com/locationtech/geomesa/pull/504.patch","issue_url":"https://api.github.com/repos/locationtech/geomesa/issues/504","number":504,"state":"open","locked":false,"title":"GEOMESA-725 Add configurable cache and TTL to KafkaDataStore","user":{"login":"jdk2pq","id":1759726,"avatar_url":"https://avatars.githubusercontent.com/u/1759726?v=3","gravatar_id":"","url":"https://api.github.com/users/jdk2pq","html_url":"https://github.com/jdk2pq","followers_url":"https://api.github.com/users/jdk2pq/followers","following_url":"https://api.github.com/users/jdk2pq/following{/other_user}","gists_url":"https://api.github.com/users/jdk2pq/gists{/gist_id}","starred_url":"https://api.github.com/users/jdk2pq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdk2pq/subscriptions","organizations_url":"https://api.github.com/users/jdk2pq/orgs","repos_url":"https://api.github.com/users/jdk2pq/repos","events_url":"https://api.github.com/users/jdk2pq/events{/privacy}","received_events_url":"https://api.github.com/users/jdk2pq/received_events","type":"User","site_admin":false},"body":"Added expiry and expirationPeriod options to KafkaDataStore params. If expiry is set to true, then\r\nthe queue of features uses a Guava Cache with an expiration period set to the expirationPeriod value in milliseconds.\r\n\r\nSigned-off-by: Jake Kenneally <jdk2pq@ccri.com>","created_at":"2015-03-20T19:40:03Z","updated_at":"2015-03-25T14:27:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e031987c1fbb4c11a6948b029690a91ac7f41f48","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/locationtech/geomesa/pulls/504/commits","review_comments_url":"https://api.github.com/repos/locationtech/geomesa/pulls/504/comments","review_comment_url":"https://api.github.com/repos/locationtech/geomesa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/locationtech/geomesa/issues/504/comments","statuses_url":"https://api.github.com/repos/locationtech/geomesa/statuses/166d193f9c36116bb8b2bfe22af8c534484acf9a","head":{"label":"jdk2pq:fcr_kafka_datastore_ttl","ref":"fcr_kafka_datastore_ttl","sha":"166d193f9c36116bb8b2bfe22af8c534484acf9a","user":{"login":"jdk2pq","id":1759726,"avatar_url":"https://avatars.githubusercontent.com/u/1759726?v=3","gravatar_id":"","url":"https://api.github.com/users/jdk2pq","html_url":"https://github.com/jdk2pq","followers_url":"https://api.github.com/users/jdk2pq/followers","following_url":"https://api.github.com/users/jdk2pq/following{/other_user}","gists_url":"https://api.github.com/users/jdk2pq/gists{/gist_id}","starred_url":"https://api.github.com/users/jdk2pq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdk2pq/subscriptions","organizations_url":"https://api.github.com/users/jdk2pq/orgs","repos_url":"https://api.github.com/users/jdk2pq/repos","events_url":"https://api.github.com/users/jdk2pq/events{/privacy}","received_events_url":"https://api.github.com/users/jdk2pq/received_events","type":"User","site_admin":false},"repo":{"id":21828819,"name":"geomesa","full_name":"jdk2pq/geomesa","owner":{"login":"jdk2pq","id":1759726,"avatar_url":"https://avatars.githubusercontent.com/u/1759726?v=3","gravatar_id":"","url":"https://api.github.com/users/jdk2pq","html_url":"https://github.com/jdk2pq","followers_url":"https://api.github.com/users/jdk2pq/followers","following_url":"https://api.github.com/users/jdk2pq/following{/other_user}","gists_url":"https://api.github.com/users/jdk2pq/gists{/gist_id}","starred_url":"https://api.github.com/users/jdk2pq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdk2pq/subscriptions","organizations_url":"https://api.github.com/users/jdk2pq/orgs","repos_url":"https://api.github.com/users/jdk2pq/repos","events_url":"https://api.github.com/users/jdk2pq/events{/privacy}","received_events_url":"https://api.github.com/users/jdk2pq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jdk2pq/geomesa","description":"","fork":true,"url":"https://api.github.com/repos/jdk2pq/geomesa","forks_url":"https://api.github.com/repos/jdk2pq/geomesa/forks","keys_url":"https://api.github.com/repos/jdk2pq/geomesa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdk2pq/geomesa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdk2pq/geomesa/teams","hooks_url":"https://api.github.com/repos/jdk2pq/geomesa/hooks","issue_events_url":"https://api.github.com/repos/jdk2pq/geomesa/issues/events{/number}","events_url":"https://api.github.com/repos/jdk2pq/geomesa/events","assignees_url":"https://api.github.com/repos/jdk2pq/geomesa/assignees{/user}","branches_url":"https://api.github.com/repos/jdk2pq/geomesa/branches{/branch}","tags_url":"https://api.github.com/repos/jdk2pq/geomesa/tags","blobs_url":"https://api.github.com/repos/jdk2pq/geomesa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdk2pq/geomesa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdk2pq/geomesa/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdk2pq/geomesa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdk2pq/geomesa/statuses/{sha}","languages_url":"https://api.github.com/repos/jdk2pq/geomesa/languages","stargazers_url":"https://api.github.com/repos/jdk2pq/geomesa/stargazers","contributors_url":"https://api.github.com/repos/jdk2pq/geomesa/contributors","subscribers_url":"https://api.github.com/repos/jdk2pq/geomesa/subscribers","subscription_url":"https://api.github.com/repos/jdk2pq/geomesa/subscription","commits_url":"https://api.github.com/repos/jdk2pq/geomesa/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdk2pq/geomesa/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdk2pq/geomesa/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdk2pq/geomesa/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdk2pq/geomesa/contents/{+path}","compare_url":"https://api.github.com/repos/jdk2pq/geomesa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdk2pq/geomesa/merges","archive_url":"https://api.github.com/repos/jdk2pq/geomesa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdk2pq/geomesa/downloads","issues_url":"https://api.github.com/repos/jdk2pq/geomesa/issues{/number}","pulls_url":"https://api.github.com/repos/jdk2pq/geomesa/pulls{/number}","milestones_url":"https://api.github.com/repos/jdk2pq/geomesa/milestones{/number}","notifications_url":"https://api.github.com/repos/jdk2pq/geomesa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdk2pq/geomesa/labels{/name}","releases_url":"https://api.github.com/repos/jdk2pq/geomesa/releases{/id}","created_at":"2014-07-14T17:34:44Z","updated_at":"2014-12-09T14:56:16Z","pushed_at":"2015-03-25T13:43:42Z","git_url":"git://github.com/jdk2pq/geomesa.git","ssh_url":"git@github.com:jdk2pq/geomesa.git","clone_url":"https://github.com/jdk2pq/geomesa.git","svn_url":"https://github.com/jdk2pq/geomesa","homepage":null,"size":94887,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"accumulo1.5.x/1.x"}},"base":{"label":"locationtech:accumulo1.5.x/1.x","ref":"accumulo1.5.x/1.x","sha":"309bb3f77c4978718d1afebb07c649e69031ac3b","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":"","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}","created_at":"2013-09-30T20:13:46Z","updated_at":"2015-03-25T02:40:50Z","pushed_at":"2015-03-25T14:23:18Z","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":null,"size":18723,"stargazers_count":59,"watchers_count":59,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":38,"mirror_url":null,"open_issues_count":10,"forks":38,"open_issues":10,"watchers":59,"default_branch":"accumulo1.5.x/1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/504"},"html":{"href":"https://github.com/locationtech/geomesa/pull/504"},"issue":{"href":"https://api.github.com/repos/locationtech/geomesa/issues/504"},"comments":{"href":"https://api.github.com/repos/locationtech/geomesa/issues/504/comments"},"review_comments":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/504/comments"},"review_comment":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/504/commits"},"statuses":{"href":"https://api.github.com/repos/locationtech/geomesa/statuses/166d193f9c36116bb8b2bfe22af8c534484acf9a"}}}}