{"action":"created","comment":{"url":"https://api.github.com/repos/cloudera/livy/pulls/comments/72372610","id":72372610,"diff_hunk":"@@ -165,15 +174,30 @@ class LivyServer extends Logging {\n    */\n   private[server] def testSparkSubmit(livyConf: LivyConf): Unit = {\n     try {\n-      val version = sparkSubmitVersion(livyConf)\n-      logger.info(f\"Using spark-submit version $version\")\n+      testSparkVersion(sparkSubmitVersion(livyConf))\n     } catch {\n       case e: IOException =>\n         throw new IOException(\"Failed to run spark-submit executable\", e)\n     }\n   }\n \n   /**\n+   * Throw an exception if Spark version is not supported.\n+   * @param version Spark version\n+   */\n+  private[server] def testSparkVersion(version: String): Unit = {\n+    val versionPattern = \"\"\"(\\d)+\\.(\\d)+(?:\\.\\d*)?\"\"\".r\n+    val (minMajor, minMinor) = (1, 6)\n+    val supportedVersion = version match {\n+      case versionPattern(major, minor) =>\n+        major.toInt > minMajor || major.toInt == minMajor && minor.toInt >= minMinor","path":"server/src/main/scala/com/cloudera/livy/server/LivyServer.scala","position":52,"original_position":52,"commit_id":"441c74bec2749245bfcca5ad7c27ecdbec376541","original_commit_id":"441c74bec2749245bfcca5ad7c27ecdbec376541","user":{"login":"vanzin","id":1694083,"avatar_url":"https://avatars.githubusercontent.com/u/1694083?v=3","gravatar_id":"","url":"https://api.github.com/users/vanzin","html_url":"https://github.com/vanzin","followers_url":"https://api.github.com/users/vanzin/followers","following_url":"https://api.github.com/users/vanzin/following{/other_user}","gists_url":"https://api.github.com/users/vanzin/gists{/gist_id}","starred_url":"https://api.github.com/users/vanzin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanzin/subscriptions","organizations_url":"https://api.github.com/users/vanzin/orgs","repos_url":"https://api.github.com/users/vanzin/repos","events_url":"https://api.github.com/users/vanzin/events{/privacy}","received_events_url":"https://api.github.com/users/vanzin/received_events","type":"User","site_admin":false},"body":"Well, Livy doesn't work with Spark 2, so might as well enforce that too.","created_at":"2016-07-27T02:39:04Z","updated_at":"2016-07-27T02:39:04Z","html_url":"https://github.com/cloudera/livy/pull/163#discussion_r72372610","pull_request_url":"https://api.github.com/repos/cloudera/livy/pulls/163","_links":{"self":{"href":"https://api.github.com/repos/cloudera/livy/pulls/comments/72372610"},"html":{"href":"https://github.com/cloudera/livy/pull/163#discussion_r72372610"},"pull_request":{"href":"https://api.github.com/repos/cloudera/livy/pulls/163"}}},"pull_request":{"url":"https://api.github.com/repos/cloudera/livy/pulls/163","id":76833284,"html_url":"https://github.com/cloudera/livy/pull/163","diff_url":"https://github.com/cloudera/livy/pull/163.diff","patch_url":"https://github.com/cloudera/livy/pull/163.patch","issue_url":"https://api.github.com/repos/cloudera/livy/issues/163","number":163,"state":"open","locked":false,"title":"LIVY-184. Better YARN integration for Batch Session.","user":{"login":"tc0312","id":8400790,"avatar_url":"https://avatars.githubusercontent.com/u/8400790?v=3","gravatar_id":"","url":"https://api.github.com/users/tc0312","html_url":"https://github.com/tc0312","followers_url":"https://api.github.com/users/tc0312/followers","following_url":"https://api.github.com/users/tc0312/following{/other_user}","gists_url":"https://api.github.com/users/tc0312/gists{/gist_id}","starred_url":"https://api.github.com/users/tc0312/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tc0312/subscriptions","organizations_url":"https://api.github.com/users/tc0312/orgs","repos_url":"https://api.github.com/users/tc0312/repos","events_url":"https://api.github.com/users/tc0312/events{/privacy}","received_events_url":"https://api.github.com/users/tc0312/received_events","type":"User","site_admin":false},"body":"When livy is running with YARN master:\r\n- Stop and log session using YARN API.\r\n- Exposed app id.\r\n- Livy now requires Spark 1.6+. Added a check so Livy won't start if it's running with older Spark.\r\n\r\nTest changes:\r\n- Added a test to verify killing the batch session will kill its YARN app.\r\n- Added a test to verify killing the YARN app will change the batch session state.\r\n- Added YarnClient integration in test framework.\r\n- Added halt mode in SimpleSparkApp in test lib for kill session test.\r\n- Added a method to dump logs when Batch test fails.\r\n- Added a Clock interface to allow unit testing to mock out time.","created_at":"2016-07-09T01:18:24Z","updated_at":"2016-07-27T02:39:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07c7f62ab8bbcf664c055a50c12c491f09a7e5ce","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cloudera/livy/pulls/163/commits","review_comments_url":"https://api.github.com/repos/cloudera/livy/pulls/163/comments","review_comment_url":"https://api.github.com/repos/cloudera/livy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudera/livy/issues/163/comments","statuses_url":"https://api.github.com/repos/cloudera/livy/statuses/441c74bec2749245bfcca5ad7c27ecdbec376541","head":{"label":"hdinsight:batch-yarn","ref":"batch-yarn","sha":"441c74bec2749245bfcca5ad7c27ecdbec376541","user":{"login":"hdinsight","id":5924018,"avatar_url":"https://avatars.githubusercontent.com/u/5924018?v=3","gravatar_id":"","url":"https://api.github.com/users/hdinsight","html_url":"https://github.com/hdinsight","followers_url":"https://api.github.com/users/hdinsight/followers","following_url":"https://api.github.com/users/hdinsight/following{/other_user}","gists_url":"https://api.github.com/users/hdinsight/gists{/gist_id}","starred_url":"https://api.github.com/users/hdinsight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdinsight/subscriptions","organizations_url":"https://api.github.com/users/hdinsight/orgs","repos_url":"https://api.github.com/users/hdinsight/repos","events_url":"https://api.github.com/users/hdinsight/events{/privacy}","received_events_url":"https://api.github.com/users/hdinsight/received_events","type":"Organization","site_admin":false},"repo":{"id":47885827,"name":"livy","full_name":"hdinsight/livy","owner":{"login":"hdinsight","id":5924018,"avatar_url":"https://avatars.githubusercontent.com/u/5924018?v=3","gravatar_id":"","url":"https://api.github.com/users/hdinsight","html_url":"https://github.com/hdinsight","followers_url":"https://api.github.com/users/hdinsight/followers","following_url":"https://api.github.com/users/hdinsight/following{/other_user}","gists_url":"https://api.github.com/users/hdinsight/gists{/gist_id}","starred_url":"https://api.github.com/users/hdinsight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdinsight/subscriptions","organizations_url":"https://api.github.com/users/hdinsight/orgs","repos_url":"https://api.github.com/users/hdinsight/repos","events_url":"https://api.github.com/users/hdinsight/events{/privacy}","received_events_url":"https://api.github.com/users/hdinsight/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hdinsight/livy","description":"Livy is an open source REST interface for interacting with Apache Spark from anywhere","fork":true,"url":"https://api.github.com/repos/hdinsight/livy","forks_url":"https://api.github.com/repos/hdinsight/livy/forks","keys_url":"https://api.github.com/repos/hdinsight/livy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hdinsight/livy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hdinsight/livy/teams","hooks_url":"https://api.github.com/repos/hdinsight/livy/hooks","issue_events_url":"https://api.github.com/repos/hdinsight/livy/issues/events{/number}","events_url":"https://api.github.com/repos/hdinsight/livy/events","assignees_url":"https://api.github.com/repos/hdinsight/livy/assignees{/user}","branches_url":"https://api.github.com/repos/hdinsight/livy/branches{/branch}","tags_url":"https://api.github.com/repos/hdinsight/livy/tags","blobs_url":"https://api.github.com/repos/hdinsight/livy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hdinsight/livy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hdinsight/livy/git/refs{/sha}","trees_url":"https://api.github.com/repos/hdinsight/livy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hdinsight/livy/statuses/{sha}","languages_url":"https://api.github.com/repos/hdinsight/livy/languages","stargazers_url":"https://api.github.com/repos/hdinsight/livy/stargazers","contributors_url":"https://api.github.com/repos/hdinsight/livy/contributors","subscribers_url":"https://api.github.com/repos/hdinsight/livy/subscribers","subscription_url":"https://api.github.com/repos/hdinsight/livy/subscription","commits_url":"https://api.github.com/repos/hdinsight/livy/commits{/sha}","git_commits_url":"https://api.github.com/repos/hdinsight/livy/git/commits{/sha}","comments_url":"https://api.github.com/repos/hdinsight/livy/comments{/number}","issue_comment_url":"https://api.github.com/repos/hdinsight/livy/issues/comments{/number}","contents_url":"https://api.github.com/repos/hdinsight/livy/contents/{+path}","compare_url":"https://api.github.com/repos/hdinsight/livy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hdinsight/livy/merges","archive_url":"https://api.github.com/repos/hdinsight/livy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hdinsight/livy/downloads","issues_url":"https://api.github.com/repos/hdinsight/livy/issues{/number}","pulls_url":"https://api.github.com/repos/hdinsight/livy/pulls{/number}","milestones_url":"https://api.github.com/repos/hdinsight/livy/milestones{/number}","notifications_url":"https://api.github.com/repos/hdinsight/livy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hdinsight/livy/labels{/name}","releases_url":"https://api.github.com/repos/hdinsight/livy/releases{/id}","deployments_url":"https://api.github.com/repos/hdinsight/livy/deployments","created_at":"2015-12-12T16:39:58Z","updated_at":"2016-07-25T06:12:37Z","pushed_at":"2016-07-23T02:28:11Z","git_url":"git://github.com/hdinsight/livy.git","ssh_url":"git@github.com:hdinsight/livy.git","clone_url":"https://github.com/hdinsight/livy.git","svn_url":"https://github.com/hdinsight/livy","homepage":"","size":1370,"stargazers_count":5,"watchers_count":5,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":5,"default_branch":"master"}},"base":{"label":"cloudera:master","ref":"master","sha":"8ab212818553afda07dff584cbcba47cc619c0e3","user":{"login":"cloudera","id":87383,"avatar_url":"https://avatars.githubusercontent.com/u/87383?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudera","html_url":"https://github.com/cloudera","followers_url":"https://api.github.com/users/cloudera/followers","following_url":"https://api.github.com/users/cloudera/following{/other_user}","gists_url":"https://api.github.com/users/cloudera/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudera/subscriptions","organizations_url":"https://api.github.com/users/cloudera/orgs","repos_url":"https://api.github.com/users/cloudera/repos","events_url":"https://api.github.com/users/cloudera/events{/privacy}","received_events_url":"https://api.github.com/users/cloudera/received_events","type":"Organization","site_admin":false},"repo":{"id":46328956,"name":"livy","full_name":"cloudera/livy","owner":{"login":"cloudera","id":87383,"avatar_url":"https://avatars.githubusercontent.com/u/87383?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudera","html_url":"https://github.com/cloudera","followers_url":"https://api.github.com/users/cloudera/followers","following_url":"https://api.github.com/users/cloudera/following{/other_user}","gists_url":"https://api.github.com/users/cloudera/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudera/subscriptions","organizations_url":"https://api.github.com/users/cloudera/orgs","repos_url":"https://api.github.com/users/cloudera/repos","events_url":"https://api.github.com/users/cloudera/events{/privacy}","received_events_url":"https://api.github.com/users/cloudera/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudera/livy","description":"Livy is an open source REST interface for interacting with Apache Spark from anywhere","fork":false,"url":"https://api.github.com/repos/cloudera/livy","forks_url":"https://api.github.com/repos/cloudera/livy/forks","keys_url":"https://api.github.com/repos/cloudera/livy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudera/livy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudera/livy/teams","hooks_url":"https://api.github.com/repos/cloudera/livy/hooks","issue_events_url":"https://api.github.com/repos/cloudera/livy/issues/events{/number}","events_url":"https://api.github.com/repos/cloudera/livy/events","assignees_url":"https://api.github.com/repos/cloudera/livy/assignees{/user}","branches_url":"https://api.github.com/repos/cloudera/livy/branches{/branch}","tags_url":"https://api.github.com/repos/cloudera/livy/tags","blobs_url":"https://api.github.com/repos/cloudera/livy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudera/livy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudera/livy/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudera/livy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudera/livy/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudera/livy/languages","stargazers_url":"https://api.github.com/repos/cloudera/livy/stargazers","contributors_url":"https://api.github.com/repos/cloudera/livy/contributors","subscribers_url":"https://api.github.com/repos/cloudera/livy/subscribers","subscription_url":"https://api.github.com/repos/cloudera/livy/subscription","commits_url":"https://api.github.com/repos/cloudera/livy/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudera/livy/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudera/livy/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudera/livy/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudera/livy/contents/{+path}","compare_url":"https://api.github.com/repos/cloudera/livy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudera/livy/merges","archive_url":"https://api.github.com/repos/cloudera/livy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudera/livy/downloads","issues_url":"https://api.github.com/repos/cloudera/livy/issues{/number}","pulls_url":"https://api.github.com/repos/cloudera/livy/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudera/livy/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudera/livy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudera/livy/labels{/name}","releases_url":"https://api.github.com/repos/cloudera/livy/releases{/id}","deployments_url":"https://api.github.com/repos/cloudera/livy/deployments","created_at":"2015-11-17T06:55:45Z","updated_at":"2016-07-27T01:22:45Z","pushed_at":"2016-07-26T14:40:10Z","git_url":"git://github.com/cloudera/livy.git","ssh_url":"git@github.com:cloudera/livy.git","clone_url":"https://github.com/cloudera/livy.git","svn_url":"https://github.com/cloudera/livy","homepage":"http://livy.io/","size":1999,"stargazers_count":180,"watchers_count":180,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":78,"mirror_url":null,"open_issues_count":6,"forks":78,"open_issues":6,"watchers":180,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudera/livy/pulls/163"},"html":{"href":"https://github.com/cloudera/livy/pull/163"},"issue":{"href":"https://api.github.com/repos/cloudera/livy/issues/163"},"comments":{"href":"https://api.github.com/repos/cloudera/livy/issues/163/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudera/livy/pulls/163/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudera/livy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudera/livy/pulls/163/commits"},"statuses":{"href":"https://api.github.com/repos/cloudera/livy/statuses/441c74bec2749245bfcca5ad7c27ecdbec376541"}}}}
{"actor":{"display_login":"vanzin"}}