Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3896#discussion_r22592296
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
    @@ -17,34 +17,56 @@
     
     package org.apache.spark.deploy.yarn
     
    +import java.net.{InetAddress, UnknownHostException, URI, 
URISyntaxException}
     import java.nio.ByteBuffer
     
    -import org.apache.hadoop.conf.Configuration
    +import scala.collection.JavaConversions._
    +import scala.collection.mutable.{HashMap, ListBuffer, Map}
    +import scala.util.{Try, Success, Failure}
    +
    +import com.google.common.base.Objects
    +
     import org.apache.hadoop.io.DataOutputBuffer
    +import org.apache.hadoop.conf.Configuration
    +import org.apache.hadoop.fs._
    +import org.apache.hadoop.fs.permission.FsPermission
    +import org.apache.hadoop.mapred.Master
    +import org.apache.hadoop.mapreduce.MRJobConfig
    +import org.apache.hadoop.security.{Credentials, UserGroupInformation}
    +import org.apache.hadoop.util.StringUtils
    +import org.apache.hadoop.yarn.api._
    +import org.apache.hadoop.yarn.api.ApplicationConstants.Environment
    +import org.apache.hadoop.yarn.api.protocolrecords._
     import org.apache.hadoop.yarn.api.records._
     import org.apache.hadoop.yarn.client.api.{YarnClient, 
YarnClientApplication}
     import org.apache.hadoop.yarn.conf.YarnConfiguration
     import org.apache.hadoop.yarn.util.Records
     
    -import org.apache.spark.{Logging, SparkConf}
    +import org.apache.spark.{Logging, SecurityManager, SparkConf, 
SparkContext, SparkException}
     import org.apache.spark.deploy.SparkHadoopUtil
    +import org.apache.spark.util.Utils
     
    -/**
    - * Version of [[org.apache.spark.deploy.yarn.ClientBase]] tailored to 
YARN's stable API.
    - */
     private[spark] class Client(
         val args: ClientArguments,
         val hadoopConf: Configuration,
         val sparkConf: SparkConf)
    -  extends ClientBase with Logging {
    +  extends Logging {
    +
    +  import Client._
     
       def this(clientArgs: ClientArguments, spConf: SparkConf) =
         this(clientArgs, SparkHadoopUtil.get.newConfiguration(spConf), spConf)
     
       def this(clientArgs: ClientArguments) = this(clientArgs, new SparkConf())
     
    -  val yarnClient = YarnClient.createYarnClient
    -  val yarnConf = new YarnConfiguration(hadoopConf)
    +  private val yarnClient = YarnClient.createYarnClient
    +  private val yarnConf = new YarnConfiguration(hadoopConf)
    +  private val credentials = 
UserGroupInformation.getCurrentUser.getCredentials
    +  private val amMemoryOverhead = args.amMemoryOverhead // MB
    +  private val executorMemoryOverhead = args.executorMemoryOverhead // MB
    +  private val distCacheMgr = new ClientDistributedCacheManager()
    +  private val isLaunchingDriver = args.userClass != null
    --- End diff --
    
    mind renaming this `isClusterMode` while you're at it?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to