private static void guardIfWindows(ThrowingConsumer<File, IOException> toRun, File file) throws IOException { if (!OperatingSystem.isWindows()) { toRun.accept(file);
/** * Checks whether the operating system this JVM runs on is FreeBSD. * * @return <code>true</code> if the operating system this JVM runs on is * FreeBSD, <code>false</code> otherwise */ public static boolean isFreeBSD() { return getCurrentOperatingSystem() == FREE_BSD; }
/** * Tests that Yarn will restart a killed {@link YarnSessionClusterEntrypoint} which will then resume * a persisted {@link JobGraph}. */ @Test public void testKillYarnSessionClusterEntrypoint() throws Exception { assumeTrue( "This test kills processes via the pkill command. Thus, it only runs on Linux, Mac OS, Free BSD and Solaris.", OperatingSystem.isLinux() || OperatingSystem.isMac() || OperatingSystem.isFreeBSD() || OperatingSystem.isSolaris()); final YarnClusterDescriptor yarnClusterDescriptor = setupYarnClusterDescriptor(); yarnClusterDescriptor.addShipFiles(Arrays.asList(flinkShadedHadoopDir.listFiles())); final RestClusterClient<ApplicationId> restClusterClient = deploySessionCluster(yarnClusterDescriptor); try { final JobID jobId = submitJob(restClusterClient); final ApplicationId id = restClusterClient.getClusterId(); waitUntilJobIsRunning(restClusterClient, jobId); killApplicationMaster(yarnClusterDescriptor.getYarnSessionClusterEntrypoint()); waitForApplicationAttempt(id, 2); waitForJobTermination(restClusterClient, jobId); killApplicationAndWait(id); } finally { restClusterClient.shutdown(); } }
@Before public void checkOperatingSystem() { // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows()); }
/** * Checks whether the operating system this JVM runs on is Solaris. * * @return <code>true</code> if the operating system this JVM runs on is * Solaris, <code>false</code> otherwise */ public static boolean isSolaris() { return getCurrentOperatingSystem() == SOLARIS; }
@Before public void checkOperatingSystem() { // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows()); }
/** * Checks whether the operating system this JVM runs on is Windows. * * @return <code>true</code> if the operating system this JVM runs on is * Windows, <code>false</code> otherwise */ public static boolean isMac() { return getCurrentOperatingSystem() == MAC_OS; }
@Before public void checkOperatingSystem() { // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows()); }
/** * Checks whether the operating system this JVM runs on is Windows. * * @return <code>true</code> if the operating system this JVM runs on is * Windows, <code>false</code> otherwise */ public static boolean isWindows() { return getCurrentOperatingSystem() == WINDOWS; }
@Before public void checkOperatingSystem() { // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows()); }
/** * Checks whether the operating system this JVM runs on is Linux. * * @return <code>true</code> if the operating system this JVM runs on is * Linux, <code>false</code> otherwise */ public static boolean isLinux() { return getCurrentOperatingSystem() == LINUX; }
@Before public void checkOperatingSystem() { // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows()); }
/** * Checks whether the operating system this JVM runs on is Windows. * * @return <code>true</code> if the operating system this JVM runs on is * Windows, <code>false</code> otherwise */ public static boolean isMac() { return getCurrentOperatingSystem() == MAC_OS; }
@BeforeClass public static void checkOS() { Assume.assumeFalse("This test fails on Windows due to unclosed JarFiles, see FLINK-9844.", OperatingSystem.isWindows()); }
/** * Checks whether the operating system this JVM runs on is Linux. * * @return <code>true</code> if the operating system this JVM runs on is * Linux, <code>false</code> otherwise */ public static boolean isLinux() { return getCurrentOperatingSystem() == LINUX; }
@BeforeClass public static void checkOS() { Assume.assumeTrue(!OperatingSystem.isWindows()); }
/** * Checks whether the operating system this JVM runs on is Windows. * * @return <code>true</code> if the operating system this JVM runs on is * Windows, <code>false</code> otherwise */ public static boolean isMac() { return getCurrentOperatingSystem() == MAC_OS; }
@BeforeClass public static void verifyOS() { Assume.assumeTrue("HDFS cluster cannot be started on Windows without extensions.", !OperatingSystem.isWindows()); }
/** * Checks whether the operating system this JVM runs on is Windows. * * @return <code>true</code> if the operating system this JVM runs on is * Windows, <code>false</code> otherwise */ public static boolean isWindows() { return getCurrentOperatingSystem() == WINDOWS; }
@BeforeClass public static void verifyOS() { Assume.assumeTrue("HDFS cluster cannot be started on Windows without extensions.", !OperatingSystem.isWindows()); }