Package azkaban.util.process

Examples of azkaban.util.process.AzkabanProcess.awaitCompletion()


        ExecutorService executor = Executors.newFixedThreadPool(2);
       
        AzkabanProcess p1 = new AzkabanProcessBuilder("sleep", "10").build();
        runInSeperateThread(executor, p1);
        assertTrue("Soft kill should interrupt sleep.", p1.softKill(5, TimeUnit.SECONDS));
        p1.awaitCompletion();
       
        AzkabanProcess p2 = new AzkabanProcessBuilder("sleep", "10").build();
        runInSeperateThread(executor, p2);
        p2.hardKill();
        p2.awaitCompletion();
View Full Code Here


        p1.awaitCompletion();
       
        AzkabanProcess p2 = new AzkabanProcessBuilder("sleep", "10").build();
        runInSeperateThread(executor, p2);
        p2.hardKill();
        p2.awaitCompletion();
        assertTrue(p2.isComplete());
    }
   
    private Future<Object> runInSeperateThread(final ExecutorService executor, final AzkabanProcess process) throws InterruptedException {
        Future<Object> result = executor.submit(new Callable<Object>() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.