{"action":"created","comment":{"url":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/comments/29210527","id":29210527,"diff_hunk":"@@ -37,18 +37,18 @@ import scala.concurrent.duration.Duration\n import scala.concurrent.{Await, Future}\n \n //TODO: add interface to query master here\n-class ClientContext(config: Config) {\n+class ClientContext(config: Config, sys:Option[ActorSystem], mster: Option[ActorRef]) {\n   private val LOG: Logger = LogUtil.getLogger(getClass)\n   private implicit val timeout = Timeout(5, TimeUnit.SECONDS)\n \n   private val masters = config.getStringList(Constants.GEARPUMP_CLUSTER_MASTERS).toList.flatMap(Util.parseHostList)\n \n-  implicit val system = ActorSystem(s\"client${Util.randInt}\" , config)\n+  implicit val system = sys.getOrElse(ActorSystem(s\"client${Util.randInt}\" , config))","path":"core/src/main/scala/org/apache/gearpump/cluster/client/ClientContext.scala","position":12,"original_position":12,"commit_id":"b07c258fb9bfe478bf344eb6c4494ec4d9073ae7","original_commit_id":"b07c258fb9bfe478bf344eb6c4494ec4d9073ae7","user":{"login":"clockfly","id":2595532,"avatar_url":"https://avatars.githubusercontent.com/u/2595532?v=3","gravatar_id":"","url":"https://api.github.com/users/clockfly","html_url":"https://github.com/clockfly","followers_url":"https://api.github.com/users/clockfly/followers","following_url":"https://api.github.com/users/clockfly/following{/other_user}","gists_url":"https://api.github.com/users/clockfly/gists{/gist_id}","starred_url":"https://api.github.com/users/clockfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clockfly/subscriptions","organizations_url":"https://api.github.com/users/clockfly/orgs","repos_url":"https://api.github.com/users/clockfly/repos","events_url":"https://api.github.com/users/clockfly/events{/privacy}","received_events_url":"https://api.github.com/users/clockfly/received_events","type":"User","site_admin":false},"body":"Instead of doing tricky Option here, how about adding a explicit parameter system: ActorSystem in constructor. \r\n\r\nWe can create a default Actorsystem in companion apply if not provided. \r\n","created_at":"2015-04-28T02:40:44Z","updated_at":"2015-04-28T02:40:44Z","html_url":"https://github.com/intel-hadoop/gearpump/pull/828#discussion_r29210527","pull_request_url":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/828","_links":{"self":{"href":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/comments/29210527"},"html":{"href":"https://github.com/intel-hadoop/gearpump/pull/828#discussion_r29210527"},"pull_request":{"href":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/828"}}},"pull_request":{"url":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/828","id":33435000,"html_url":"https://github.com/intel-hadoop/gearpump/pull/828","diff_url":"https://github.com/intel-hadoop/gearpump/pull/828.diff","patch_url":"https://github.com/intel-hadoop/gearpump/pull/828.patch","issue_url":"https://api.github.com/repos/intel-hadoop/gearpump/issues/828","number":828,"state":"open","locked":false,"title":"Fixes #53 [rest] rest interface to submit a dag by JSON representation","user":{"login":"kkasravi","id":146453,"avatar_url":"https://avatars.githubusercontent.com/u/146453?v=3","gravatar_id":"","url":"https://api.github.com/users/kkasravi","html_url":"https://github.com/kkasravi","followers_url":"https://api.github.com/users/kkasravi/followers","following_url":"https://api.github.com/users/kkasravi/following{/other_user}","gists_url":"https://api.github.com/users/kkasravi/gists{/gist_id}","starred_url":"https://api.github.com/users/kkasravi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkasravi/subscriptions","organizations_url":"https://api.github.com/users/kkasravi/orgs","repos_url":"https://api.github.com/users/kkasravi/repos","events_url":"https://api.github.com/users/kkasravi/events{/privacy}","received_events_url":"https://api.github.com/users/kkasravi/received_events","type":"User","site_admin":false},"body":"Still need to add UT and make sure I can submit all examples via REST API however this command will submit a DAG via REST API for complexdag. Also I would like to have SubmitApplicationRequest defined on the client using scala.js. \r\n```\r\ncurl -XPOST -H 'Content-Type:application/json' -d @applicationrequest.json http://localhost:8090/api/v1.0/application -v -s\r\n```\r\nwhere applicationrequest.json contains\r\n```\r\n{  \"appName\": \"complexdag\",\r\n  \"appJar\": \"./output/target/pack/examples/gearpump-examples-assembly-0.3.5-SNAPSHOT.jar\",\r\n  \"processors\": [[0,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Source_0\",\"parallelism\":1}],[5,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Sink_2\",\"parallelism\":1}],[10,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Node_3\",\"parallelism\":1}],[1,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Source_1\",\"parallelism\":1}],[6,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Sink_1\",\"parallelism\":1}],[9,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Node_4\",\"parallelism\":1}],[2,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Node_1\",\"parallelism\":1}],[7,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Node_0\",\"parallelism\":1}],[3,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Sink_0\",\"parallelism\":1}],[11,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Sink_3\",\"parallelism\":1}],[8,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Sink_4\",\"parallelism\":1}],[4,{\"taskClass\":\"org.apache.gearpump.streaming.examples.complexdag.Node_2\",\"parallelism\":1}]],\r\n  \"dag\": {\"vertices\":[0,2,9,5,8,1,4,11,6,10,3,7],\"edges\":[[0,\"org.apache.gearpump.partitioner.HashPartitioner\",3],[9,\"org.apache.gearpump.partitioner.HashPartitioner\",11],[2,\"org.apache.gearpump.partitioner.HashPartitioner\",11],[0,\"org.apache.gearpump.partitioner.HashPartitioner\",6],[2,\"org.apache.gearpump.partitioner.HashPartitioner\",10],[4,\"org.apache.gearpump.partitioner.HashPartitioner\",10],[7,\"org.apache.gearpump.partitioner.HashPartitioner\",11],[2,\"org.apache.gearpump.partitioner.HashPartitioner\",9],[10,\"org.apache.gearpump.partitioner.HashPartitioner\",11],[0,\"org.apache.gearpump.partitioner.HashPartitioner\",10],[0,\"org.apache.gearpump.partitioner.HashPartitioner\",5],[1,\"org.apache.gearpump.partitioner.HashPartitioner\",8],[0,\"org.apache.gearpump.partitioner.HashPartitioner\",4],[0,\"org.apache.gearpump.partitioner.HashPartitioner\",2],[1,\"org.apache.gearpump.partitioner.HashPartitioner\",7]]}\r\n}\r\n```\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/intel-hadoop/gearpump/828)\n<!-- Reviewable:end -->\n","created_at":"2015-04-16T09:56:41Z","updated_at":"2015-04-28T02:40:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1116e4609f9e26f4682e3daaaef6ffcb2af414d2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/828/commits","review_comments_url":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/828/comments","review_comment_url":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/comments{/number}","comments_url":"https://api.github.com/repos/intel-hadoop/gearpump/issues/828/comments","statuses_url":"https://api.github.com/repos/intel-hadoop/gearpump/statuses/b07c258fb9bfe478bf344eb6c4494ec4d9073ae7","head":{"label":"kkasravi:issue_53","ref":"issue_53","sha":"b07c258fb9bfe478bf344eb6c4494ec4d9073ae7","user":{"login":"kkasravi","id":146453,"avatar_url":"https://avatars.githubusercontent.com/u/146453?v=3","gravatar_id":"","url":"https://api.github.com/users/kkasravi","html_url":"https://github.com/kkasravi","followers_url":"https://api.github.com/users/kkasravi/followers","following_url":"https://api.github.com/users/kkasravi/following{/other_user}","gists_url":"https://api.github.com/users/kkasravi/gists{/gist_id}","starred_url":"https://api.github.com/users/kkasravi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkasravi/subscriptions","organizations_url":"https://api.github.com/users/kkasravi/orgs","repos_url":"https://api.github.com/users/kkasravi/repos","events_url":"https://api.github.com/users/kkasravi/events{/privacy}","received_events_url":"https://api.github.com/users/kkasravi/received_events","type":"User","site_admin":false},"repo":{"id":26240076,"name":"gearpump","full_name":"kkasravi/gearpump","owner":{"login":"kkasravi","id":146453,"avatar_url":"https://avatars.githubusercontent.com/u/146453?v=3","gravatar_id":"","url":"https://api.github.com/users/kkasravi","html_url":"https://github.com/kkasravi","followers_url":"https://api.github.com/users/kkasravi/followers","following_url":"https://api.github.com/users/kkasravi/following{/other_user}","gists_url":"https://api.github.com/users/kkasravi/gists{/gist_id}","starred_url":"https://api.github.com/users/kkasravi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkasravi/subscriptions","organizations_url":"https://api.github.com/users/kkasravi/orgs","repos_url":"https://api.github.com/users/kkasravi/repos","events_url":"https://api.github.com/users/kkasravi/events{/privacy}","received_events_url":"https://api.github.com/users/kkasravi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kkasravi/gearpump","description":"gearpump","fork":true,"url":"https://api.github.com/repos/kkasravi/gearpump","forks_url":"https://api.github.com/repos/kkasravi/gearpump/forks","keys_url":"https://api.github.com/repos/kkasravi/gearpump/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kkasravi/gearpump/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kkasravi/gearpump/teams","hooks_url":"https://api.github.com/repos/kkasravi/gearpump/hooks","issue_events_url":"https://api.github.com/repos/kkasravi/gearpump/issues/events{/number}","events_url":"https://api.github.com/repos/kkasravi/gearpump/events","assignees_url":"https://api.github.com/repos/kkasravi/gearpump/assignees{/user}","branches_url":"https://api.github.com/repos/kkasravi/gearpump/branches{/branch}","tags_url":"https://api.github.com/repos/kkasravi/gearpump/tags","blobs_url":"https://api.github.com/repos/kkasravi/gearpump/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kkasravi/gearpump/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kkasravi/gearpump/git/refs{/sha}","trees_url":"https://api.github.com/repos/kkasravi/gearpump/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kkasravi/gearpump/statuses/{sha}","languages_url":"https://api.github.com/repos/kkasravi/gearpump/languages","stargazers_url":"https://api.github.com/repos/kkasravi/gearpump/stargazers","contributors_url":"https://api.github.com/repos/kkasravi/gearpump/contributors","subscribers_url":"https://api.github.com/repos/kkasravi/gearpump/subscribers","subscription_url":"https://api.github.com/repos/kkasravi/gearpump/subscription","commits_url":"https://api.github.com/repos/kkasravi/gearpump/commits{/sha}","git_commits_url":"https://api.github.com/repos/kkasravi/gearpump/git/commits{/sha}","comments_url":"https://api.github.com/repos/kkasravi/gearpump/comments{/number}","issue_comment_url":"https://api.github.com/repos/kkasravi/gearpump/issues/comments{/number}","contents_url":"https://api.github.com/repos/kkasravi/gearpump/contents/{+path}","compare_url":"https://api.github.com/repos/kkasravi/gearpump/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kkasravi/gearpump/merges","archive_url":"https://api.github.com/repos/kkasravi/gearpump/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kkasravi/gearpump/downloads","issues_url":"https://api.github.com/repos/kkasravi/gearpump/issues{/number}","pulls_url":"https://api.github.com/repos/kkasravi/gearpump/pulls{/number}","milestones_url":"https://api.github.com/repos/kkasravi/gearpump/milestones{/number}","notifications_url":"https://api.github.com/repos/kkasravi/gearpump/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kkasravi/gearpump/labels{/name}","releases_url":"https://api.github.com/repos/kkasravi/gearpump/releases{/id}","created_at":"2014-11-05T21:14:27Z","updated_at":"2015-01-04T18:34:43Z","pushed_at":"2015-04-28T00:41:41Z","git_url":"git://github.com/kkasravi/gearpump.git","ssh_url":"git@github.com:kkasravi/gearpump.git","clone_url":"https://github.com/kkasravi/gearpump.git","svn_url":"https://github.com/kkasravi/gearpump","homepage":"","size":8776,"stargazers_count":0,"watchers_count":0,"language":"Scala","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-hadoop:master","ref":"master","sha":"c0d4c2aea1023978fcacc319f1d65ad6536bd0dc","user":{"login":"intel-hadoop","id":1839373,"avatar_url":"https://avatars.githubusercontent.com/u/1839373?v=3","gravatar_id":"","url":"https://api.github.com/users/intel-hadoop","html_url":"https://github.com/intel-hadoop","followers_url":"https://api.github.com/users/intel-hadoop/followers","following_url":"https://api.github.com/users/intel-hadoop/following{/other_user}","gists_url":"https://api.github.com/users/intel-hadoop/gists{/gist_id}","starred_url":"https://api.github.com/users/intel-hadoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel-hadoop/subscriptions","organizations_url":"https://api.github.com/users/intel-hadoop/orgs","repos_url":"https://api.github.com/users/intel-hadoop/repos","events_url":"https://api.github.com/users/intel-hadoop/events{/privacy}","received_events_url":"https://api.github.com/users/intel-hadoop/received_events","type":"Organization","site_admin":false},"repo":{"id":22139167,"name":"gearpump","full_name":"intel-hadoop/gearpump","owner":{"login":"intel-hadoop","id":1839373,"avatar_url":"https://avatars.githubusercontent.com/u/1839373?v=3","gravatar_id":"","url":"https://api.github.com/users/intel-hadoop","html_url":"https://github.com/intel-hadoop","followers_url":"https://api.github.com/users/intel-hadoop/followers","following_url":"https://api.github.com/users/intel-hadoop/following{/other_user}","gists_url":"https://api.github.com/users/intel-hadoop/gists{/gist_id}","starred_url":"https://api.github.com/users/intel-hadoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel-hadoop/subscriptions","organizations_url":"https://api.github.com/users/intel-hadoop/orgs","repos_url":"https://api.github.com/users/intel-hadoop/repos","events_url":"https://api.github.com/users/intel-hadoop/events{/privacy}","received_events_url":"https://api.github.com/users/intel-hadoop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/intel-hadoop/gearpump","description":"Lightweight real-time big data streaming engine","fork":false,"url":"https://api.github.com/repos/intel-hadoop/gearpump","forks_url":"https://api.github.com/repos/intel-hadoop/gearpump/forks","keys_url":"https://api.github.com/repos/intel-hadoop/gearpump/keys{/key_id}","collaborators_url":"https://api.github.com/repos/intel-hadoop/gearpump/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/intel-hadoop/gearpump/teams","hooks_url":"https://api.github.com/repos/intel-hadoop/gearpump/hooks","issue_events_url":"https://api.github.com/repos/intel-hadoop/gearpump/issues/events{/number}","events_url":"https://api.github.com/repos/intel-hadoop/gearpump/events","assignees_url":"https://api.github.com/repos/intel-hadoop/gearpump/assignees{/user}","branches_url":"https://api.github.com/repos/intel-hadoop/gearpump/branches{/branch}","tags_url":"https://api.github.com/repos/intel-hadoop/gearpump/tags","blobs_url":"https://api.github.com/repos/intel-hadoop/gearpump/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/intel-hadoop/gearpump/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/intel-hadoop/gearpump/git/refs{/sha}","trees_url":"https://api.github.com/repos/intel-hadoop/gearpump/git/trees{/sha}","statuses_url":"https://api.github.com/repos/intel-hadoop/gearpump/statuses/{sha}","languages_url":"https://api.github.com/repos/intel-hadoop/gearpump/languages","stargazers_url":"https://api.github.com/repos/intel-hadoop/gearpump/stargazers","contributors_url":"https://api.github.com/repos/intel-hadoop/gearpump/contributors","subscribers_url":"https://api.github.com/repos/intel-hadoop/gearpump/subscribers","subscription_url":"https://api.github.com/repos/intel-hadoop/gearpump/subscription","commits_url":"https://api.github.com/repos/intel-hadoop/gearpump/commits{/sha}","git_commits_url":"https://api.github.com/repos/intel-hadoop/gearpump/git/commits{/sha}","comments_url":"https://api.github.com/repos/intel-hadoop/gearpump/comments{/number}","issue_comment_url":"https://api.github.com/repos/intel-hadoop/gearpump/issues/comments{/number}","contents_url":"https://api.github.com/repos/intel-hadoop/gearpump/contents/{+path}","compare_url":"https://api.github.com/repos/intel-hadoop/gearpump/compare/{base}...{head}","merges_url":"https://api.github.com/repos/intel-hadoop/gearpump/merges","archive_url":"https://api.github.com/repos/intel-hadoop/gearpump/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/intel-hadoop/gearpump/downloads","issues_url":"https://api.github.com/repos/intel-hadoop/gearpump/issues{/number}","pulls_url":"https://api.github.com/repos/intel-hadoop/gearpump/pulls{/number}","milestones_url":"https://api.github.com/repos/intel-hadoop/gearpump/milestones{/number}","notifications_url":"https://api.github.com/repos/intel-hadoop/gearpump/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/intel-hadoop/gearpump/labels{/name}","releases_url":"https://api.github.com/repos/intel-hadoop/gearpump/releases{/id}","created_at":"2014-07-23T08:55:26Z","updated_at":"2015-04-28T00:29:45Z","pushed_at":"2015-04-28T00:41:44Z","git_url":"git://github.com/intel-hadoop/gearpump.git","ssh_url":"git@github.com:intel-hadoop/gearpump.git","clone_url":"https://github.com/intel-hadoop/gearpump.git","svn_url":"https://github.com/intel-hadoop/gearpump","homepage":"http://gearpump.io","size":16439,"stargazers_count":250,"watchers_count":250,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":80,"forks":47,"open_issues":80,"watchers":250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/828"},"html":{"href":"https://github.com/intel-hadoop/gearpump/pull/828"},"issue":{"href":"https://api.github.com/repos/intel-hadoop/gearpump/issues/828"},"comments":{"href":"https://api.github.com/repos/intel-hadoop/gearpump/issues/828/comments"},"review_comments":{"href":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/828/comments"},"review_comment":{"href":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/intel-hadoop/gearpump/pulls/828/commits"},"statuses":{"href":"https://api.github.com/repos/intel-hadoop/gearpump/statuses/b07c258fb9bfe478bf344eb6c4494ec4d9073ae7"}}}}