{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/22727","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/22727/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/22727/comments","events_url":"https://api.github.com/repos/apache/spark/issues/22727/events","html_url":"https://github.com/apache/spark/pull/22727","id":370175404,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyOTE1Mjg4","number":22727,"title":"[SPARK-25735][CORE][MINOR]Improve start-thriftserver.sh: print clean usage and exit with code 1","user":{"login":"gengliangwang","id":1097932,"node_id":"MDQ6VXNlcjEwOTc5MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/1097932?v=4","gravatar_id":"","url":"https://api.github.com/users/gengliangwang","html_url":"https://github.com/gengliangwang","followers_url":"https://api.github.com/users/gengliangwang/followers","following_url":"https://api.github.com/users/gengliangwang/following{/other_user}","gists_url":"https://api.github.com/users/gengliangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/gengliangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gengliangwang/subscriptions","organizations_url":"https://api.github.com/users/gengliangwang/orgs","repos_url":"https://api.github.com/users/gengliangwang/repos","events_url":"https://api.github.com/users/gengliangwang/events{/privacy}","received_events_url":"https://api.github.com/users/gengliangwang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-15T13:55:35Z","updated_at":"2018-10-15T13:58:32Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/22727","html_url":"https://github.com/apache/spark/pull/22727","diff_url":"https://github.com/apache/spark/pull/22727.diff","patch_url":"https://github.com/apache/spark/pull/22727.patch"},"body":"## What changes were proposed in this pull request?\r\nCurrently if we run \r\n```\r\nsh start-thriftserver.sh -h\r\n```\r\n\r\nwe get\r\n```\r\n...\r\nThrift server options:\r\n2018-10-15 21:45:39 INFO HiveThriftServer2:54 - Starting SparkContext\r\n2018-10-15 21:45:40 INFO SparkContext:54 - Running Spark version 2.3.2\r\n2018-10-15 21:45:40 WARN NativeCodeLoader:62 - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable\r\n2018-10-15 21:45:40 ERROR SparkContext:91 - Error initializing SparkContext.\r\norg.apache.spark.SparkException: A master URL must be set in your configuration\r\nat org.apache.spark.SparkContext.<init>(SparkContext.scala:367)\r\nat org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2493)\r\nat org.apache.spark.sql.SparkSession$Builder$$anonfun$7.apply(SparkSession.scala:934)\r\nat org.apache.spark.sql.SparkSession$Builder$$anonfun$7.apply(SparkSession.scala:925)\r\nat scala.Option.getOrElse(Option.scala:121)\r\nat org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:925)\r\nat org.apache.spark.sql.hive.thriftserver.SparkSQLEnv$.init(SparkSQLEnv.scala:48)\r\nat org.apache.spark.sql.hive.thriftserver.HiveThriftServer2$.main(HiveThriftServer2.scala:79)\r\nat org.apache.spark.sql.hive.thriftserver.HiveThriftServer2.main(HiveThriftServer2.scala)\r\n2018-10-15 21:45:40 ERROR Utils:91 - Uncaught exception in thread main\r\n```\r\n\r\nAfter fix, the usage output is clean:\r\n```\r\n...\r\nThrift server options:\r\n--hiveconf <property=value> Use value for given property\r\n```\r\n\r\nAlso exit with code 1, to follow other scripts(this is the behavior of parsing option `-h` for other linux commands as well).\r\n\r\n## How was this patch tested?\r\n\r\nManual test.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/429862925","html_url":"https://github.com/apache/spark/pull/22727#issuecomment-429862925","issue_url":"https://api.github.com/repos/apache/spark/issues/22727","id":429862925,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTg2MjkyNQ==","user":{"login":"SparkQA","id":8108735,"node_id":"MDQ6VXNlcjgxMDg3MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/8108735?v=4","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T13:58:32Z","updated_at":"2018-10-15T13:58:32Z","author_association":"NONE","body":"**[Test build #97394 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97394/testReport)** for PR 22727 at commit [`3c84e3a`](https://github.com/apache/spark/commit/3c84e3a4d182e0bf9553ba74b7398b169c3d65bd)."}}
{"actor":{"display_login":"SparkQA"}}