{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/33600660","id":33600660,"diff_hunk":"@@ -92,15 +92,18 @@ class ExecutorsListener(storageStatusListener: StorageStatusListener) extends Sp\n     val info = taskEnd.taskInfo\n     if (info != null) {\n       val eid = info.executorId\n-      executorToTasksActive(eid) = executorToTasksActive.getOrElse(eid, 1) - 1\n-      executorToDuration(eid) = executorToDuration.getOrElse(eid, 0L) + info.duration\n       taskEnd.reason match {\n+        case Resubmitted =>\n+          return","path":"core/src/main/scala/org/apache/spark/ui/exec/ExecutorsTab.scala","position":17,"original_position":17,"commit_id":"af35dc339cddd856d3bff2fab63ec4b3f544d02c","original_commit_id":"af35dc339cddd856d3bff2fab63ec4b3f544d02c","user":{"login":"andrewor14","id":2133137,"avatar_url":"https://avatars.githubusercontent.com/u/2133137?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewor14","html_url":"https://github.com/andrewor14","followers_url":"https://api.github.com/users/andrewor14/followers","following_url":"https://api.github.com/users/andrewor14/following{/other_user}","gists_url":"https://api.github.com/users/andrewor14/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewor14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewor14/subscriptions","organizations_url":"https://api.github.com/users/andrewor14/orgs","repos_url":"https://api.github.com/users/andrewor14/repos","events_url":"https://api.github.com/users/andrewor14/events{/privacy}","received_events_url":"https://api.github.com/users/andrewor14/received_events","type":"User","site_admin":false},"body":"hm, technically this is still incorrect because it uses the metrics of the first attempt of this task, which might be incomplete. However, a correct fix would be much more complicated (you have to essentially revert the metrics added in the failed task).\r\n\r\nWe should at least add a comment:\r\n```\r\n// Note: For resubmitted tasks, we continue to use the metrics that belong to the\r\n// first attempt of this task. This may not be 100% accurate because the first attempt\r\n// could have failed half-way through. The correct fix would be to keep track of the\r\n// metrics added by each attempt, but this is more complicated.\r\n```","created_at":"2015-06-30T17:37:16Z","updated_at":"2015-06-30T17:37:16Z","html_url":"https://github.com/apache/spark/pull/6950#discussion_r33600660","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/6950","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/33600660"},"html":{"href":"https://github.com/apache/spark/pull/6950#discussion_r33600660"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/6950"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/6950","id":38314424,"html_url":"https://github.com/apache/spark/pull/6950","diff_url":"https://github.com/apache/spark/pull/6950.diff","patch_url":"https://github.com/apache/spark/pull/6950.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/6950","number":6950,"state":"open","locked":false,"title":"[SPARK-8560][UI] The Executors page will have negative if having resubmitted tasks","user":{"login":"XuTingjun","id":7609069,"avatar_url":"https://avatars.githubusercontent.com/u/7609069?v=3","gravatar_id":"","url":"https://api.github.com/users/XuTingjun","html_url":"https://github.com/XuTingjun","followers_url":"https://api.github.com/users/XuTingjun/followers","following_url":"https://api.github.com/users/XuTingjun/following{/other_user}","gists_url":"https://api.github.com/users/XuTingjun/gists{/gist_id}","starred_url":"https://api.github.com/users/XuTingjun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XuTingjun/subscriptions","organizations_url":"https://api.github.com/users/XuTingjun/orgs","repos_url":"https://api.github.com/users/XuTingjun/repos","events_url":"https://api.github.com/users/XuTingjun/events{/privacy}","received_events_url":"https://api.github.com/users/XuTingjun/received_events","type":"User","site_admin":false},"body":" when the ```taskEnd.reason``` is ```Resubmitted```, it shouldn't  do statistics. Because this tasks has a ```SUCCESS``` taskEnd before.","created_at":"2015-06-23T08:59:41Z","updated_at":"2015-06-30T17:37:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d766693dd8931ec3b8a8b4eb3de27e413eacd74b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/6950/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/6950/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/6950/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/af35dc339cddd856d3bff2fab63ec4b3f544d02c","head":{"label":"XuTingjun:pageError","ref":"pageError","sha":"af35dc339cddd856d3bff2fab63ec4b3f544d02c","user":{"login":"XuTingjun","id":7609069,"avatar_url":"https://avatars.githubusercontent.com/u/7609069?v=3","gravatar_id":"","url":"https://api.github.com/users/XuTingjun","html_url":"https://github.com/XuTingjun","followers_url":"https://api.github.com/users/XuTingjun/followers","following_url":"https://api.github.com/users/XuTingjun/following{/other_user}","gists_url":"https://api.github.com/users/XuTingjun/gists{/gist_id}","starred_url":"https://api.github.com/users/XuTingjun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XuTingjun/subscriptions","organizations_url":"https://api.github.com/users/XuTingjun/orgs","repos_url":"https://api.github.com/users/XuTingjun/repos","events_url":"https://api.github.com/users/XuTingjun/events{/privacy}","received_events_url":"https://api.github.com/users/XuTingjun/received_events","type":"User","site_admin":false},"repo":{"id":28474703,"name":"spark","full_name":"XuTingjun/spark","owner":{"login":"XuTingjun","id":7609069,"avatar_url":"https://avatars.githubusercontent.com/u/7609069?v=3","gravatar_id":"","url":"https://api.github.com/users/XuTingjun","html_url":"https://github.com/XuTingjun","followers_url":"https://api.github.com/users/XuTingjun/followers","following_url":"https://api.github.com/users/XuTingjun/following{/other_user}","gists_url":"https://api.github.com/users/XuTingjun/gists{/gist_id}","starred_url":"https://api.github.com/users/XuTingjun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XuTingjun/subscriptions","organizations_url":"https://api.github.com/users/XuTingjun/orgs","repos_url":"https://api.github.com/users/XuTingjun/repos","events_url":"https://api.github.com/users/XuTingjun/events{/privacy}","received_events_url":"https://api.github.com/users/XuTingjun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/XuTingjun/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/XuTingjun/spark","forks_url":"https://api.github.com/repos/XuTingjun/spark/forks","keys_url":"https://api.github.com/repos/XuTingjun/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/XuTingjun/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/XuTingjun/spark/teams","hooks_url":"https://api.github.com/repos/XuTingjun/spark/hooks","issue_events_url":"https://api.github.com/repos/XuTingjun/spark/issues/events{/number}","events_url":"https://api.github.com/repos/XuTingjun/spark/events","assignees_url":"https://api.github.com/repos/XuTingjun/spark/assignees{/user}","branches_url":"https://api.github.com/repos/XuTingjun/spark/branches{/branch}","tags_url":"https://api.github.com/repos/XuTingjun/spark/tags","blobs_url":"https://api.github.com/repos/XuTingjun/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/XuTingjun/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/XuTingjun/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/XuTingjun/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/XuTingjun/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/XuTingjun/spark/languages","stargazers_url":"https://api.github.com/repos/XuTingjun/spark/stargazers","contributors_url":"https://api.github.com/repos/XuTingjun/spark/contributors","subscribers_url":"https://api.github.com/repos/XuTingjun/spark/subscribers","subscription_url":"https://api.github.com/repos/XuTingjun/spark/subscription","commits_url":"https://api.github.com/repos/XuTingjun/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/XuTingjun/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/XuTingjun/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/XuTingjun/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/XuTingjun/spark/contents/{+path}","compare_url":"https://api.github.com/repos/XuTingjun/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/XuTingjun/spark/merges","archive_url":"https://api.github.com/repos/XuTingjun/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/XuTingjun/spark/downloads","issues_url":"https://api.github.com/repos/XuTingjun/spark/issues{/number}","pulls_url":"https://api.github.com/repos/XuTingjun/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/XuTingjun/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/XuTingjun/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/XuTingjun/spark/labels{/name}","releases_url":"https://api.github.com/repos/XuTingjun/spark/releases{/id}","created_at":"2014-12-25T07:28:24Z","updated_at":"2015-01-29T02:14:53Z","pushed_at":"2015-06-25T10:56:22Z","git_url":"git://github.com/XuTingjun/spark.git","ssh_url":"git@github.com:XuTingjun/spark.git","clone_url":"https://github.com/XuTingjun/spark.git","svn_url":"https://github.com/XuTingjun/spark","homepage":null,"size":106552,"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":"master"}},"base":{"label":"apache:master","ref":"master","sha":"6ceb169608428a651d53c93bf73ca5ac53a6bde2","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":17165658,"name":"spark","full_name":"apache/spark","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/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-06-30T15:11:01Z","pushed_at":"2015-06-30T17:27:55Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":1519609,"stargazers_count":4591,"watchers_count":4591,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4046,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":351,"forks":4046,"open_issues":351,"watchers":4591,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/6950"},"html":{"href":"https://github.com/apache/spark/pull/6950"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/6950"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/6950/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/6950/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/6950/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/af35dc339cddd856d3bff2fab63ec4b3f544d02c"}}}}