{"action":"created","comment":{"url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/comments/36601943","id":36601943,"diff_hunk":"@@ -68,18 +68,14 @@ void CephScheduler::error(\n \n CephScheduler::CephScheduler(Config* _config)\n {\n-  config = _config;\n-  stateMachine = new StateMachine(_config);\n-  eventLoop = new EventLoop();\n+  agent = new CephSchedulerAgent(_config);\n }\n \n \n CephScheduler::~CephScheduler()\n {\n-  stateMachine = NULL;\n-  eventLoop = NULL;\n-  delete stateMachine;\n-  delete eventLoop;\n+  agent = NULL;\n+  delete agent;","path":"src/scheduler/CephScheduler.cpp","position":18,"original_position":18,"commit_id":"043e15c7df455b610d86e7d733db21c8b3e75725","original_commit_id":"043e15c7df455b610d86e7d733db21c8b3e75725","user":{"login":"zyluo","id":1192841,"avatar_url":"https://avatars.githubusercontent.com/u/1192841?v=3","gravatar_id":"","url":"https://api.github.com/users/zyluo","html_url":"https://github.com/zyluo","followers_url":"https://api.github.com/users/zyluo/followers","following_url":"https://api.github.com/users/zyluo/following{/other_user}","gists_url":"https://api.github.com/users/zyluo/gists{/gist_id}","starred_url":"https://api.github.com/users/zyluo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyluo/subscriptions","organizations_url":"https://api.github.com/users/zyluo/orgs","repos_url":"https://api.github.com/users/zyluo/repos","events_url":"https://api.github.com/users/zyluo/events{/privacy}","received_events_url":"https://api.github.com/users/zyluo/received_events","type":"User","site_admin":false},"body":"Shouldn't we first delete and set NULL? That is how I remember doing it.","created_at":"2015-08-10T04:56:41Z","updated_at":"2015-08-10T04:56:41Z","html_url":"https://github.com/Intel-bigdata/ceph-mesos/pull/14#discussion_r36601943","pull_request_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/comments/36601943"},"html":{"href":"https://github.com/Intel-bigdata/ceph-mesos/pull/14#discussion_r36601943"},"pull_request":{"href":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/14","id":41986531,"html_url":"https://github.com/Intel-bigdata/ceph-mesos/pull/14","diff_url":"https://github.com/Intel-bigdata/ceph-mesos/pull/14.diff","patch_url":"https://github.com/Intel-bigdata/ceph-mesos/pull/14.patch","issue_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/issues/14","number":14,"state":"open","locked":false,"title":"move the logic to a agent class. first step of refactor scheduler module.","user":{"login":"tangzhankun","id":1171680,"avatar_url":"https://avatars.githubusercontent.com/u/1171680?v=3","gravatar_id":"","url":"https://api.github.com/users/tangzhankun","html_url":"https://github.com/tangzhankun","followers_url":"https://api.github.com/users/tangzhankun/followers","following_url":"https://api.github.com/users/tangzhankun/following{/other_user}","gists_url":"https://api.github.com/users/tangzhankun/gists{/gist_id}","starred_url":"https://api.github.com/users/tangzhankun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangzhankun/subscriptions","organizations_url":"https://api.github.com/users/tangzhankun/orgs","repos_url":"https://api.github.com/users/tangzhankun/repos","events_url":"https://api.github.com/users/tangzhankun/events{/privacy}","received_events_url":"https://api.github.com/users/tangzhankun/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-10T04:21:30Z","updated_at":"2015-08-10T04:56:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e122d0915a8f8f7dc558255d4db3c911aa536125","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/14/commits","review_comments_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/14/comments","review_comment_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/issues/14/comments","statuses_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/statuses/043e15c7df455b610d86e7d733db21c8b3e75725","head":{"label":"tangzhankun:master","ref":"master","sha":"043e15c7df455b610d86e7d733db21c8b3e75725","user":{"login":"tangzhankun","id":1171680,"avatar_url":"https://avatars.githubusercontent.com/u/1171680?v=3","gravatar_id":"","url":"https://api.github.com/users/tangzhankun","html_url":"https://github.com/tangzhankun","followers_url":"https://api.github.com/users/tangzhankun/followers","following_url":"https://api.github.com/users/tangzhankun/following{/other_user}","gists_url":"https://api.github.com/users/tangzhankun/gists{/gist_id}","starred_url":"https://api.github.com/users/tangzhankun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangzhankun/subscriptions","organizations_url":"https://api.github.com/users/tangzhankun/orgs","repos_url":"https://api.github.com/users/tangzhankun/repos","events_url":"https://api.github.com/users/tangzhankun/events{/privacy}","received_events_url":"https://api.github.com/users/tangzhankun/received_events","type":"User","site_admin":false},"repo":{"id":38227661,"name":"ceph-mesos","full_name":"tangzhankun/ceph-mesos","owner":{"login":"tangzhankun","id":1171680,"avatar_url":"https://avatars.githubusercontent.com/u/1171680?v=3","gravatar_id":"","url":"https://api.github.com/users/tangzhankun","html_url":"https://github.com/tangzhankun","followers_url":"https://api.github.com/users/tangzhankun/followers","following_url":"https://api.github.com/users/tangzhankun/following{/other_user}","gists_url":"https://api.github.com/users/tangzhankun/gists{/gist_id}","starred_url":"https://api.github.com/users/tangzhankun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangzhankun/subscriptions","organizations_url":"https://api.github.com/users/tangzhankun/orgs","repos_url":"https://api.github.com/users/tangzhankun/repos","events_url":"https://api.github.com/users/tangzhankun/events{/privacy}","received_events_url":"https://api.github.com/users/tangzhankun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tangzhankun/ceph-mesos","description":"A Mesos framework for scaling a Ceph cluster.","fork":true,"url":"https://api.github.com/repos/tangzhankun/ceph-mesos","forks_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/forks","keys_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/teams","hooks_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/hooks","issue_events_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/issues/events{/number}","events_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/events","assignees_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/assignees{/user}","branches_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/branches{/branch}","tags_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/tags","blobs_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/statuses/{sha}","languages_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/languages","stargazers_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/stargazers","contributors_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/contributors","subscribers_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/subscribers","subscription_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/subscription","commits_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/issues/comments{/number}","contents_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/contents/{+path}","compare_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/merges","archive_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/downloads","issues_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/issues{/number}","pulls_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/pulls{/number}","milestones_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/milestones{/number}","notifications_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/labels{/name}","releases_url":"https://api.github.com/repos/tangzhankun/ceph-mesos/releases{/id}","created_at":"2015-06-29T04:25:12Z","updated_at":"2015-06-29T04:25:12Z","pushed_at":"2015-08-10T04:19:18Z","git_url":"git://github.com/tangzhankun/ceph-mesos.git","ssh_url":"git@github.com:tangzhankun/ceph-mesos.git","clone_url":"https://github.com/tangzhankun/ceph-mesos.git","svn_url":"https://github.com/tangzhankun/ceph-mesos","homepage":null,"size":162,"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":"master"}},"base":{"label":"Intel-bigdata:master","ref":"master","sha":"944e04c0d9bfc071c7ff17bf1409d9ffe93e4ec9","user":{"login":"Intel-bigdata","id":8433081,"avatar_url":"https://avatars.githubusercontent.com/u/8433081?v=3","gravatar_id":"","url":"https://api.github.com/users/Intel-bigdata","html_url":"https://github.com/Intel-bigdata","followers_url":"https://api.github.com/users/Intel-bigdata/followers","following_url":"https://api.github.com/users/Intel-bigdata/following{/other_user}","gists_url":"https://api.github.com/users/Intel-bigdata/gists{/gist_id}","starred_url":"https://api.github.com/users/Intel-bigdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Intel-bigdata/subscriptions","organizations_url":"https://api.github.com/users/Intel-bigdata/orgs","repos_url":"https://api.github.com/users/Intel-bigdata/repos","events_url":"https://api.github.com/users/Intel-bigdata/events{/privacy}","received_events_url":"https://api.github.com/users/Intel-bigdata/received_events","type":"Organization","site_admin":false},"repo":{"id":35251775,"name":"ceph-mesos","full_name":"Intel-bigdata/ceph-mesos","owner":{"login":"Intel-bigdata","id":8433081,"avatar_url":"https://avatars.githubusercontent.com/u/8433081?v=3","gravatar_id":"","url":"https://api.github.com/users/Intel-bigdata","html_url":"https://github.com/Intel-bigdata","followers_url":"https://api.github.com/users/Intel-bigdata/followers","following_url":"https://api.github.com/users/Intel-bigdata/following{/other_user}","gists_url":"https://api.github.com/users/Intel-bigdata/gists{/gist_id}","starred_url":"https://api.github.com/users/Intel-bigdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Intel-bigdata/subscriptions","organizations_url":"https://api.github.com/users/Intel-bigdata/orgs","repos_url":"https://api.github.com/users/Intel-bigdata/repos","events_url":"https://api.github.com/users/Intel-bigdata/events{/privacy}","received_events_url":"https://api.github.com/users/Intel-bigdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Intel-bigdata/ceph-mesos","description":"A Mesos framework for scaling a Ceph cluster.","fork":false,"url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos","forks_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/forks","keys_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/teams","hooks_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/hooks","issue_events_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/issues/events{/number}","events_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/events","assignees_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/assignees{/user}","branches_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/branches{/branch}","tags_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/tags","blobs_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/git/refs{/sha}","trees_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/statuses/{sha}","languages_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/languages","stargazers_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/stargazers","contributors_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/contributors","subscribers_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/subscribers","subscription_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/subscription","commits_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/commits{/sha}","git_commits_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/git/commits{/sha}","comments_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/comments{/number}","issue_comment_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/issues/comments{/number}","contents_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/contents/{+path}","compare_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/merges","archive_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/downloads","issues_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/issues{/number}","pulls_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls{/number}","milestones_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/milestones{/number}","notifications_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/labels{/name}","releases_url":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/releases{/id}","created_at":"2015-05-08T01:19:50Z","updated_at":"2015-07-20T04:30:01Z","pushed_at":"2015-08-10T04:26:11Z","git_url":"git://github.com/Intel-bigdata/ceph-mesos.git","ssh_url":"git@github.com:Intel-bigdata/ceph-mesos.git","clone_url":"https://github.com/Intel-bigdata/ceph-mesos.git","svn_url":"https://github.com/Intel-bigdata/ceph-mesos","homepage":null,"size":271,"stargazers_count":49,"watchers_count":49,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/14"},"html":{"href":"https://github.com/Intel-bigdata/ceph-mesos/pull/14"},"issue":{"href":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/issues/14"},"comments":{"href":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/Intel-bigdata/ceph-mesos/statuses/043e15c7df455b610d86e7d733db21c8b3e75725"}}}}