opts.inputFileFormat = getClass(inputFormatArg, ns, FileInputFormat.class, parser, INPUT_FORMAT_SUBSTITUTIONS);
String sparkMaster = System.getProperty("spark.master");
if (opts.pipelineType == PipelineType.spark) {
if (sparkMaster == null) {
throw new ArgumentParserException("--pipeline-type=" + PipelineType.spark + " must not run as a MapReduce job", parser);
}
} else if (opts.pipelineType == PipelineType.mapreduce) {
if (sparkMaster != null) {
throw new ArgumentParserException("--pipeline-type=" + PipelineType.mapreduce + " must not run as a Spark job", parser);
}
}
} catch (ArgumentParserException e) {
parser.handleError(e);
return 1;