title: How to set queue with org.apache.spark.launcher.SparkLauncher
body: <p>If I use spark-submit command line to submit spark task to yarn, I would be able to set queue with <code>--queue myqueuename</code></p>
  
  <p>Full command would be</p>
  
  <pre><code>/myserver/spark-2.2.0-bin-hadoop2.4/bin/spark-submit \
  --master yarn \
  --deploy-mode cluster \
  --executor-memory 4G \
  --executor-cores 2 \
  --queue myqueuename \
  --class task.MyTask \
   "/my/jar/path/spark-app-full.jar"  \
  --input  /data/input/path \
  --output  /data/output/path/ 
  </code></pre>
  
  <p>However, how to set queue with SparkLauncher from java. I would like to launch spark task programatically. </p>
  
  <p>My java code so far</p>
  
  <pre><code>SparkAppHandle handle = new SparkLauncher()
          .setSparkHome("/myserver/spark-2.2.0-bin-hadoop2.4")
          .setAppResource(jarPath)
          .setMainClass("task.MyTask")
          .setMaster("yarn")
          .setDeployMode("cluster")
          .setConf(SparkLauncher.EXECUTOR_MEMORY, "8G")
          .setConf(SparkLauncher.EXECUTOR_CORES, "4")
          .addAppArgs("--input",
                  inputPath,
                  "--output",
                  outputPath)
          .startApplication(taskListener);
  </code></pre>
  
  <p>I would like to know how to specific queue in java code using SparkLauncher</p>