{"action":"created","comment":{"url":"https://api.github.com/repos/baidu/galaxy/pulls/comments/46914338","id":46914338,"diff_hunk":"@@ -338,6 +363,19 @@ int TaskManager::DeleteTask(const std::string& task_id) {\n     return 0;\n }\n \n+int TaskManager::MarkTaskError(const std::string& id) {\n+    MutexLock scope_lock(&tasks_mutex_);   ","path":"src/agent/task_manager.cc","position":54,"original_position":54,"commit_id":"46f9d612966d7ca6e5d5581e8c9164b4a2a1c402","original_commit_id":"46f9d612966d7ca6e5d5581e8c9164b4a2a1c402","user":{"login":"imotai","id":8623385,"avatar_url":"https://avatars.githubusercontent.com/u/8623385?v=3","gravatar_id":"","url":"https://api.github.com/users/imotai","html_url":"https://github.com/imotai","followers_url":"https://api.github.com/users/imotai/followers","following_url":"https://api.github.com/users/imotai/following{/other_user}","gists_url":"https://api.github.com/users/imotai/gists{/gist_id}","starred_url":"https://api.github.com/users/imotai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imotai/subscriptions","organizations_url":"https://api.github.com/users/imotai/orgs","repos_url":"https://api.github.com/users/imotai/repos","events_url":"https://api.github.com/users/imotai/events{/privacy}","received_events_url":"https://api.github.com/users/imotai/received_events","type":"User","site_admin":false},"body":"task级别需要进行freeze，让task真正把cpu让出来","created_at":"2015-12-08T04:35:13Z","updated_at":"2015-12-08T04:35:13Z","html_url":"https://github.com/baidu/galaxy/pull/259#discussion_r46914338","pull_request_url":"https://api.github.com/repos/baidu/galaxy/pulls/259","_links":{"self":{"href":"https://api.github.com/repos/baidu/galaxy/pulls/comments/46914338"},"html":{"href":"https://github.com/baidu/galaxy/pull/259#discussion_r46914338"},"pull_request":{"href":"https://api.github.com/repos/baidu/galaxy/pulls/259"}}},"pull_request":{"url":"https://api.github.com/repos/baidu/galaxy/pulls/259","id":52773177,"html_url":"https://github.com/baidu/galaxy/pull/259","diff_url":"https://github.com/baidu/galaxy/pull/259.diff","patch_url":"https://github.com/baidu/galaxy/pull/259.patch","issue_url":"https://api.github.com/repos/baidu/galaxy/issues/259","number":259,"state":"open","locked":false,"title":"增加抢占式调度","user":{"login":"haolifei","id":16042431,"avatar_url":"https://avatars.githubusercontent.com/u/16042431?v=3","gravatar_id":"","url":"https://api.github.com/users/haolifei","html_url":"https://github.com/haolifei","followers_url":"https://api.github.com/users/haolifei/followers","following_url":"https://api.github.com/users/haolifei/following{/other_user}","gists_url":"https://api.github.com/users/haolifei/gists{/gist_id}","starred_url":"https://api.github.com/users/haolifei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haolifei/subscriptions","organizations_url":"https://api.github.com/users/haolifei/orgs","repos_url":"https://api.github.com/users/haolifei/repos","events_url":"https://api.github.com/users/haolifei/events{/privacy}","received_events_url":"https://api.github.com/users/haolifei/received_events","type":"User","site_admin":false},"body":"1 增加cpu抢占式调度功能 batch任务会按照空闲cpu资源调度，和剩余quota无关。当空闲cpu资源不足时会被kill掉\r\nbatch任务的cpugroup路径：/cgroups/cpu/nonproc","created_at":"2015-12-06T05:20:05Z","updated_at":"2015-12-08T04:35:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c5eaa2ce6dd7f713c9b3bdd188793e99c2661d4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/baidu/galaxy/pulls/259/commits","review_comments_url":"https://api.github.com/repos/baidu/galaxy/pulls/259/comments","review_comment_url":"https://api.github.com/repos/baidu/galaxy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/baidu/galaxy/issues/259/comments","statuses_url":"https://api.github.com/repos/baidu/galaxy/statuses/46f9d612966d7ca6e5d5581e8c9164b4a2a1c402","head":{"label":"haolifei:refactor","ref":"refactor","sha":"46f9d612966d7ca6e5d5581e8c9164b4a2a1c402","user":{"login":"haolifei","id":16042431,"avatar_url":"https://avatars.githubusercontent.com/u/16042431?v=3","gravatar_id":"","url":"https://api.github.com/users/haolifei","html_url":"https://github.com/haolifei","followers_url":"https://api.github.com/users/haolifei/followers","following_url":"https://api.github.com/users/haolifei/following{/other_user}","gists_url":"https://api.github.com/users/haolifei/gists{/gist_id}","starred_url":"https://api.github.com/users/haolifei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haolifei/subscriptions","organizations_url":"https://api.github.com/users/haolifei/orgs","repos_url":"https://api.github.com/users/haolifei/repos","events_url":"https://api.github.com/users/haolifei/events{/privacy}","received_events_url":"https://api.github.com/users/haolifei/received_events","type":"User","site_admin":false},"repo":{"id":47056242,"name":"galaxy","full_name":"haolifei/galaxy","owner":{"login":"haolifei","id":16042431,"avatar_url":"https://avatars.githubusercontent.com/u/16042431?v=3","gravatar_id":"","url":"https://api.github.com/users/haolifei","html_url":"https://github.com/haolifei","followers_url":"https://api.github.com/users/haolifei/followers","following_url":"https://api.github.com/users/haolifei/following{/other_user}","gists_url":"https://api.github.com/users/haolifei/gists{/gist_id}","starred_url":"https://api.github.com/users/haolifei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haolifei/subscriptions","organizations_url":"https://api.github.com/users/haolifei/orgs","repos_url":"https://api.github.com/users/haolifei/repos","events_url":"https://api.github.com/users/haolifei/events{/privacy}","received_events_url":"https://api.github.com/users/haolifei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/haolifei/galaxy","description":"Galaxy is a cluster management system.","fork":true,"url":"https://api.github.com/repos/haolifei/galaxy","forks_url":"https://api.github.com/repos/haolifei/galaxy/forks","keys_url":"https://api.github.com/repos/haolifei/galaxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haolifei/galaxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haolifei/galaxy/teams","hooks_url":"https://api.github.com/repos/haolifei/galaxy/hooks","issue_events_url":"https://api.github.com/repos/haolifei/galaxy/issues/events{/number}","events_url":"https://api.github.com/repos/haolifei/galaxy/events","assignees_url":"https://api.github.com/repos/haolifei/galaxy/assignees{/user}","branches_url":"https://api.github.com/repos/haolifei/galaxy/branches{/branch}","tags_url":"https://api.github.com/repos/haolifei/galaxy/tags","blobs_url":"https://api.github.com/repos/haolifei/galaxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haolifei/galaxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haolifei/galaxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/haolifei/galaxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haolifei/galaxy/statuses/{sha}","languages_url":"https://api.github.com/repos/haolifei/galaxy/languages","stargazers_url":"https://api.github.com/repos/haolifei/galaxy/stargazers","contributors_url":"https://api.github.com/repos/haolifei/galaxy/contributors","subscribers_url":"https://api.github.com/repos/haolifei/galaxy/subscribers","subscription_url":"https://api.github.com/repos/haolifei/galaxy/subscription","commits_url":"https://api.github.com/repos/haolifei/galaxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/haolifei/galaxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/haolifei/galaxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/haolifei/galaxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/haolifei/galaxy/contents/{+path}","compare_url":"https://api.github.com/repos/haolifei/galaxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haolifei/galaxy/merges","archive_url":"https://api.github.com/repos/haolifei/galaxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haolifei/galaxy/downloads","issues_url":"https://api.github.com/repos/haolifei/galaxy/issues{/number}","pulls_url":"https://api.github.com/repos/haolifei/galaxy/pulls{/number}","milestones_url":"https://api.github.com/repos/haolifei/galaxy/milestones{/number}","notifications_url":"https://api.github.com/repos/haolifei/galaxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haolifei/galaxy/labels{/name}","releases_url":"https://api.github.com/repos/haolifei/galaxy/releases{/id}","created_at":"2015-11-29T08:45:08Z","updated_at":"2015-11-29T08:45:09Z","pushed_at":"2015-12-06T04:16:44Z","git_url":"git://github.com/haolifei/galaxy.git","ssh_url":"git@github.com:haolifei/galaxy.git","clone_url":"https://github.com/haolifei/galaxy.git","svn_url":"https://github.com/haolifei/galaxy","homepage":"","size":5136,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"refactor"}},"base":{"label":"baidu:master","ref":"master","sha":"9441ca0e25d6ed7f1e68adb102ac427a42ad2f53","user":{"login":"baidu","id":13245940,"avatar_url":"https://avatars.githubusercontent.com/u/13245940?v=3","gravatar_id":"","url":"https://api.github.com/users/baidu","html_url":"https://github.com/baidu","followers_url":"https://api.github.com/users/baidu/followers","following_url":"https://api.github.com/users/baidu/following{/other_user}","gists_url":"https://api.github.com/users/baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baidu/subscriptions","organizations_url":"https://api.github.com/users/baidu/orgs","repos_url":"https://api.github.com/users/baidu/repos","events_url":"https://api.github.com/users/baidu/events{/privacy}","received_events_url":"https://api.github.com/users/baidu/received_events","type":"Organization","site_admin":false},"repo":{"id":28955570,"name":"galaxy","full_name":"baidu/galaxy","owner":{"login":"baidu","id":13245940,"avatar_url":"https://avatars.githubusercontent.com/u/13245940?v=3","gravatar_id":"","url":"https://api.github.com/users/baidu","html_url":"https://github.com/baidu","followers_url":"https://api.github.com/users/baidu/followers","following_url":"https://api.github.com/users/baidu/following{/other_user}","gists_url":"https://api.github.com/users/baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baidu/subscriptions","organizations_url":"https://api.github.com/users/baidu/orgs","repos_url":"https://api.github.com/users/baidu/repos","events_url":"https://api.github.com/users/baidu/events{/privacy}","received_events_url":"https://api.github.com/users/baidu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/baidu/galaxy","description":"Galaxy is a cluster management system.","fork":false,"url":"https://api.github.com/repos/baidu/galaxy","forks_url":"https://api.github.com/repos/baidu/galaxy/forks","keys_url":"https://api.github.com/repos/baidu/galaxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baidu/galaxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baidu/galaxy/teams","hooks_url":"https://api.github.com/repos/baidu/galaxy/hooks","issue_events_url":"https://api.github.com/repos/baidu/galaxy/issues/events{/number}","events_url":"https://api.github.com/repos/baidu/galaxy/events","assignees_url":"https://api.github.com/repos/baidu/galaxy/assignees{/user}","branches_url":"https://api.github.com/repos/baidu/galaxy/branches{/branch}","tags_url":"https://api.github.com/repos/baidu/galaxy/tags","blobs_url":"https://api.github.com/repos/baidu/galaxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baidu/galaxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baidu/galaxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/baidu/galaxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baidu/galaxy/statuses/{sha}","languages_url":"https://api.github.com/repos/baidu/galaxy/languages","stargazers_url":"https://api.github.com/repos/baidu/galaxy/stargazers","contributors_url":"https://api.github.com/repos/baidu/galaxy/contributors","subscribers_url":"https://api.github.com/repos/baidu/galaxy/subscribers","subscription_url":"https://api.github.com/repos/baidu/galaxy/subscription","commits_url":"https://api.github.com/repos/baidu/galaxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/baidu/galaxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/baidu/galaxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/baidu/galaxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/baidu/galaxy/contents/{+path}","compare_url":"https://api.github.com/repos/baidu/galaxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baidu/galaxy/merges","archive_url":"https://api.github.com/repos/baidu/galaxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baidu/galaxy/downloads","issues_url":"https://api.github.com/repos/baidu/galaxy/issues{/number}","pulls_url":"https://api.github.com/repos/baidu/galaxy/pulls{/number}","milestones_url":"https://api.github.com/repos/baidu/galaxy/milestones{/number}","notifications_url":"https://api.github.com/repos/baidu/galaxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baidu/galaxy/labels{/name}","releases_url":"https://api.github.com/repos/baidu/galaxy/releases{/id}","created_at":"2015-01-08T08:04:16Z","updated_at":"2015-12-04T20:59:54Z","pushed_at":"2015-12-06T10:31:22Z","git_url":"git://github.com/baidu/galaxy.git","ssh_url":"git@github.com:baidu/galaxy.git","clone_url":"https://github.com/baidu/galaxy.git","svn_url":"https://github.com/baidu/galaxy","homepage":"","size":13178,"stargazers_count":32,"watchers_count":32,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":7,"forks":27,"open_issues":7,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/baidu/galaxy/pulls/259"},"html":{"href":"https://github.com/baidu/galaxy/pull/259"},"issue":{"href":"https://api.github.com/repos/baidu/galaxy/issues/259"},"comments":{"href":"https://api.github.com/repos/baidu/galaxy/issues/259/comments"},"review_comments":{"href":"https://api.github.com/repos/baidu/galaxy/pulls/259/comments"},"review_comment":{"href":"https://api.github.com/repos/baidu/galaxy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/baidu/galaxy/pulls/259/commits"},"statuses":{"href":"https://api.github.com/repos/baidu/galaxy/statuses/46f9d612966d7ca6e5d5581e8c9164b4a2a1c402"}}}}