{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-druid/pulls/comments/212173511","pull_request_review_id":148747102,"id":212173511,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjE3MzUxMQ==","diff_hunk":"@@ -1480,31 +1506,38 @@ private void checkTaskDuration() throws InterruptedException, ExecutionException\n         String taskId = taskEntry.getKey();\n         TaskData task = taskEntry.getValue();\n \n-        if (task.status.isSuccess()) {\n-          // If any task in this group has already completed, stop the rest of the tasks in the group and return.\n-          // This will cause us to create a new set of tasks next cycle that will start from the offsets in\n-          // metadata store (which will have advanced if we succeeded in publishing and will remain the same if publishing\n-          // failed and we need to re-ingest)\n-          return Futures.transform(\n-              stopTasksInGroup(taskGroup),\n-              new Function<Object, Map<Integer, Long>>()\n-              {\n-                @Nullable\n-                @Override\n-                public Map<Integer, Long> apply(@Nullable Object input)\n+        // task.status can be null if any runNotice is processed before kafkaSupervisor is stopped gracefully.\n+        if (task.status != null) {\n+          if (task.status.isSuccess()) {\n+            // If any task in this group has already completed, stop the rest of the tasks in the group and return.\n+            // This will cause us to create a new set of tasks next cycle that will start from the offsets in\n+            // metadata store (which will have advanced if we succeeded in publishing and will remain the same if\n+            // publishing failed and we need to re-ingest)\n+            return Futures.transform(\n+                stopTasksInGroup(taskGroup),\n+                new Function<Object, Map<Integer, Long>>()\n                 {\n-                  return null;\n+                  @Nullable\n+                  @Override\n+                  public Map<Integer, Long> apply(@Nullable Object input)\n+                  {\n+                    return null;\n+                  }\n                 }\n-              }\n-          );\n-        }\n+            );\n+          }\n \n-        if (task.status.isRunnable()) {\n-          if (taskInfoProvider.getTaskLocation(taskId).equals(TaskLocation.unknown())) {\n-            log.info(\"Killing task [%s] which hasn't been assigned to a worker\", taskId);\n-            killTask(taskId);\n-            i.remove();\n+          if (task.status.isRunnable()) {\n+            if (taskInfoProvider.getTaskLocation(taskId).equals(TaskLocation.unknown())) {\n+              log.info(\"Killing task [%s] which hasn't been assigned to a worker\", taskId);\n+              killTask(taskId);\n+              i.remove();\n+            }\n           }\n+        } else {\n+          log.info(\"Killing task [%s] of unknown status\", taskId);","path":"extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/supervisor/KafkaSupervisor.java","position":235,"original_position":235,"commit_id":"d2cfbd309e6a249918ff7aecaafa887bf2821f52","original_commit_id":"c46d4681c334709caa5cddbd0ce0c67a7d22eaad","user":{"login":"jihoonson","id":2322288,"node_id":"MDQ6VXNlcjIzMjIyODg=","avatar_url":"https://avatars3.githubusercontent.com/u/2322288?v=4","gravatar_id":"","url":"https://api.github.com/users/jihoonson","html_url":"https://github.com/jihoonson","followers_url":"https://api.github.com/users/jihoonson/followers","following_url":"https://api.github.com/users/jihoonson/following{/other_user}","gists_url":"https://api.github.com/users/jihoonson/gists{/gist_id}","starred_url":"https://api.github.com/users/jihoonson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jihoonson/subscriptions","organizations_url":"https://api.github.com/users/jihoonson/orgs","repos_url":"https://api.github.com/users/jihoonson/repos","events_url":"https://api.github.com/users/jihoonson/events{/privacy}","received_events_url":"https://api.github.com/users/jihoonson/received_events","type":"User","site_admin":false},"body":"Probably we shouldn't checkpoint while stopping the supervisor, and this would be a different issue.","created_at":"2018-08-23T03:33:16Z","updated_at":"2018-08-23T03:33:16Z","html_url":"https://github.com/apache/incubator-druid/pull/6206#discussion_r212173511","pull_request_url":"https://api.github.com/repos/apache/incubator-druid/pulls/6206","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-druid/pulls/comments/212173511"},"html":{"href":"https://github.com/apache/incubator-druid/pull/6206#discussion_r212173511"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-druid/pulls/6206"}},"in_reply_to_id":212164734},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-druid/pulls/6206","id":209987385,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5OTg3Mzg1","html_url":"https://github.com/apache/incubator-druid/pull/6206","diff_url":"https://github.com/apache/incubator-druid/pull/6206.diff","patch_url":"https://github.com/apache/incubator-druid/pull/6206.patch","issue_url":"https://api.github.com/repos/apache/incubator-druid/issues/6206","number":6206,"state":"open","locked":false,"title":"Fix NPE in KafkaSupervisor.checkpointTaskGroup","user":{"login":"jihoonson","id":2322288,"node_id":"MDQ6VXNlcjIzMjIyODg=","avatar_url":"https://avatars3.githubusercontent.com/u/2322288?v=4","gravatar_id":"","url":"https://api.github.com/users/jihoonson","html_url":"https://github.com/jihoonson","followers_url":"https://api.github.com/users/jihoonson/followers","following_url":"https://api.github.com/users/jihoonson/following{/other_user}","gists_url":"https://api.github.com/users/jihoonson/gists{/gist_id}","starred_url":"https://api.github.com/users/jihoonson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jihoonson/subscriptions","organizations_url":"https://api.github.com/users/jihoonson/orgs","repos_url":"https://api.github.com/users/jihoonson/repos","events_url":"https://api.github.com/users/jihoonson/events{/privacy}","received_events_url":"https://api.github.com/users/jihoonson/received_events","type":"User","site_admin":false},"body":"Hopefully fixes https://github.com/apache/incubator-druid/issues/6021.\r\n\r\n`TaskData.status` and `TaskData.startTime` can be null if the supervisor is stopped gracefully before processing any runNotice which sets them properly.","created_at":"2018-08-21T23:59:46Z","updated_at":"2018-08-23T03:33:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76813993df54efe6de706daf77b69043dc577082","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":690563043,"node_id":"MDU6TGFiZWw2OTA1NjMwNDM=","url":"https://api.github.com/repos/apache/incubator-druid/labels/Area%20-%20Kafka%20Indexing","name":"Area - Kafka Indexing","color":"fef2c0","default":false},{"id":17287685,"node_id":"MDU6TGFiZWwxNzI4NzY4NQ==","url":"https://api.github.com/repos/apache/incubator-druid/labels/Bug","name":"Bug","color":"fc2929","default":false}],"milestone":{"url":"https://api.github.com/repos/apache/incubator-druid/milestones/28","html_url":"https://github.com/apache/incubator-druid/milestone/28","labels_url":"https://api.github.com/repos/apache/incubator-druid/milestones/28/labels","id":3557007,"node_id":"MDk6TWlsZXN0b25lMzU1NzAwNw==","number":28,"title":"0.12.3","description":"","creator":{"login":"jihoonson","id":2322288,"node_id":"MDQ6VXNlcjIzMjIyODg=","avatar_url":"https://avatars3.githubusercontent.com/u/2322288?v=4","gravatar_id":"","url":"https://api.github.com/users/jihoonson","html_url":"https://github.com/jihoonson","followers_url":"https://api.github.com/users/jihoonson/followers","following_url":"https://api.github.com/users/jihoonson/following{/other_user}","gists_url":"https://api.github.com/users/jihoonson/gists{/gist_id}","starred_url":"https://api.github.com/users/jihoonson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jihoonson/subscriptions","organizations_url":"https://api.github.com/users/jihoonson/orgs","repos_url":"https://api.github.com/users/jihoonson/repos","events_url":"https://api.github.com/users/jihoonson/events{/privacy}","received_events_url":"https://api.github.com/users/jihoonson/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":18,"state":"open","created_at":"2018-08-08T23:28:04Z","updated_at":"2018-08-22T23:38:37Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/apache/incubator-druid/pulls/6206/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-druid/pulls/6206/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-druid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-druid/issues/6206/comments","statuses_url":"https://api.github.com/repos/apache/incubator-druid/statuses/d2cfbd309e6a249918ff7aecaafa887bf2821f52","head":{"label":"jihoonson:fix-npe-checkpoint-taskgroup","ref":"fix-npe-checkpoint-taskgroup","sha":"d2cfbd309e6a249918ff7aecaafa887bf2821f52","user":{"login":"jihoonson","id":2322288,"node_id":"MDQ6VXNlcjIzMjIyODg=","avatar_url":"https://avatars3.githubusercontent.com/u/2322288?v=4","gravatar_id":"","url":"https://api.github.com/users/jihoonson","html_url":"https://github.com/jihoonson","followers_url":"https://api.github.com/users/jihoonson/followers","following_url":"https://api.github.com/users/jihoonson/following{/other_user}","gists_url":"https://api.github.com/users/jihoonson/gists{/gist_id}","starred_url":"https://api.github.com/users/jihoonson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jihoonson/subscriptions","organizations_url":"https://api.github.com/users/jihoonson/orgs","repos_url":"https://api.github.com/users/jihoonson/repos","events_url":"https://api.github.com/users/jihoonson/events{/privacy}","received_events_url":"https://api.github.com/users/jihoonson/received_events","type":"User","site_admin":false},"repo":{"id":71565181,"node_id":"MDEwOlJlcG9zaXRvcnk3MTU2NTE4MQ==","name":"druid","full_name":"jihoonson/druid","owner":{"login":"jihoonson","id":2322288,"node_id":"MDQ6VXNlcjIzMjIyODg=","avatar_url":"https://avatars3.githubusercontent.com/u/2322288?v=4","gravatar_id":"","url":"https://api.github.com/users/jihoonson","html_url":"https://github.com/jihoonson","followers_url":"https://api.github.com/users/jihoonson/followers","following_url":"https://api.github.com/users/jihoonson/following{/other_user}","gists_url":"https://api.github.com/users/jihoonson/gists{/gist_id}","starred_url":"https://api.github.com/users/jihoonson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jihoonson/subscriptions","organizations_url":"https://api.github.com/users/jihoonson/orgs","repos_url":"https://api.github.com/users/jihoonson/repos","events_url":"https://api.github.com/users/jihoonson/events{/privacy}","received_events_url":"https://api.github.com/users/jihoonson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jihoonson/druid","description":"Column oriented distributed data store ideal for powering interactive applications","fork":true,"url":"https://api.github.com/repos/jihoonson/druid","forks_url":"https://api.github.com/repos/jihoonson/druid/forks","keys_url":"https://api.github.com/repos/jihoonson/druid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jihoonson/druid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jihoonson/druid/teams","hooks_url":"https://api.github.com/repos/jihoonson/druid/hooks","issue_events_url":"https://api.github.com/repos/jihoonson/druid/issues/events{/number}","events_url":"https://api.github.com/repos/jihoonson/druid/events","assignees_url":"https://api.github.com/repos/jihoonson/druid/assignees{/user}","branches_url":"https://api.github.com/repos/jihoonson/druid/branches{/branch}","tags_url":"https://api.github.com/repos/jihoonson/druid/tags","blobs_url":"https://api.github.com/repos/jihoonson/druid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jihoonson/druid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jihoonson/druid/git/refs{/sha}","trees_url":"https://api.github.com/repos/jihoonson/druid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jihoonson/druid/statuses/{sha}","languages_url":"https://api.github.com/repos/jihoonson/druid/languages","stargazers_url":"https://api.github.com/repos/jihoonson/druid/stargazers","contributors_url":"https://api.github.com/repos/jihoonson/druid/contributors","subscribers_url":"https://api.github.com/repos/jihoonson/druid/subscribers","subscription_url":"https://api.github.com/repos/jihoonson/druid/subscription","commits_url":"https://api.github.com/repos/jihoonson/druid/commits{/sha}","git_commits_url":"https://api.github.com/repos/jihoonson/druid/git/commits{/sha}","comments_url":"https://api.github.com/repos/jihoonson/druid/comments{/number}","issue_comment_url":"https://api.github.com/repos/jihoonson/druid/issues/comments{/number}","contents_url":"https://api.github.com/repos/jihoonson/druid/contents/{+path}","compare_url":"https://api.github.com/repos/jihoonson/druid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jihoonson/druid/merges","archive_url":"https://api.github.com/repos/jihoonson/druid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jihoonson/druid/downloads","issues_url":"https://api.github.com/repos/jihoonson/druid/issues{/number}","pulls_url":"https://api.github.com/repos/jihoonson/druid/pulls{/number}","milestones_url":"https://api.github.com/repos/jihoonson/druid/milestones{/number}","notifications_url":"https://api.github.com/repos/jihoonson/druid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jihoonson/druid/labels{/name}","releases_url":"https://api.github.com/repos/jihoonson/druid/releases{/id}","deployments_url":"https://api.github.com/repos/jihoonson/druid/deployments","created_at":"2016-10-21T13:05:19Z","updated_at":"2018-07-06T15:32:53Z","pushed_at":"2018-08-23T03:31:58Z","git_url":"git://github.com/jihoonson/druid.git","ssh_url":"git@github.com:jihoonson/druid.git","clone_url":"https://github.com/jihoonson/druid.git","svn_url":"https://github.com/jihoonson/druid","homepage":"http://druid.io","size":145427,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"9c500fb69ff11464f595491cd2c2967828f30ca9","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","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":6358188,"node_id":"MDEwOlJlcG9zaXRvcnk2MzU4MTg4","name":"incubator-druid","full_name":"apache/incubator-druid","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","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/incubator-druid","description":"Apache Druid (Incubating) - Column oriented distributed data store ideal for powering interactive applications","fork":false,"url":"https://api.github.com/repos/apache/incubator-druid","forks_url":"https://api.github.com/repos/apache/incubator-druid/forks","keys_url":"https://api.github.com/repos/apache/incubator-druid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-druid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-druid/teams","hooks_url":"https://api.github.com/repos/apache/incubator-druid/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-druid/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-druid/events","assignees_url":"https://api.github.com/repos/apache/incubator-druid/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-druid/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-druid/tags","blobs_url":"https://api.github.com/repos/apache/incubator-druid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-druid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-druid/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-druid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-druid/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-druid/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-druid/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-druid/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-druid/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-druid/subscription","commits_url":"https://api.github.com/repos/apache/incubator-druid/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-druid/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-druid/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-druid/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-druid/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-druid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-druid/merges","archive_url":"https://api.github.com/repos/apache/incubator-druid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-druid/downloads","issues_url":"https://api.github.com/repos/apache/incubator-druid/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-druid/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-druid/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-druid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-druid/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-druid/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-druid/deployments","created_at":"2012-10-23T19:08:07Z","updated_at":"2018-08-23T03:30:37Z","pushed_at":"2018-08-23T03:32:01Z","git_url":"git://github.com/apache/incubator-druid.git","ssh_url":"git@github.com:apache/incubator-druid.git","clone_url":"https://github.com/apache/incubator-druid.git","svn_url":"https://github.com/apache/incubator-druid","homepage":"http://druid.io","size":144630,"stargazers_count":6896,"watchers_count":6896,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1693,"mirror_url":null,"archived":false,"open_issues_count":1154,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1693,"open_issues":1154,"watchers":6896,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-druid/pulls/6206"},"html":{"href":"https://github.com/apache/incubator-druid/pull/6206"},"issue":{"href":"https://api.github.com/repos/apache/incubator-druid/issues/6206"},"comments":{"href":"https://api.github.com/repos/apache/incubator-druid/issues/6206/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-druid/pulls/6206/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-druid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-druid/pulls/6206/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-druid/statuses/d2cfbd309e6a249918ff7aecaafa887bf2821f52"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jihoonson"}}