title: When spark-shell launch, It has RuntimeException for SimpleUserGroupsMapping
body: <p>I install HDFS, YARN through Ambari and try to deploy spark on yarn.</p>
  
  <p>But When I execute follow script, Spark has error</p>
  
  <p>How to deploy spark on yarn.
  Would you mind explaining how to deploy spark on yarn step by step?</p>
  
  <p>I set HADOOP_CONF_DIR, YARN_CONF_DIR in spark-env.sh and spark.master in spark-defaults.conf.</p>
  
  <p><strong>execute script</strong></p>
  
  <pre><code>./bin/spark-shell --master yarn-client
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.security.SimpleUserGroupsMapping not found
          at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2106)
          at org.apache.hadoop.security.Groups.&lt;init&gt;(Groups.java:70)
          at org.apache.hadoop.security.Groups.&lt;init&gt;(Groups.java:66)
          at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:280)
          at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:271)
          at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:248)
          at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:763)
          at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:748)
          at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:621)
          at org.apache.spark.util.Utils$$anonfun$getCurrentUserName$1.apply(Utils.scala:2136)
          at org.apache.spark.util.Utils$$anonfun$getCurrentUserName$1.apply(Utils.scala:2136)
          at scala.Option.getOrElse(Option.scala:120)
          at org.apache.spark.util.Utils$.getCurrentUserName(Utils.scala:2136)
          at org.apache.spark.SecurityManager.&lt;init&gt;(SecurityManager.scala:214)
          at org.apache.spark.repl.SparkIMain.&lt;init&gt;(SparkIMain.scala:118)
          at org.apache.spark.repl.SparkILoop$SparkILoopInterpreter.&lt;init&gt;(SparkILoop.scala:187)
          at org.apache.spark.repl.SparkILoop.createInterpreter(SparkILoop.scala:217)
          at org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$SparkILoop$$process$1.apply$mcZ$sp(SparkILoop.scala:949)
          at org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$SparkILoop$$process$1.apply(SparkILoop.scala:945)
          at org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$SparkILoop$$process$1.apply(SparkILoop.scala:945)
          at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)
          at org.apache.spark.repl.SparkILoop.org$apache$spark$repl$SparkILoop$$process(SparkILoop.scala:945)
          at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:1059)
          at org.apache.spark.repl.Main$.main(Main.scala:31)
          at org.apache.spark.repl.Main.main(Main.scala)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:731)
          at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
          at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
          at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
          at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
  Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.security.SimpleUserGroupsMapping not found
          at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2074)
          at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2098)
          ... 33 more
  Caused by: java.lang.ClassNotFoundException: Class org.apache.hadoop.security.SimpleUserGroupsMapping not found
          at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1980)
          at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2072)
          ... 34 more
  16/02/19 22:07:20 INFO util.ShutdownHookManager: Shutdown hook called
  16/02/19 22:07:20 INFO util.ShutdownHookManager: Deleting directory 
  </code></pre>