{"action":"created","comment":{"url":"https://api.github.com/repos/mesos/chronos/pulls/comments/29291682","id":29291682,"diff_hunk":"@@ -489,54 +491,30 @@ class JobStats @Inject()(clusterBuilder: Option[Cluster.Builder], config: Cassan\n             isFailure=None)\n   }\n \n-  def jobFailed(job: BaseJob, taskStatus: TaskStatus, attempt: Int) {\n-    updateJobState(job.name, CurrentState.idle)\n-\n-    var jobSchedule:Option[String] = None\n-    var jobParents:Option[java.util.Set[String]] = None\n-    job match {\n-      case job: ScheduleBasedJob =>\n-        jobSchedule = Some(job.schedule)\n-      case job: DependencyBasedJob =>\n-        jobParents = Some(job.parents.asJava)\n-    }\n-    insertToStatTable(\n-            id=Some(taskStatus.getTaskId.getValue),\n-            timestamp=Some(new java.util.Date()),\n-            jobName=Some(job.name),\n-            jobOwner=Some(job.owner),\n-            jobSchedule=jobSchedule,\n-            jobParents=jobParents,\n-            taskState=Some(taskStatus.getState.toString),\n-            slaveId=Some(taskStatus.getSlaveId.getValue),\n-            message=Some(taskStatus.getMessage),\n-            attempt=Some(attempt),\n-            isFailure=Some(true))\n-  }","path":"src/main/scala/org/apache/mesos/chronos/scheduler/jobs/stats/JobStats.scala","position":116,"original_position":116,"commit_id":"07bc0bac3cb2be278552661fad365e56fda6274a","original_commit_id":"2dc0f7234bef5a7cfbc03468d9d30337d898d468","user":{"login":"elingg","id":8423887,"avatar_url":"https://avatars.githubusercontent.com/u/8423887?v=3","gravatar_id":"","url":"https://api.github.com/users/elingg","html_url":"https://github.com/elingg","followers_url":"https://api.github.com/users/elingg/followers","following_url":"https://api.github.com/users/elingg/following{/other_user}","gists_url":"https://api.github.com/users/elingg/gists{/gist_id}","starred_url":"https://api.github.com/users/elingg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elingg/subscriptions","organizations_url":"https://api.github.com/users/elingg/orgs","repos_url":"https://api.github.com/users/elingg/repos","events_url":"https://api.github.com/users/elingg/events{/privacy}","received_events_url":"https://api.github.com/users/elingg/received_events","type":"User","site_admin":false},"body":"sure, another option is jobInfo or jobNameOrJob.","created_at":"2015-04-28T21:40:48Z","updated_at":"2015-04-28T21:40:48Z","html_url":"https://github.com/mesos/chronos/pull/436#discussion_r29291682","pull_request_url":"https://api.github.com/repos/mesos/chronos/pulls/436","_links":{"self":{"href":"https://api.github.com/repos/mesos/chronos/pulls/comments/29291682"},"html":{"href":"https://github.com/mesos/chronos/pull/436#discussion_r29291682"},"pull_request":{"href":"https://api.github.com/repos/mesos/chronos/pulls/436"}}},"pull_request":{"url":"https://api.github.com/repos/mesos/chronos/pulls/436","id":34297550,"html_url":"https://github.com/mesos/chronos/pull/436","diff_url":"https://github.com/mesos/chronos/pull/436.diff","patch_url":"https://github.com/mesos/chronos/pull/436.patch","issue_url":"https://api.github.com/repos/mesos/chronos/issues/436","number":436,"state":"open","locked":false,"title":"Introduce JobsObserver interface and place both JobStats and error notification behind that interface","user":{"login":"azakkerman","id":3427123,"avatar_url":"https://avatars.githubusercontent.com/u/3427123?v=3","gravatar_id":"","url":"https://api.github.com/users/azakkerman","html_url":"https://github.com/azakkerman","followers_url":"https://api.github.com/users/azakkerman/followers","following_url":"https://api.github.com/users/azakkerman/following{/other_user}","gists_url":"https://api.github.com/users/azakkerman/gists{/gist_id}","starred_url":"https://api.github.com/users/azakkerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azakkerman/subscriptions","organizations_url":"https://api.github.com/users/azakkerman/orgs","repos_url":"https://api.github.com/users/azakkerman/repos","events_url":"https://api.github.com/users/azakkerman/events{/privacy}","received_events_url":"https://api.github.com/users/azakkerman/received_events","type":"User","site_admin":false},"body":"I ran all tests and they seem to pass.","created_at":"2015-04-28T18:38:09Z","updated_at":"2015-04-28T21:40:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9829b4397cb6eacd8c2f8ec801b0982ccf6dcd69","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mesos/chronos/pulls/436/commits","review_comments_url":"https://api.github.com/repos/mesos/chronos/pulls/436/comments","review_comment_url":"https://api.github.com/repos/mesos/chronos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesos/chronos/issues/436/comments","statuses_url":"https://api.github.com/repos/mesos/chronos/statuses/07bc0bac3cb2be278552661fad365e56fda6274a","head":{"label":"azakkerman:master","ref":"master","sha":"07bc0bac3cb2be278552661fad365e56fda6274a","user":{"login":"azakkerman","id":3427123,"avatar_url":"https://avatars.githubusercontent.com/u/3427123?v=3","gravatar_id":"","url":"https://api.github.com/users/azakkerman","html_url":"https://github.com/azakkerman","followers_url":"https://api.github.com/users/azakkerman/followers","following_url":"https://api.github.com/users/azakkerman/following{/other_user}","gists_url":"https://api.github.com/users/azakkerman/gists{/gist_id}","starred_url":"https://api.github.com/users/azakkerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azakkerman/subscriptions","organizations_url":"https://api.github.com/users/azakkerman/orgs","repos_url":"https://api.github.com/users/azakkerman/repos","events_url":"https://api.github.com/users/azakkerman/events{/privacy}","received_events_url":"https://api.github.com/users/azakkerman/received_events","type":"User","site_admin":false},"repo":{"id":34689869,"name":"chronos","full_name":"azakkerman/chronos","owner":{"login":"azakkerman","id":3427123,"avatar_url":"https://avatars.githubusercontent.com/u/3427123?v=3","gravatar_id":"","url":"https://api.github.com/users/azakkerman","html_url":"https://github.com/azakkerman","followers_url":"https://api.github.com/users/azakkerman/followers","following_url":"https://api.github.com/users/azakkerman/following{/other_user}","gists_url":"https://api.github.com/users/azakkerman/gists{/gist_id}","starred_url":"https://api.github.com/users/azakkerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azakkerman/subscriptions","organizations_url":"https://api.github.com/users/azakkerman/orgs","repos_url":"https://api.github.com/users/azakkerman/repos","events_url":"https://api.github.com/users/azakkerman/events{/privacy}","received_events_url":"https://api.github.com/users/azakkerman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/azakkerman/chronos","description":"Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules","fork":true,"url":"https://api.github.com/repos/azakkerman/chronos","forks_url":"https://api.github.com/repos/azakkerman/chronos/forks","keys_url":"https://api.github.com/repos/azakkerman/chronos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azakkerman/chronos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azakkerman/chronos/teams","hooks_url":"https://api.github.com/repos/azakkerman/chronos/hooks","issue_events_url":"https://api.github.com/repos/azakkerman/chronos/issues/events{/number}","events_url":"https://api.github.com/repos/azakkerman/chronos/events","assignees_url":"https://api.github.com/repos/azakkerman/chronos/assignees{/user}","branches_url":"https://api.github.com/repos/azakkerman/chronos/branches{/branch}","tags_url":"https://api.github.com/repos/azakkerman/chronos/tags","blobs_url":"https://api.github.com/repos/azakkerman/chronos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azakkerman/chronos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azakkerman/chronos/git/refs{/sha}","trees_url":"https://api.github.com/repos/azakkerman/chronos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azakkerman/chronos/statuses/{sha}","languages_url":"https://api.github.com/repos/azakkerman/chronos/languages","stargazers_url":"https://api.github.com/repos/azakkerman/chronos/stargazers","contributors_url":"https://api.github.com/repos/azakkerman/chronos/contributors","subscribers_url":"https://api.github.com/repos/azakkerman/chronos/subscribers","subscription_url":"https://api.github.com/repos/azakkerman/chronos/subscription","commits_url":"https://api.github.com/repos/azakkerman/chronos/commits{/sha}","git_commits_url":"https://api.github.com/repos/azakkerman/chronos/git/commits{/sha}","comments_url":"https://api.github.com/repos/azakkerman/chronos/comments{/number}","issue_comment_url":"https://api.github.com/repos/azakkerman/chronos/issues/comments{/number}","contents_url":"https://api.github.com/repos/azakkerman/chronos/contents/{+path}","compare_url":"https://api.github.com/repos/azakkerman/chronos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azakkerman/chronos/merges","archive_url":"https://api.github.com/repos/azakkerman/chronos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azakkerman/chronos/downloads","issues_url":"https://api.github.com/repos/azakkerman/chronos/issues{/number}","pulls_url":"https://api.github.com/repos/azakkerman/chronos/pulls{/number}","milestones_url":"https://api.github.com/repos/azakkerman/chronos/milestones{/number}","notifications_url":"https://api.github.com/repos/azakkerman/chronos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azakkerman/chronos/labels{/name}","releases_url":"https://api.github.com/repos/azakkerman/chronos/releases{/id}","created_at":"2015-04-27T20:35:59Z","updated_at":"2015-04-28T21:31:07Z","pushed_at":"2015-04-28T21:31:07Z","git_url":"git://github.com/azakkerman/chronos.git","ssh_url":"git@github.com:azakkerman/chronos.git","clone_url":"https://github.com/azakkerman/chronos.git","svn_url":"https://github.com/azakkerman/chronos","homepage":"","size":17860,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mesos:master","ref":"master","sha":"e94659844113b4adfd97c5e7dd9ebd84c50f76ab","user":{"login":"mesos","id":229272,"avatar_url":"https://avatars.githubusercontent.com/u/229272?v=3","gravatar_id":"","url":"https://api.github.com/users/mesos","html_url":"https://github.com/mesos","followers_url":"https://api.github.com/users/mesos/followers","following_url":"https://api.github.com/users/mesos/following{/other_user}","gists_url":"https://api.github.com/users/mesos/gists{/gist_id}","starred_url":"https://api.github.com/users/mesos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesos/subscriptions","organizations_url":"https://api.github.com/users/mesos/orgs","repos_url":"https://api.github.com/users/mesos/repos","events_url":"https://api.github.com/users/mesos/events{/privacy}","received_events_url":"https://api.github.com/users/mesos/received_events","type":"Organization","site_admin":false},"repo":{"id":8189762,"name":"chronos","full_name":"mesos/chronos","owner":{"login":"mesos","id":229272,"avatar_url":"https://avatars.githubusercontent.com/u/229272?v=3","gravatar_id":"","url":"https://api.github.com/users/mesos","html_url":"https://github.com/mesos","followers_url":"https://api.github.com/users/mesos/followers","following_url":"https://api.github.com/users/mesos/following{/other_user}","gists_url":"https://api.github.com/users/mesos/gists{/gist_id}","starred_url":"https://api.github.com/users/mesos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesos/subscriptions","organizations_url":"https://api.github.com/users/mesos/orgs","repos_url":"https://api.github.com/users/mesos/repos","events_url":"https://api.github.com/users/mesos/events{/privacy}","received_events_url":"https://api.github.com/users/mesos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesos/chronos","description":"Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules","fork":false,"url":"https://api.github.com/repos/mesos/chronos","forks_url":"https://api.github.com/repos/mesos/chronos/forks","keys_url":"https://api.github.com/repos/mesos/chronos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesos/chronos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesos/chronos/teams","hooks_url":"https://api.github.com/repos/mesos/chronos/hooks","issue_events_url":"https://api.github.com/repos/mesos/chronos/issues/events{/number}","events_url":"https://api.github.com/repos/mesos/chronos/events","assignees_url":"https://api.github.com/repos/mesos/chronos/assignees{/user}","branches_url":"https://api.github.com/repos/mesos/chronos/branches{/branch}","tags_url":"https://api.github.com/repos/mesos/chronos/tags","blobs_url":"https://api.github.com/repos/mesos/chronos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesos/chronos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesos/chronos/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesos/chronos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesos/chronos/statuses/{sha}","languages_url":"https://api.github.com/repos/mesos/chronos/languages","stargazers_url":"https://api.github.com/repos/mesos/chronos/stargazers","contributors_url":"https://api.github.com/repos/mesos/chronos/contributors","subscribers_url":"https://api.github.com/repos/mesos/chronos/subscribers","subscription_url":"https://api.github.com/repos/mesos/chronos/subscription","commits_url":"https://api.github.com/repos/mesos/chronos/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesos/chronos/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesos/chronos/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesos/chronos/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesos/chronos/contents/{+path}","compare_url":"https://api.github.com/repos/mesos/chronos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesos/chronos/merges","archive_url":"https://api.github.com/repos/mesos/chronos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesos/chronos/downloads","issues_url":"https://api.github.com/repos/mesos/chronos/issues{/number}","pulls_url":"https://api.github.com/repos/mesos/chronos/pulls{/number}","milestones_url":"https://api.github.com/repos/mesos/chronos/milestones{/number}","notifications_url":"https://api.github.com/repos/mesos/chronos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesos/chronos/labels{/name}","releases_url":"https://api.github.com/repos/mesos/chronos/releases{/id}","created_at":"2013-02-13T22:59:14Z","updated_at":"2015-04-28T12:13:39Z","pushed_at":"2015-04-28T21:31:07Z","git_url":"git://github.com/mesos/chronos.git","ssh_url":"git@github.com:mesos/chronos.git","clone_url":"https://github.com/mesos/chronos.git","svn_url":"https://github.com/mesos/chronos","homepage":"","size":17860,"stargazers_count":2385,"watchers_count":2385,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":263,"mirror_url":null,"open_issues_count":78,"forks":263,"open_issues":78,"watchers":2385,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesos/chronos/pulls/436"},"html":{"href":"https://github.com/mesos/chronos/pull/436"},"issue":{"href":"https://api.github.com/repos/mesos/chronos/issues/436"},"comments":{"href":"https://api.github.com/repos/mesos/chronos/issues/436/comments"},"review_comments":{"href":"https://api.github.com/repos/mesos/chronos/pulls/436/comments"},"review_comment":{"href":"https://api.github.com/repos/mesos/chronos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesos/chronos/pulls/436/commits"},"statuses":{"href":"https://api.github.com/repos/mesos/chronos/statuses/07bc0bac3cb2be278552661fad365e56fda6274a"}}}}