{"action":"created","comment":{"url":"https://api.github.com/repos/mesos/myriad/pulls/comments/36860323","id":36860323,"diff_hunk":"@@ -0,0 +1,51 @@\n+package com.ebay.myriad.common;\n+\n+import com.google.gson.Gson;\n+\n+/**\n+ * \n+ * Framework update from the scheduler to the executor\n+ *\n+ */\n+public class FrameworkUpdate {\n+    /**\n+     * Define what kind of this update is.\n+     */\n+    public static enum Type {Command};\n+    \n+    /**\n+     * Define what kind of operation or command this update is.\n+     */\n+    public static enum Operation {Shutdown};\n+    \n+    public FrameworkUpdate() {\n+    }\n+    \n+    public FrameworkUpdate(Type type, Operation operation) {\n+        setType(type);\n+        setOperation(operation);\n+    }\n+    \n+    public Type getType() {\n+        return type;\n+    }\n+    \n+    public void setType(Type type) {\n+        this.type = type;\n+    }\n+    \n+    public void setOperation(Operation operation) {\n+        this.operation = operation;\n+    }\n+    \n+    public Operation getOperation() {\n+        return operation;\n+    }\n+    \n+    public String toString () {\n+        return new Gson().toJson(this);\n+    }\n+    \n+    private Type type;\n+    private Operation operation;\n+}","path":"myriad-commons/src/main/java/com/ebay/myriad/common/FrameworkUpdate.java","position":51,"original_position":51,"commit_id":"ddd93252c9b70914aa97eb99b185b5b90c106b98","original_commit_id":"ddd93252c9b70914aa97eb99b185b5b90c106b98","user":{"login":"kensipe","id":27497,"avatar_url":"https://avatars.githubusercontent.com/u/27497?v=3","gravatar_id":"","url":"https://api.github.com/users/kensipe","html_url":"https://github.com/kensipe","followers_url":"https://api.github.com/users/kensipe/followers","following_url":"https://api.github.com/users/kensipe/following{/other_user}","gists_url":"https://api.github.com/users/kensipe/gists{/gist_id}","starred_url":"https://api.github.com/users/kensipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kensipe/subscriptions","organizations_url":"https://api.github.com/users/kensipe/orgs","repos_url":"https://api.github.com/users/kensipe/repos","events_url":"https://api.github.com/users/kensipe/events{/privacy}","received_events_url":"https://api.github.com/users/kensipe/received_events","type":"User","site_admin":false},"body":"there are several things that feel odd about this case... the first is there are 2 enums which only have 1 defined possibility.  The second is, if we assume that there will be more Types and Operations, that they are defined inside of this class.   This violates good OOP practice of the open/close principle. \r\n\r\nthoughts?","created_at":"2015-08-12T13:43:51Z","updated_at":"2015-08-12T13:43:51Z","html_url":"https://github.com/mesos/myriad/pull/115#discussion_r36860323","pull_request_url":"https://api.github.com/repos/mesos/myriad/pulls/115","_links":{"self":{"href":"https://api.github.com/repos/mesos/myriad/pulls/comments/36860323"},"html":{"href":"https://github.com/mesos/myriad/pull/115#discussion_r36860323"},"pull_request":{"href":"https://api.github.com/repos/mesos/myriad/pulls/115"}}},"pull_request":{"url":"https://api.github.com/repos/mesos/myriad/pulls/115","id":38002502,"html_url":"https://github.com/mesos/myriad/pull/115","diff_url":"https://github.com/mesos/myriad/pull/115.diff","patch_url":"https://github.com/mesos/myriad/pull/115.patch","issue_url":"https://api.github.com/repos/mesos/myriad/issues/115","number":115,"state":"open","locked":false,"title":"Issue 55 destroy myriad","user":{"login":"pdread100","id":11570041,"avatar_url":"https://avatars.githubusercontent.com/u/11570041?v=3","gravatar_id":"","url":"https://api.github.com/users/pdread100","html_url":"https://github.com/pdread100","followers_url":"https://api.github.com/users/pdread100/followers","following_url":"https://api.github.com/users/pdread100/following{/other_user}","gists_url":"https://api.github.com/users/pdread100/gists{/gist_id}","starred_url":"https://api.github.com/users/pdread100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdread100/subscriptions","organizations_url":"https://api.github.com/users/pdread100/orgs","repos_url":"https://api.github.com/users/pdread100/repos","events_url":"https://api.github.com/users/pdread100/events{/privacy}","received_events_url":"https://api.github.com/users/pdread100/received_events","type":"User","site_admin":false},"body":"There are three new rest services, one to shutdown just the RM but leave the executor(s) and tasks running, one to shutdown the entire framework by stopping the driver and exiting the RM, and one that shuts down the framework in a more graceful manner than the previous shutdown by stopping all the tasks, the executors, aborting the driver, and stopping the RM.\r\n\r\nThe shutdown with stopping the driver forces the user to either have another RM in fail over mode or start a scheduler such that it re-registers. The shutdown by aborting the driver allows the RM to be restarted as if nothing had happened. This is great for testing.\r\n\r\nA Help menu was added to explain the menu and tab options. And the \"About Myriad\" was moved here which brings it more in line with industry standards. \r\n\r\nEach Shutdown command will bring up a dialog to ask for confirmation and also again explains what is about to happen.  \r\n\r\nThis address [issue 55] (https://issues.apache.org/jira/browse/MYRIAD-55)\r\n\r\nThe only thing I was not sure about was if part of the idea was to take down all of hadoop or just what was under Myriad control. I implemented the latter. And what I mean by the hadoop would be the hadoop namenode and datanode...would this be considered part of the Yarn cluster? Or is it what I originally assumed the RM, NM, and NMs tasks?  \r\n","created_at":"2015-06-18T12:47:33Z","updated_at":"2015-08-12T13:43:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d186b7316201194284fe801e0b1451c5d98bf10","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mesos/myriad/pulls/115/commits","review_comments_url":"https://api.github.com/repos/mesos/myriad/pulls/115/comments","review_comment_url":"https://api.github.com/repos/mesos/myriad/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesos/myriad/issues/115/comments","statuses_url":"https://api.github.com/repos/mesos/myriad/statuses/ddd93252c9b70914aa97eb99b185b5b90c106b98","head":{"label":"pdread100:issue-55-destroy-myriad","ref":"issue-55-destroy-myriad","sha":"ddd93252c9b70914aa97eb99b185b5b90c106b98","user":{"login":"pdread100","id":11570041,"avatar_url":"https://avatars.githubusercontent.com/u/11570041?v=3","gravatar_id":"","url":"https://api.github.com/users/pdread100","html_url":"https://github.com/pdread100","followers_url":"https://api.github.com/users/pdread100/followers","following_url":"https://api.github.com/users/pdread100/following{/other_user}","gists_url":"https://api.github.com/users/pdread100/gists{/gist_id}","starred_url":"https://api.github.com/users/pdread100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdread100/subscriptions","organizations_url":"https://api.github.com/users/pdread100/orgs","repos_url":"https://api.github.com/users/pdread100/repos","events_url":"https://api.github.com/users/pdread100/events{/privacy}","received_events_url":"https://api.github.com/users/pdread100/received_events","type":"User","site_admin":false},"repo":{"id":33242128,"name":"myriad","full_name":"pdread100/myriad","owner":{"login":"pdread100","id":11570041,"avatar_url":"https://avatars.githubusercontent.com/u/11570041?v=3","gravatar_id":"","url":"https://api.github.com/users/pdread100","html_url":"https://github.com/pdread100","followers_url":"https://api.github.com/users/pdread100/followers","following_url":"https://api.github.com/users/pdread100/following{/other_user}","gists_url":"https://api.github.com/users/pdread100/gists{/gist_id}","starred_url":"https://api.github.com/users/pdread100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdread100/subscriptions","organizations_url":"https://api.github.com/users/pdread100/orgs","repos_url":"https://api.github.com/users/pdread100/repos","events_url":"https://api.github.com/users/pdread100/events{/privacy}","received_events_url":"https://api.github.com/users/pdread100/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pdread100/myriad","description":"A Mesos framework for scaling a YARN cluster.","fork":true,"url":"https://api.github.com/repos/pdread100/myriad","forks_url":"https://api.github.com/repos/pdread100/myriad/forks","keys_url":"https://api.github.com/repos/pdread100/myriad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pdread100/myriad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pdread100/myriad/teams","hooks_url":"https://api.github.com/repos/pdread100/myriad/hooks","issue_events_url":"https://api.github.com/repos/pdread100/myriad/issues/events{/number}","events_url":"https://api.github.com/repos/pdread100/myriad/events","assignees_url":"https://api.github.com/repos/pdread100/myriad/assignees{/user}","branches_url":"https://api.github.com/repos/pdread100/myriad/branches{/branch}","tags_url":"https://api.github.com/repos/pdread100/myriad/tags","blobs_url":"https://api.github.com/repos/pdread100/myriad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pdread100/myriad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pdread100/myriad/git/refs{/sha}","trees_url":"https://api.github.com/repos/pdread100/myriad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pdread100/myriad/statuses/{sha}","languages_url":"https://api.github.com/repos/pdread100/myriad/languages","stargazers_url":"https://api.github.com/repos/pdread100/myriad/stargazers","contributors_url":"https://api.github.com/repos/pdread100/myriad/contributors","subscribers_url":"https://api.github.com/repos/pdread100/myriad/subscribers","subscription_url":"https://api.github.com/repos/pdread100/myriad/subscription","commits_url":"https://api.github.com/repos/pdread100/myriad/commits{/sha}","git_commits_url":"https://api.github.com/repos/pdread100/myriad/git/commits{/sha}","comments_url":"https://api.github.com/repos/pdread100/myriad/comments{/number}","issue_comment_url":"https://api.github.com/repos/pdread100/myriad/issues/comments{/number}","contents_url":"https://api.github.com/repos/pdread100/myriad/contents/{+path}","compare_url":"https://api.github.com/repos/pdread100/myriad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pdread100/myriad/merges","archive_url":"https://api.github.com/repos/pdread100/myriad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pdread100/myriad/downloads","issues_url":"https://api.github.com/repos/pdread100/myriad/issues{/number}","pulls_url":"https://api.github.com/repos/pdread100/myriad/pulls{/number}","milestones_url":"https://api.github.com/repos/pdread100/myriad/milestones{/number}","notifications_url":"https://api.github.com/repos/pdread100/myriad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pdread100/myriad/labels{/name}","releases_url":"https://api.github.com/repos/pdread100/myriad/releases{/id}","created_at":"2015-04-01T10:42:35Z","updated_at":"2015-06-05T09:25:58Z","pushed_at":"2015-08-06T12:47:09Z","git_url":"git://github.com/pdread100/myriad.git","ssh_url":"git@github.com:pdread100/myriad.git","clone_url":"https://github.com/pdread100/myriad.git","svn_url":"https://github.com/pdread100/myriad","homepage":"","size":3393,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"phase1"}},"base":{"label":"mesos:phase1","ref":"phase1","sha":"7145b9b0c5af575998ec34d48299a3ff4c007b27","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":23895033,"name":"myriad","full_name":"mesos/myriad","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/myriad","description":"A Mesos framework for scaling a YARN cluster (Incubating into Apache)","fork":true,"url":"https://api.github.com/repos/mesos/myriad","forks_url":"https://api.github.com/repos/mesos/myriad/forks","keys_url":"https://api.github.com/repos/mesos/myriad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesos/myriad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesos/myriad/teams","hooks_url":"https://api.github.com/repos/mesos/myriad/hooks","issue_events_url":"https://api.github.com/repos/mesos/myriad/issues/events{/number}","events_url":"https://api.github.com/repos/mesos/myriad/events","assignees_url":"https://api.github.com/repos/mesos/myriad/assignees{/user}","branches_url":"https://api.github.com/repos/mesos/myriad/branches{/branch}","tags_url":"https://api.github.com/repos/mesos/myriad/tags","blobs_url":"https://api.github.com/repos/mesos/myriad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesos/myriad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesos/myriad/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesos/myriad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesos/myriad/statuses/{sha}","languages_url":"https://api.github.com/repos/mesos/myriad/languages","stargazers_url":"https://api.github.com/repos/mesos/myriad/stargazers","contributors_url":"https://api.github.com/repos/mesos/myriad/contributors","subscribers_url":"https://api.github.com/repos/mesos/myriad/subscribers","subscription_url":"https://api.github.com/repos/mesos/myriad/subscription","commits_url":"https://api.github.com/repos/mesos/myriad/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesos/myriad/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesos/myriad/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesos/myriad/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesos/myriad/contents/{+path}","compare_url":"https://api.github.com/repos/mesos/myriad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesos/myriad/merges","archive_url":"https://api.github.com/repos/mesos/myriad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesos/myriad/downloads","issues_url":"https://api.github.com/repos/mesos/myriad/issues{/number}","pulls_url":"https://api.github.com/repos/mesos/myriad/pulls{/number}","milestones_url":"https://api.github.com/repos/mesos/myriad/milestones{/number}","notifications_url":"https://api.github.com/repos/mesos/myriad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesos/myriad/labels{/name}","releases_url":"https://api.github.com/repos/mesos/myriad/releases{/id}","created_at":"2014-09-10T22:37:06Z","updated_at":"2015-08-09T03:46:52Z","pushed_at":"2015-08-11T02:36:20Z","git_url":"git://github.com/mesos/myriad.git","ssh_url":"git@github.com:mesos/myriad.git","clone_url":"https://github.com/mesos/myriad.git","svn_url":"https://github.com/mesos/myriad","homepage":"https://issues.apache.org/jira/browse/MYRIAD","size":5240,"stargazers_count":211,"watchers_count":211,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":60,"forks":51,"open_issues":60,"watchers":211,"default_branch":"phase1"}},"_links":{"self":{"href":"https://api.github.com/repos/mesos/myriad/pulls/115"},"html":{"href":"https://github.com/mesos/myriad/pull/115"},"issue":{"href":"https://api.github.com/repos/mesos/myriad/issues/115"},"comments":{"href":"https://api.github.com/repos/mesos/myriad/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/mesos/myriad/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/mesos/myriad/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesos/myriad/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/mesos/myriad/statuses/ddd93252c9b70914aa97eb99b185b5b90c106b98"}}}}