Package org.apache.pig.backend.hadoop.executionengine.physicalLayer.util

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.util.MonitoredUDFExecutor.monitorExec()


    @Test
    public void testNoTimeout() throws IOException {
        SimpleUDF udf = new SimpleUDF(100);
        MonitoredUDFExecutor exec = new MonitoredUDFExecutor(udf);
        assertTrue((Boolean) exec.monitorExec(null));
    }

    /**
     * This main method runs a microbenchmark for measuring overhead caused by
     * annotating a UDF as monitored.
View Full Code Here


        UnmonitoredNoOpUDF unmonitoredUdf = new UnmonitoredNoOpUDF();
        // warm up
        System.out.println("Warming up.");
        for (int i : numReps) {
            for (int j=0; j < i; j++) {
                exec.monitorExec(null);
                unmonitoredUdf.exec(null);
            }
        }
        System.out.println("Warmed up. Timing.");
        // tests!
View Full Code Here

        // tests!
        for (int k = 0; k < 5; k++) {
            for (int i : numReps) {
                startTime = System.currentTimeMillis();
                for (int j = 0; j < i; j++) {
                    exec.monitorExec(null);
                }
                monitoredTime = System.currentTimeMillis() - startTime;
                startTime = System.currentTimeMillis();
                for (int j = 0; j < i; j++) {
                    unmonitoredUdf.exec(null);
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.