{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/136877606","pull_request_review_id":60474317,"id":136877606,"diff_hunk":"@@ -0,0 +1,59 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements. See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License. You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.apache.kafka.streams.state.internals;\n+\n+import org.apache.kafka.common.serialization.Serdes;\n+import org.apache.kafka.common.utils.Bytes;\n+import org.apache.kafka.streams.state.SessionBytesStoreSupplier;\n+import org.apache.kafka.streams.state.SessionStore;\n+\n+import static org.apache.kafka.streams.state.internals.RocksDBSessionStoreSupplier.NUM_SEGMENTS;\n+\n+public class RocksDbSessionBytesStoreSupplier implements SessionBytesStoreSupplier {\n+    private final String name;\n+    private final long retentionPeriod;\n+\n+    public RocksDbSessionBytesStoreSupplier(final String name, final long retentionPeriod) {\n+        this.name = name;\n+        this.retentionPeriod = retentionPeriod;\n+    }\n+\n+    @Override\n+    public String name() {\n+        return name;\n+    }\n+\n+    @Override\n+    public SessionStore<Bytes, byte[]> get() {\n+        final SessionKeySchema keySchema = new SessionKeySchema();","path":"streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDbSessionBytesStoreSupplier.java","position":42,"original_position":42,"commit_id":"ac4d30a29f5753766096a6a659f8e20cd2290498","original_commit_id":"ac4d30a29f5753766096a6a659f8e20cd2290498","user":{"login":"mjsax","id":8959638,"avatar_url":"https://avatars1.githubusercontent.com/u/8959638?v=4","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},"body":"only used once. remove local var.","created_at":"2017-09-05T00:05:01Z","updated_at":"2017-09-05T00:17:00Z","html_url":"https://github.com/apache/kafka/pull/3767#discussion_r136877606","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/3767","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/136877606"},"html":{"href":"https://github.com/apache/kafka/pull/3767#discussion_r136877606"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/3767"}}},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/3767","id":138675373,"html_url":"https://github.com/apache/kafka/pull/3767","diff_url":"https://github.com/apache/kafka/pull/3767.diff","patch_url":"https://github.com/apache/kafka/pull/3767.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/3767","number":3767,"state":"open","locked":false,"title":"KAFKA-5650: add StateStoreBuilder interface and implementations","user":{"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},"body":"Part of KIP-182\r\n\r\n- Add `StateStoreBuilder` interface and `WindowStateStoreBuilder`, `KeyValueStateStoreBuilder`, and `SessionStateStoreBuilder` implementations\r\n- Add `StoreSupplier`, `WindowBytesStoreSupplier`, `KeyValueBytesStoreSupplier`, `SessionBytesStoreSupplier` interfaces and implementations\r\n- Add new methods to `Stores` to create the newly added `StoreSupplier` and `StateStoreBuilder` implementations\r\n- Update `Topology` and `InternalTopology` to use the interfaces","created_at":"2017-08-31T14:03:25Z","updated_at":"2017-09-05T00:17:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98c70099658e272aae37dc966c3331acfd709bdb","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/3767/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/3767/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/3767/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/ac4d30a29f5753766096a6a659f8e20cd2290498","head":{"label":"dguy:kafka-5650","ref":"kafka-5650","sha":"ac4d30a29f5753766096a6a659f8e20cd2290498","user":{"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},"repo":{"id":56393114,"name":"kafka","full_name":"dguy/kafka","owner":{"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},"private":false,"html_url":"https://github.com/dguy/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/dguy/kafka","forks_url":"https://api.github.com/repos/dguy/kafka/forks","keys_url":"https://api.github.com/repos/dguy/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dguy/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dguy/kafka/teams","hooks_url":"https://api.github.com/repos/dguy/kafka/hooks","issue_events_url":"https://api.github.com/repos/dguy/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/dguy/kafka/events","assignees_url":"https://api.github.com/repos/dguy/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/dguy/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/dguy/kafka/tags","blobs_url":"https://api.github.com/repos/dguy/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dguy/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dguy/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/dguy/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dguy/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/dguy/kafka/languages","stargazers_url":"https://api.github.com/repos/dguy/kafka/stargazers","contributors_url":"https://api.github.com/repos/dguy/kafka/contributors","subscribers_url":"https://api.github.com/repos/dguy/kafka/subscribers","subscription_url":"https://api.github.com/repos/dguy/kafka/subscription","commits_url":"https://api.github.com/repos/dguy/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/dguy/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/dguy/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/dguy/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/dguy/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/dguy/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dguy/kafka/merges","archive_url":"https://api.github.com/repos/dguy/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dguy/kafka/downloads","issues_url":"https://api.github.com/repos/dguy/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/dguy/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/dguy/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/dguy/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dguy/kafka/labels{/name}","releases_url":"https://api.github.com/repos/dguy/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/dguy/kafka/deployments","created_at":"2016-04-16T16:12:53Z","updated_at":"2016-04-16T16:12:57Z","pushed_at":"2017-09-04T16:50:00Z","git_url":"git://github.com/dguy/kafka.git","ssh_url":"git@github.com:dguy/kafka.git","clone_url":"https://github.com/dguy/kafka.git","svn_url":"https://github.com/dguy/kafka","homepage":null,"size":54744,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"ce04b14358054dd33134a596de97ef5594d187b7","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":"2017-09-04T13:52:37Z","pushed_at":"2017-09-04T20:34:37Z","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":55077,"stargazers_count":6045,"watchers_count":6045,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3706,"mirror_url":"git://git.apache.org/kafka.git","open_issues_count":444,"forks":3706,"open_issues":444,"watchers":6045,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/3767"},"html":{"href":"https://github.com/apache/kafka/pull/3767"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/3767"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/3767/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/3767/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/3767/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/ac4d30a29f5753766096a6a659f8e20cd2290498"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mjsax"}}