private List<String> findExamplesJars() { boolean isTesting = "1".equals(getenv("SPARK_TESTING")); List<String> examplesJars = new ArrayList<>(); String sparkHome = getSparkHome(); File jarsDir; if (new File(sparkHome, "RELEASE").isFile()) { jarsDir = new File(sparkHome, "examples/jars"); } else { jarsDir = new File(sparkHome, String.format("examples/target/scala-%s/jars", getScalaVersion())); } boolean foundDir = jarsDir.isDirectory(); checkState(isTesting || foundDir, "Examples jars directory '%s' does not exist.", jarsDir.getAbsolutePath()); if (foundDir) { for (File f: jarsDir.listFiles()) { examplesJars.add(f.getAbsolutePath()); } } return examplesJars; }
private List<String> findExamplesJars() { boolean isTesting = "1".equals(getenv("SPARK_TESTING")); List<String> examplesJars = new ArrayList<>(); String sparkHome = getSparkHome(); File jarsDir; if (new File(sparkHome, "RELEASE").isFile()) { jarsDir = new File(sparkHome, "examples/jars"); } else { jarsDir = new File(sparkHome, String.format("examples/target/scala-%s/jars", getScalaVersion())); } boolean foundDir = jarsDir.isDirectory(); checkState(isTesting || foundDir, "Examples jars directory '%s' does not exist.", jarsDir.getAbsolutePath()); if (foundDir) { for (File f: jarsDir.listFiles()) { examplesJars.add(f.getAbsolutePath()); } } return examplesJars; }
private List<String> findExamplesJars() { boolean isTesting = "1".equals(getenv("SPARK_TESTING")); List<String> examplesJars = new ArrayList<>(); String sparkHome = getSparkHome(); File jarsDir; if (new File(sparkHome, "RELEASE").isFile()) { jarsDir = new File(sparkHome, "examples/jars"); } else { jarsDir = new File(sparkHome, String.format("examples/target/scala-%s/jars", getScalaVersion())); } boolean foundDir = jarsDir.isDirectory(); checkState(isTesting || foundDir, "Examples jars directory '%s' does not exist.", jarsDir.getAbsolutePath()); if (foundDir) { for (File f: jarsDir.listFiles()) { examplesJars.add(f.getAbsolutePath()); } } return examplesJars; }
private List<String> findExamplesJars() { boolean isTesting = "1".equals(getenv("SPARK_TESTING")); List<String> examplesJars = new ArrayList<>(); String sparkHome = getSparkHome(); File jarsDir; if (new File(sparkHome, "RELEASE").isFile()) { jarsDir = new File(sparkHome, "examples/jars"); } else { jarsDir = new File(sparkHome, String.format("examples/target/scala-%s/jars", getScalaVersion())); } boolean foundDir = jarsDir.isDirectory(); checkState(isTesting || foundDir, "Examples jars directory '%s' does not exist.", jarsDir.getAbsolutePath()); if (foundDir) { for (File f: jarsDir.listFiles()) { examplesJars.add(f.getAbsolutePath()); } } return examplesJars; }
String findSparkSubmit() { String script = isWindows() ? "spark-submit.cmd" : "spark-submit"; return join(File.separator, builder.getSparkHome(), "bin", script); }
String findSparkSubmit() { String script = isWindows() ? "spark-submit.cmd" : "spark-submit"; return join(File.separator, builder.getSparkHome(), "bin", script); }
private ProcessBuilder createBuilder() { List<String> cmd = new ArrayList<>(); String script = isWindows() ? "spark-submit.cmd" : "spark-submit"; cmd.add(join(File.separator, builder.getSparkHome(), "bin", script)); cmd.addAll(builder.buildSparkSubmitArgs());
private ProcessBuilder createBuilder() { List<String> cmd = new ArrayList<>(); String script = isWindows() ? "spark-submit.cmd" : "spark-submit"; cmd.add(join(File.separator, builder.getSparkHome(), "bin", script)); cmd.addAll(builder.buildSparkSubmitArgs());