{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/168591609","pull_request_review_id":96986396,"id":168591609,"diff_hunk":"@@ -220,6 +221,50 @@ public void shouldRestoreAll() throws Exception {\n             \"c\");\n     }\n \n+    @Test\n+    public void shouldPutOnlyIfAbsentValue() throws Exception {\n+        subject.init(context, subject);\n+        final Bytes keyBytes = new Bytes(stringSerializer.serialize(null, \"one\"));\n+        final byte[] valueBytes = stringSerializer.serialize(null, \"A\");\n+        final byte[] valueBytesUpdate = stringSerializer.serialize(null, \"B\");\n+\n+        subject.putIfAbsent(keyBytes, valueBytes);\n+        subject.putIfAbsent(keyBytes, valueBytesUpdate);\n+\n+        final String retrievedValue = stringDeserializer.deserialize(null, subject.get(keyBytes));\n+        assertTrue(retrievedValue.equals(\"A\"));\n+    }\n+\n+    @Test\n+    public void shouldRetrieveFirstValue() throws Exception {\n+        final List<KeyValue<byte[], byte[]>> entries = getKeyValueEntries();\n+\n+        subject.init(context, subject);\n+        context.restore(subject.name(), entries);\n+\n+        final KeyValue<byte[], byte[]> keyValue = entries.get(0);\n+        final KeyValue<Bytes, byte[]> expectedKeyValue = KeyValue.pair(new Bytes(keyValue.key), keyValue.value);\n+        final KeyValue<Bytes, byte[]> firstRetrievedEntry = subject.first();\n+\n+        assertTrue(Arrays.equals(expectedKeyValue.key.get(), firstRetrievedEntry.key.get()));","path":"streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBStoreTest.java","position":37,"original_position":37,"commit_id":"cbd0a55a7a6b9fb4070e2738bfd507d517312421","original_commit_id":"cbd0a55a7a6b9fb4070e2738bfd507d517312421","user":{"login":"bbejeck","id":199238,"avatar_url":"https://avatars3.githubusercontent.com/u/199238?v=4","gravatar_id":"","url":"https://api.github.com/users/bbejeck","html_url":"https://github.com/bbejeck","followers_url":"https://api.github.com/users/bbejeck/followers","following_url":"https://api.github.com/users/bbejeck/following{/other_user}","gists_url":"https://api.github.com/users/bbejeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bbejeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbejeck/subscriptions","organizations_url":"https://api.github.com/users/bbejeck/orgs","repos_url":"https://api.github.com/users/bbejeck/repos","events_url":"https://api.github.com/users/bbejeck/events{/privacy}","received_events_url":"https://api.github.com/users/bbejeck/received_events","type":"User","site_admin":false},"body":"ack","created_at":"2018-02-15T20:01:08Z","updated_at":"2018-02-15T20:01:08Z","html_url":"https://github.com/apache/kafka/pull/4555#discussion_r168591609","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/4555","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/168591609"},"html":{"href":"https://github.com/apache/kafka/pull/4555#discussion_r168591609"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/4555"}},"in_reply_to_id":168580481},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/4555","id":168317680,"html_url":"https://github.com/apache/kafka/pull/4555","diff_url":"https://github.com/apache/kafka/pull/4555.diff","patch_url":"https://github.com/apache/kafka/pull/4555.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/4555","number":4555,"state":"open","locked":false,"title":"KAFKA-4651: improve test coverage of stores","user":{"login":"bbejeck","id":199238,"avatar_url":"https://avatars3.githubusercontent.com/u/199238?v=4","gravatar_id":"","url":"https://api.github.com/users/bbejeck","html_url":"https://github.com/bbejeck","followers_url":"https://api.github.com/users/bbejeck/followers","following_url":"https://api.github.com/users/bbejeck/following{/other_user}","gists_url":"https://api.github.com/users/bbejeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bbejeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbejeck/subscriptions","organizations_url":"https://api.github.com/users/bbejeck/orgs","repos_url":"https://api.github.com/users/bbejeck/repos","events_url":"https://api.github.com/users/bbejeck/events{/privacy}","received_events_url":"https://api.github.com/users/bbejeck/received_events","type":"User","site_admin":false},"body":"Working on increasing the coverage of stores in unit tests.  \r\nStarted with `InMemoryKeyValueLoggedStore` \r\n![screen shot 2018-02-09 at 1 15 11 pm](https://user-images.githubusercontent.com/199238/36044796-c7ddf31e-0da1-11e8-87a5-1d6727a5fe4d.png)\r\n![screen shot 2018-02-09 at 1 24 38 pm](https://user-images.githubusercontent.com/199238/36044805-cd1bc23e-0da1-11e8-9b57-8f8bfa0a21ea.png)\r\n\r\n\r\n\r\n\r\n\r\n### Committer Checklist (excluded from commit message)\r\n- [ ] Verify design and implementation \r\n- [ ] Verify test coverage and CI build status\r\n- [ ] Verify documentation (including upgrade notes)\r\n","created_at":"2018-02-09T19:03:21Z","updated_at":"2018-02-15T20:01:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dff4942c8390eef288dcd84aab6a9ab95f0186d2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dguy","id":54829,"avatar_url":"https://avatars2.githubusercontent.com/u/54829?v=4","gravatar_id":"","url":"https://api.github.com/users/dguy","html_url":"https://github.com/dguy","followers_url":"https://api.github.com/users/dguy/followers","following_url":"https://api.github.com/users/dguy/following{/other_user}","gists_url":"https://api.github.com/users/dguy/gists{/gist_id}","starred_url":"https://api.github.com/users/dguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dguy/subscriptions","organizations_url":"https://api.github.com/users/dguy/orgs","repos_url":"https://api.github.com/users/dguy/repos","events_url":"https://api.github.com/users/dguy/events{/privacy}","received_events_url":"https://api.github.com/users/dguy/received_events","type":"User","site_admin":false},{"login":"guozhangwang","id":10729597,"avatar_url":"https://avatars0.githubusercontent.com/u/10729597?v=4","gravatar_id":"","url":"https://api.github.com/users/guozhangwang","html_url":"https://github.com/guozhangwang","followers_url":"https://api.github.com/users/guozhangwang/followers","following_url":"https://api.github.com/users/guozhangwang/following{/other_user}","gists_url":"https://api.github.com/users/guozhangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/guozhangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guozhangwang/subscriptions","organizations_url":"https://api.github.com/users/guozhangwang/orgs","repos_url":"https://api.github.com/users/guozhangwang/repos","events_url":"https://api.github.com/users/guozhangwang/events{/privacy}","received_events_url":"https://api.github.com/users/guozhangwang/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":820747028,"url":"https://api.github.com/repos/apache/kafka/labels/streams","name":"streams","color":"63edea","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/4555/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/4555/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/4555/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/cbd0a55a7a6b9fb4070e2738bfd507d517312421","head":{"label":"bbejeck:KAFKA-4651_improve_test_coverage_of_stores","ref":"KAFKA-4651_improve_test_coverage_of_stores","sha":"cbd0a55a7a6b9fb4070e2738bfd507d517312421","user":{"login":"bbejeck","id":199238,"avatar_url":"https://avatars3.githubusercontent.com/u/199238?v=4","gravatar_id":"","url":"https://api.github.com/users/bbejeck","html_url":"https://github.com/bbejeck","followers_url":"https://api.github.com/users/bbejeck/followers","following_url":"https://api.github.com/users/bbejeck/following{/other_user}","gists_url":"https://api.github.com/users/bbejeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bbejeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbejeck/subscriptions","organizations_url":"https://api.github.com/users/bbejeck/orgs","repos_url":"https://api.github.com/users/bbejeck/repos","events_url":"https://api.github.com/users/bbejeck/events{/privacy}","received_events_url":"https://api.github.com/users/bbejeck/received_events","type":"User","site_admin":false},"repo":{"id":42054236,"name":"kafka","full_name":"bbejeck/kafka","owner":{"login":"bbejeck","id":199238,"avatar_url":"https://avatars3.githubusercontent.com/u/199238?v=4","gravatar_id":"","url":"https://api.github.com/users/bbejeck","html_url":"https://github.com/bbejeck","followers_url":"https://api.github.com/users/bbejeck/followers","following_url":"https://api.github.com/users/bbejeck/following{/other_user}","gists_url":"https://api.github.com/users/bbejeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bbejeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbejeck/subscriptions","organizations_url":"https://api.github.com/users/bbejeck/orgs","repos_url":"https://api.github.com/users/bbejeck/repos","events_url":"https://api.github.com/users/bbejeck/events{/privacy}","received_events_url":"https://api.github.com/users/bbejeck/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bbejeck/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/bbejeck/kafka","forks_url":"https://api.github.com/repos/bbejeck/kafka/forks","keys_url":"https://api.github.com/repos/bbejeck/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbejeck/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbejeck/kafka/teams","hooks_url":"https://api.github.com/repos/bbejeck/kafka/hooks","issue_events_url":"https://api.github.com/repos/bbejeck/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/bbejeck/kafka/events","assignees_url":"https://api.github.com/repos/bbejeck/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/bbejeck/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/bbejeck/kafka/tags","blobs_url":"https://api.github.com/repos/bbejeck/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbejeck/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbejeck/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbejeck/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbejeck/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/bbejeck/kafka/languages","stargazers_url":"https://api.github.com/repos/bbejeck/kafka/stargazers","contributors_url":"https://api.github.com/repos/bbejeck/kafka/contributors","subscribers_url":"https://api.github.com/repos/bbejeck/kafka/subscribers","subscription_url":"https://api.github.com/repos/bbejeck/kafka/subscription","commits_url":"https://api.github.com/repos/bbejeck/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbejeck/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbejeck/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbejeck/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbejeck/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/bbejeck/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbejeck/kafka/merges","archive_url":"https://api.github.com/repos/bbejeck/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbejeck/kafka/downloads","issues_url":"https://api.github.com/repos/bbejeck/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/bbejeck/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/bbejeck/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/bbejeck/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbejeck/kafka/labels{/name}","releases_url":"https://api.github.com/repos/bbejeck/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/bbejeck/kafka/deployments","created_at":"2015-09-07T13:23:16Z","updated_at":"2016-01-25T16:20:41Z","pushed_at":"2018-02-15T18:52:40Z","git_url":"git://github.com/bbejeck/kafka.git","ssh_url":"git@github.com:bbejeck/kafka.git","clone_url":"https://github.com/bbejeck/kafka.git","svn_url":"https://github.com/bbejeck/kafka","homepage":null,"size":60761,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"fc56a90e05a922722859ebc594736d6e7d3514ba","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":2211243,"name":"kafka","full_name":"apache/kafka","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/kafka","description":"Mirror of Apache Kafka","fork":false,"url":"https://api.github.com/repos/apache/kafka","forks_url":"https://api.github.com/repos/apache/kafka/forks","keys_url":"https://api.github.com/repos/apache/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/kafka/teams","hooks_url":"https://api.github.com/repos/apache/kafka/hooks","issue_events_url":"https://api.github.com/repos/apache/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/apache/kafka/events","assignees_url":"https://api.github.com/repos/apache/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/apache/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/apache/kafka/tags","blobs_url":"https://api.github.com/repos/apache/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/kafka/languages","stargazers_url":"https://api.github.com/repos/apache/kafka/stargazers","contributors_url":"https://api.github.com/repos/apache/kafka/contributors","subscribers_url":"https://api.github.com/repos/apache/kafka/subscribers","subscription_url":"https://api.github.com/repos/apache/kafka/subscription","commits_url":"https://api.github.com/repos/apache/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/apache/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/kafka/merges","archive_url":"https://api.github.com/repos/apache/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/kafka/downloads","issues_url":"https://api.github.com/repos/apache/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/apache/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/kafka/labels{/name}","releases_url":"https://api.github.com/repos/apache/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/apache/kafka/deployments","created_at":"2011-08-15T18:06:16Z","updated_at":"2018-02-15T13:34:14Z","pushed_at":"2018-02-15T19:57:56Z","git_url":"git://github.com/apache/kafka.git","ssh_url":"git@github.com:apache/kafka.git","clone_url":"https://github.com/apache/kafka.git","svn_url":"https://github.com/apache/kafka","homepage":null,"size":63047,"stargazers_count":7425,"watchers_count":7425,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4446,"mirror_url":null,"archived":false,"open_issues_count":434,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":4446,"open_issues":434,"watchers":7425,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/4555"},"html":{"href":"https://github.com/apache/kafka/pull/4555"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/4555"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/4555/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/4555/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/4555/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/cbd0a55a7a6b9fb4070e2738bfd507d517312421"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bbejeck"}}