{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/79236480","id":79236480,"diff_hunk":"@@ -1390,6 +1391,52 @@ public void resume(Collection<TopicPartition> partitions) {\n     }\n \n     /**\n+     * Look up the offsets for the given partitions by timestamp. The returned offset for each partition is the\n+     * earliest offset whose timestamp is greater than or equals to the given timestamp in the corresponding partition.\n+     *\n+     * This is a blocking call. The consumer does not have to be assigned the partitions.\n+     * If the message format version in a partition is before 0.10.0, i.e. the messages do not have timestamps, null\n+     * will be returned for that partition.\n+     *\n+     * @param timestampsToSearch the mapping from partition to the timestamp to look up.\n+     * @return For each partition, returns the timestamp and offset of the first message with timestamp greater\n+     *         than or equal to the target timestamp. {@code null} will be returned for the partition if there is no\n+     *         such message.\n+     */\n+    @Override\n+    public Map<TopicPartition, OffsetAndTimestamp> offsetsForTimes(Map<TopicPartition, Long> timestampsToSearch) {\n+        for (Map.Entry<TopicPartition, Long> entry : timestampsToSearch.entrySet()) {\n+            if (entry.getValue() < 0)\n+                throw new IllegalArgumentException(\"The target time for partition \" + entry.getKey() + \" is \" +","path":"clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java","position":28,"original_position":28,"commit_id":"59f78d2ab0d43761c80a93f78fa22acc975bd06e","original_commit_id":"59f78d2ab0d43761c80a93f78fa22acc975bd06e","user":{"login":"hachikuji","id":12502538,"avatar_url":"https://avatars.githubusercontent.com/u/12502538?v=3","gravatar_id":"","url":"https://api.github.com/users/hachikuji","html_url":"https://github.com/hachikuji","followers_url":"https://api.github.com/users/hachikuji/followers","following_url":"https://api.github.com/users/hachikuji/following{/other_user}","gists_url":"https://api.github.com/users/hachikuji/gists{/gist_id}","starred_url":"https://api.github.com/users/hachikuji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachikuji/subscriptions","organizations_url":"https://api.github.com/users/hachikuji/orgs","repos_url":"https://api.github.com/users/hachikuji/repos","events_url":"https://api.github.com/users/hachikuji/events{/privacy}","received_events_url":"https://api.github.com/users/hachikuji/received_events","type":"User","site_admin":false},"body":"nit: can you add this to the javadocs?","created_at":"2016-09-16T19:33:23Z","updated_at":"2016-09-16T19:35:31Z","html_url":"https://github.com/apache/kafka/pull/1852#discussion_r79236480","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/1852","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/79236480"},"html":{"href":"https://github.com/apache/kafka/pull/1852#discussion_r79236480"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/1852"}}},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/1852","id":85147788,"html_url":"https://github.com/apache/kafka/pull/1852","diff_url":"https://github.com/apache/kafka/pull/1852.diff","patch_url":"https://github.com/apache/kafka/pull/1852.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/1852","number":1852,"state":"open","locked":false,"title":"KAFKA-4148: KIP-79 ListOffsetRequest v1 and add search offsets by timestamp in consumer","user":{"login":"becketqin","id":5778611,"avatar_url":"https://avatars.githubusercontent.com/u/5778611?v=3","gravatar_id":"","url":"https://api.github.com/users/becketqin","html_url":"https://github.com/becketqin","followers_url":"https://api.github.com/users/becketqin/followers","following_url":"https://api.github.com/users/becketqin/following{/other_user}","gists_url":"https://api.github.com/users/becketqin/gists{/gist_id}","starred_url":"https://api.github.com/users/becketqin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/becketqin/subscriptions","organizations_url":"https://api.github.com/users/becketqin/orgs","repos_url":"https://api.github.com/users/becketqin/repos","events_url":"https://api.github.com/users/becketqin/events{/privacy}","received_events_url":"https://api.github.com/users/becketqin/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-14T00:13:57Z","updated_at":"2016-09-16T19:35:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14ec0676386b4c4035e82e796c724ac8508236ba","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/1852/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/1852/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/1852/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/59f78d2ab0d43761c80a93f78fa22acc975bd06e","head":{"label":"becketqin:KAFKA-4148","ref":"KAFKA-4148","sha":"59f78d2ab0d43761c80a93f78fa22acc975bd06e","user":{"login":"becketqin","id":5778611,"avatar_url":"https://avatars.githubusercontent.com/u/5778611?v=3","gravatar_id":"","url":"https://api.github.com/users/becketqin","html_url":"https://github.com/becketqin","followers_url":"https://api.github.com/users/becketqin/followers","following_url":"https://api.github.com/users/becketqin/following{/other_user}","gists_url":"https://api.github.com/users/becketqin/gists{/gist_id}","starred_url":"https://api.github.com/users/becketqin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/becketqin/subscriptions","organizations_url":"https://api.github.com/users/becketqin/orgs","repos_url":"https://api.github.com/users/becketqin/repos","events_url":"https://api.github.com/users/becketqin/events{/privacy}","received_events_url":"https://api.github.com/users/becketqin/received_events","type":"User","site_admin":false},"repo":{"id":21048134,"name":"kafka","full_name":"becketqin/kafka","owner":{"login":"becketqin","id":5778611,"avatar_url":"https://avatars.githubusercontent.com/u/5778611?v=3","gravatar_id":"","url":"https://api.github.com/users/becketqin","html_url":"https://github.com/becketqin","followers_url":"https://api.github.com/users/becketqin/followers","following_url":"https://api.github.com/users/becketqin/following{/other_user}","gists_url":"https://api.github.com/users/becketqin/gists{/gist_id}","starred_url":"https://api.github.com/users/becketqin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/becketqin/subscriptions","organizations_url":"https://api.github.com/users/becketqin/orgs","repos_url":"https://api.github.com/users/becketqin/repos","events_url":"https://api.github.com/users/becketqin/events{/privacy}","received_events_url":"https://api.github.com/users/becketqin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/becketqin/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/becketqin/kafka","forks_url":"https://api.github.com/repos/becketqin/kafka/forks","keys_url":"https://api.github.com/repos/becketqin/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/becketqin/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/becketqin/kafka/teams","hooks_url":"https://api.github.com/repos/becketqin/kafka/hooks","issue_events_url":"https://api.github.com/repos/becketqin/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/becketqin/kafka/events","assignees_url":"https://api.github.com/repos/becketqin/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/becketqin/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/becketqin/kafka/tags","blobs_url":"https://api.github.com/repos/becketqin/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/becketqin/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/becketqin/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/becketqin/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/becketqin/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/becketqin/kafka/languages","stargazers_url":"https://api.github.com/repos/becketqin/kafka/stargazers","contributors_url":"https://api.github.com/repos/becketqin/kafka/contributors","subscribers_url":"https://api.github.com/repos/becketqin/kafka/subscribers","subscription_url":"https://api.github.com/repos/becketqin/kafka/subscription","commits_url":"https://api.github.com/repos/becketqin/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/becketqin/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/becketqin/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/becketqin/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/becketqin/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/becketqin/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/becketqin/kafka/merges","archive_url":"https://api.github.com/repos/becketqin/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/becketqin/kafka/downloads","issues_url":"https://api.github.com/repos/becketqin/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/becketqin/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/becketqin/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/becketqin/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/becketqin/kafka/labels{/name}","releases_url":"https://api.github.com/repos/becketqin/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/becketqin/kafka/deployments","created_at":"2014-06-20T18:28:55Z","updated_at":"2014-06-20T18:28:55Z","pushed_at":"2016-09-15T18:29:12Z","git_url":"git://github.com/becketqin/kafka.git","ssh_url":"git@github.com:becketqin/kafka.git","clone_url":"https://github.com/becketqin/kafka.git","svn_url":"https://github.com/becketqin/kafka","homepage":null,"size":32644,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"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":"0.8.1"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"f3bb10413d11525a396851eb7e6b9d75b8c6fe23","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","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://avatars.githubusercontent.com/u/47359?v=3","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":"2016-09-16T12:56:06Z","pushed_at":"2016-09-16T19:14:10Z","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":48696,"stargazers_count":3767,"watchers_count":3767,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2345,"mirror_url":"git://git.apache.org/kafka.git","open_issues_count":255,"forks":2345,"open_issues":255,"watchers":3767,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/1852"},"html":{"href":"https://github.com/apache/kafka/pull/1852"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/1852"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/1852/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/1852/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/1852/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/59f78d2ab0d43761c80a93f78fa22acc975bd06e"}}}}
{"actor":{"display_login":"hachikuji"}}