au.csiro.variantspark.cli.args.SparkArgs.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of variant-spark_2.11 Show documentation
Show all versions of variant-spark_2.11 Show documentation
Genomic variants interpretation toolkit
The newest version!
package au.csiro.variantspark.cli.args
import org.kohsuke.args4j.Option
import au.csiro.pbdava.ssparkle.spark.SparkApp
import org.apache.spark.rdd.RDD
trait SparkArgs extends SparkApp {
@Option(name = "-sp", required = false, usage = "Spark parallelism (def=)",
aliases = Array("--spark-par"))
val sparkPar: Int = 0
def textFile(inputFile: String): RDD[String] =
sc.textFile(inputFile, if (sparkPar > 0) sparkPar else sc.defaultParallelism)
}