SparkConf sconf = new SparkConf();
if (!sconf.contains("spark.app.name") || sconf.get("spark.app.name").equals(getClass().getName())) {
sconf.setAppName(Utils.getShortClassName(getClass()));
}
JavaSparkContext sparkContext = new JavaSparkContext(sconf);
pipeline = new SparkPipeline(sparkContext, sparkContext.appName());
pipeline.setConfiguration(getConf());
} else {
throw new IllegalArgumentException("Unsupported --pipeline-type: " + opts.pipelineType);
}