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; }