{"action":"created","comment":{"url":"https://api.github.com/repos/apache/reef/pulls/comments/60797488","id":60797488,"diff_hunk":"@@ -0,0 +1,316 @@\n+﻿// Licensed to the Apache Software Foundation (ASF) under one\n+// or more contributor license agreements.  See the NOTICE file\n+// distributed with this work for additional information\n+// regarding copyright ownership.  The ASF licenses this file\n+// to you under the Apache License, Version 2.0 (the\n+// \"License\"); you may not use this file except in compliance\n+// with the License.  You may obtain a copy of the License at\n+//\n+//   http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing,\n+// software distributed under the License is distributed on an\n+// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+// KIND, either express or implied.  See the License for the\n+// specific language governing permissions and limitations\n+// under the License.\n+\n+using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+\n+using Org.Apache.REEF.Client.Multi.Parameters;\n+using Org.Apache.REEF.Client.Yarn;\n+using Org.Apache.REEF.Client.YARN;\n+using Org.Apache.REEF.Client.YARN.HDI;\n+using Org.Apache.REEF.Client.YARN.Parameters;\n+using Org.Apache.REEF.Common.Runtime;\n+using Org.Apache.REEF.IO.FileSystem.AzureBlob;\n+using Org.Apache.REEF.Tang.Formats;\n+using Org.Apache.REEF.Tang.Implementations.Configuration;\n+using Org.Apache.REEF.Tang.Implementations.Tang;\n+using Org.Apache.REEF.Tang.Interface;\n+using Org.Apache.REEF.Tang.Util;\n+using Org.Apache.REEF.Utilities;\n+using Org.Apache.REEF.Utilities.Collections;\n+\n+namespace Org.Apache.REEF.Client.Multi\n+{\n+    /// <summary>\n+    /// Builder for a multi runtime configuration.\n+    /// Generates a configuration that instantiate a ReefClient that submits multi runtime job\n+    /// </summary>\n+    public sealed class MultiRuntimeConfigurationBuilder\n+    {\n+        private const string MultiRuntimeLauncher =\n+            \"org.apache.reef.bridge.client.MultiRuntimeYarnBootstrapREEFLauncher\";\n+\n+        private static readonly ReadOnlySet<RuntimeName> SupportedRuntimes =\n+            new ReadOnlySet<RuntimeName>(new[] { RuntimeName.Yarn, RuntimeName.Local });\n+\n+        /// <summary>\n+        /// List of runtime for evaluator submissions\n+        /// </summary>\n+        private HashSet<RuntimeName> _runtimes = new HashSet<RuntimeName>();\n+\n+        /// <summary>\n+        /// The default runtime to use for evaluator submission when none is specified\n+        /// </summary>\n+        private Optional<RuntimeName?> _defaultRuntime = Optional<RuntimeName?>.Empty();","path":"lang/cs/Org.Apache.REEF.Client/Multi/MultiRuntimeConfigurationBuilder.cs","position":59,"original_position":59,"commit_id":"590f5c6fd8c6ed172b081f0cb33464bd1362ca17","original_commit_id":"590f5c6fd8c6ed172b081f0cb33464bd1362ca17","user":{"login":"shulmanb","id":519484,"avatar_url":"https://avatars.githubusercontent.com/u/519484?v=3","gravatar_id":"","url":"https://api.github.com/users/shulmanb","html_url":"https://github.com/shulmanb","followers_url":"https://api.github.com/users/shulmanb/followers","following_url":"https://api.github.com/users/shulmanb/following{/other_user}","gists_url":"https://api.github.com/users/shulmanb/gists{/gist_id}","starred_url":"https://api.github.com/users/shulmanb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulmanb/subscriptions","organizations_url":"https://api.github.com/users/shulmanb/orgs","repos_url":"https://api.github.com/users/shulmanb/repos","events_url":"https://api.github.com/users/shulmanb/events{/privacy}","received_events_url":"https://api.github.com/users/shulmanb/received_events","type":"User","site_admin":false},"body":"You are right. Will remove the Optional till the bug is fixed.","created_at":"2016-04-22T20:20:46Z","updated_at":"2016-04-22T20:20:46Z","html_url":"https://github.com/apache/reef/pull/959#discussion_r60797488","pull_request_url":"https://api.github.com/repos/apache/reef/pulls/959","_links":{"self":{"href":"https://api.github.com/repos/apache/reef/pulls/comments/60797488"},"html":{"href":"https://github.com/apache/reef/pull/959#discussion_r60797488"},"pull_request":{"href":"https://api.github.com/repos/apache/reef/pulls/959"}}},"pull_request":{"url":"https://api.github.com/repos/apache/reef/pulls/959","id":67107668,"html_url":"https://github.com/apache/reef/pull/959","diff_url":"https://github.com/apache/reef/pull/959.diff","patch_url":"https://github.com/apache/reef/pull/959.patch","issue_url":"https://api.github.com/repos/apache/reef/issues/959","number":959,"state":"open","locked":false,"title":"[REEF-1054] c# client implementation for multi-runtime","user":{"login":"shulmanb","id":519484,"avatar_url":"https://avatars.githubusercontent.com/u/519484?v=3","gravatar_id":"","url":"https://api.github.com/users/shulmanb","html_url":"https://github.com/shulmanb","followers_url":"https://api.github.com/users/shulmanb/followers","following_url":"https://api.github.com/users/shulmanb/following{/other_user}","gists_url":"https://api.github.com/users/shulmanb/gists{/gist_id}","starred_url":"https://api.github.com/users/shulmanb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulmanb/subscriptions","organizations_url":"https://api.github.com/users/shulmanb/orgs","repos_url":"https://api.github.com/users/shulmanb/repos","events_url":"https://api.github.com/users/shulmanb/events{/privacy}","received_events_url":"https://api.github.com/users/shulmanb/received_events","type":"User","site_admin":false},"body":"This addresses the issue by:\r\n1) Adding bootstrap mechanism for multiruntime\r\n2) Adding c# client configuration builder for multiruntime, that supports HDinsight and YarnRest\r\n3) Extending HelloReef to include ,ultiruntime example\r\n\r\nJIRA:\r\n  [REEF-1054](https://issues.apache.org/jira/browse/REEF-1054)","created_at":"2016-04-19T23:38:26Z","updated_at":"2016-04-22T20:20:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9180311d030d1293e166f545c78ffe2829094f29","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/reef/pulls/959/commits","review_comments_url":"https://api.github.com/repos/apache/reef/pulls/959/comments","review_comment_url":"https://api.github.com/repos/apache/reef/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/reef/issues/959/comments","statuses_url":"https://api.github.com/repos/apache/reef/statuses/590f5c6fd8c6ed172b081f0cb33464bd1362ca17","head":{"label":"shulmanb:REEF-1054","ref":"REEF-1054","sha":"590f5c6fd8c6ed172b081f0cb33464bd1362ca17","user":{"login":"shulmanb","id":519484,"avatar_url":"https://avatars.githubusercontent.com/u/519484?v=3","gravatar_id":"","url":"https://api.github.com/users/shulmanb","html_url":"https://github.com/shulmanb","followers_url":"https://api.github.com/users/shulmanb/followers","following_url":"https://api.github.com/users/shulmanb/following{/other_user}","gists_url":"https://api.github.com/users/shulmanb/gists{/gist_id}","starred_url":"https://api.github.com/users/shulmanb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulmanb/subscriptions","organizations_url":"https://api.github.com/users/shulmanb/orgs","repos_url":"https://api.github.com/users/shulmanb/repos","events_url":"https://api.github.com/users/shulmanb/events{/privacy}","received_events_url":"https://api.github.com/users/shulmanb/received_events","type":"User","site_admin":false},"repo":{"id":41567361,"name":"reef","full_name":"shulmanb/reef","owner":{"login":"shulmanb","id":519484,"avatar_url":"https://avatars.githubusercontent.com/u/519484?v=3","gravatar_id":"","url":"https://api.github.com/users/shulmanb","html_url":"https://github.com/shulmanb","followers_url":"https://api.github.com/users/shulmanb/followers","following_url":"https://api.github.com/users/shulmanb/following{/other_user}","gists_url":"https://api.github.com/users/shulmanb/gists{/gist_id}","starred_url":"https://api.github.com/users/shulmanb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulmanb/subscriptions","organizations_url":"https://api.github.com/users/shulmanb/orgs","repos_url":"https://api.github.com/users/shulmanb/repos","events_url":"https://api.github.com/users/shulmanb/events{/privacy}","received_events_url":"https://api.github.com/users/shulmanb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shulmanb/reef","description":"Mirror of Apache REEF","fork":true,"url":"https://api.github.com/repos/shulmanb/reef","forks_url":"https://api.github.com/repos/shulmanb/reef/forks","keys_url":"https://api.github.com/repos/shulmanb/reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shulmanb/reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shulmanb/reef/teams","hooks_url":"https://api.github.com/repos/shulmanb/reef/hooks","issue_events_url":"https://api.github.com/repos/shulmanb/reef/issues/events{/number}","events_url":"https://api.github.com/repos/shulmanb/reef/events","assignees_url":"https://api.github.com/repos/shulmanb/reef/assignees{/user}","branches_url":"https://api.github.com/repos/shulmanb/reef/branches{/branch}","tags_url":"https://api.github.com/repos/shulmanb/reef/tags","blobs_url":"https://api.github.com/repos/shulmanb/reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shulmanb/reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shulmanb/reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/shulmanb/reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shulmanb/reef/statuses/{sha}","languages_url":"https://api.github.com/repos/shulmanb/reef/languages","stargazers_url":"https://api.github.com/repos/shulmanb/reef/stargazers","contributors_url":"https://api.github.com/repos/shulmanb/reef/contributors","subscribers_url":"https://api.github.com/repos/shulmanb/reef/subscribers","subscription_url":"https://api.github.com/repos/shulmanb/reef/subscription","commits_url":"https://api.github.com/repos/shulmanb/reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/shulmanb/reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/shulmanb/reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/shulmanb/reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/shulmanb/reef/contents/{+path}","compare_url":"https://api.github.com/repos/shulmanb/reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shulmanb/reef/merges","archive_url":"https://api.github.com/repos/shulmanb/reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shulmanb/reef/downloads","issues_url":"https://api.github.com/repos/shulmanb/reef/issues{/number}","pulls_url":"https://api.github.com/repos/shulmanb/reef/pulls{/number}","milestones_url":"https://api.github.com/repos/shulmanb/reef/milestones{/number}","notifications_url":"https://api.github.com/repos/shulmanb/reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shulmanb/reef/labels{/name}","releases_url":"https://api.github.com/repos/shulmanb/reef/releases{/id}","deployments_url":"https://api.github.com/repos/shulmanb/reef/deployments","created_at":"2015-08-28T20:16:41Z","updated_at":"2016-01-20T23:01:44Z","pushed_at":"2016-04-22T18:17:46Z","git_url":"git://github.com/shulmanb/reef.git","ssh_url":"git@github.com:shulmanb/reef.git","clone_url":"https://github.com/shulmanb/reef.git","svn_url":"https://github.com/shulmanb/reef","homepage":"","size":34974,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"1a329b4c375a88b88e8618de339bdff730b8061e","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":25623941,"name":"reef","full_name":"apache/reef","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/reef","description":"Mirror of Apache REEF","fork":false,"url":"https://api.github.com/repos/apache/reef","forks_url":"https://api.github.com/repos/apache/reef/forks","keys_url":"https://api.github.com/repos/apache/reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/reef/teams","hooks_url":"https://api.github.com/repos/apache/reef/hooks","issue_events_url":"https://api.github.com/repos/apache/reef/issues/events{/number}","events_url":"https://api.github.com/repos/apache/reef/events","assignees_url":"https://api.github.com/repos/apache/reef/assignees{/user}","branches_url":"https://api.github.com/repos/apache/reef/branches{/branch}","tags_url":"https://api.github.com/repos/apache/reef/tags","blobs_url":"https://api.github.com/repos/apache/reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/reef/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/reef/languages","stargazers_url":"https://api.github.com/repos/apache/reef/stargazers","contributors_url":"https://api.github.com/repos/apache/reef/contributors","subscribers_url":"https://api.github.com/repos/apache/reef/subscribers","subscription_url":"https://api.github.com/repos/apache/reef/subscription","commits_url":"https://api.github.com/repos/apache/reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/reef/contents/{+path}","compare_url":"https://api.github.com/repos/apache/reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/reef/merges","archive_url":"https://api.github.com/repos/apache/reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/reef/downloads","issues_url":"https://api.github.com/repos/apache/reef/issues{/number}","pulls_url":"https://api.github.com/repos/apache/reef/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/reef/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/reef/labels{/name}","releases_url":"https://api.github.com/repos/apache/reef/releases{/id}","deployments_url":"https://api.github.com/repos/apache/reef/deployments","created_at":"2014-10-23T07:00:10Z","updated_at":"2016-04-05T13:46:50Z","pushed_at":"2016-04-22T20:03:00Z","git_url":"git://github.com/apache/reef.git","ssh_url":"git@github.com:apache/reef.git","clone_url":"https://github.com/apache/reef.git","svn_url":"https://github.com/apache/reef","homepage":"","size":47816,"stargazers_count":46,"watchers_count":46,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":"git://git.apache.org/reef.git","open_issues_count":5,"forks":55,"open_issues":5,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/reef/pulls/959"},"html":{"href":"https://github.com/apache/reef/pull/959"},"issue":{"href":"https://api.github.com/repos/apache/reef/issues/959"},"comments":{"href":"https://api.github.com/repos/apache/reef/issues/959/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/reef/pulls/959/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/reef/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/reef/pulls/959/commits"},"statuses":{"href":"https://api.github.com/repos/apache/reef/statuses/590f5c6fd8c6ed172b081f0cb33464bd1362ca17"}}}}