Examples of monitorExec()


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

    @Test
    public void testTimeout() throws IOException {

        SimpleUDF udf = new SimpleUDF(1000);
        MonitoredUDFExecutor exec = new MonitoredUDFExecutor(udf);
        assertNull(exec.monitorExec(null));
    }

    @Test
    public void testTimeoutWithDefault() throws IOException {
View Full Code Here

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

    @Test
    public void testTimeoutWithDefault() throws IOException {

        SimpleIntUDF udf = new SimpleIntUDF();
        MonitoredUDFExecutor exec = new MonitoredUDFExecutor(udf);
        assertEquals( SimpleIntUDF.DEFAULT, ((Integer) exec.monitorExec(null)).intValue());
    }

    @Test
    public void testCustomErrorHandler() throws IOException {
View Full Code Here

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

    @Test
    public void testCustomErrorHandler() throws IOException {

        ErrorCallbackUDF udf = new ErrorCallbackUDF();
        MonitoredUDFExecutor exec = new MonitoredUDFExecutor(udf);
        exec.monitorExec(null);
        assertTrue(thereWasATimeout);
    }

    @Test
    public void testNoTimeout() throws IOException {
View Full Code Here

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

    public static void main(String[] args) throws IOException {
        long startTime = System.currentTimeMillis();
        long unmonitoredTime = 0, monitoredTime = 0;
View Full Code Here

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

        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

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

        // 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

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

    @Test
    public void testTimeout() throws IOException {

        SimpleUDF udf = new SimpleUDF(1000);
        MonitoredUDFExecutor exec = new MonitoredUDFExecutor(udf);
        assertNull(exec.monitorExec(null));
    }

    @Test
    public void testTimeoutWithDefault() throws IOException {
View Full Code Here

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

    @Test
    public void testTimeoutWithDefault() throws IOException {

        SimpleIntUDF udf = new SimpleIntUDF();
        MonitoredUDFExecutor exec = new MonitoredUDFExecutor(udf);
        assertEquals( SimpleIntUDF.DEFAULT, ((Integer) exec.monitorExec(null)).intValue());
    }

    @Test
    public void testInheritance() throws IOException {
        InheritedUdf udf = new InheritedUdf();
View Full Code Here

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

    @Test
    public void testInheritance() throws IOException {
        InheritedUdf udf = new InheritedUdf();
        MonitoredUDFExecutor exec = new MonitoredUDFExecutor(udf);
        assertEquals( SimpleIntUDF.DEFAULT, ((Integer) exec.monitorExec(null)).intValue());
    }

    @Test
    public void testCustomErrorHandler() throws IOException {
View Full Code Here

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

    @Test
    public void testCustomErrorHandler() throws IOException {

        ErrorCallbackUDF udf = new ErrorCallbackUDF();
        MonitoredUDFExecutor exec = new MonitoredUDFExecutor(udf);
        exec.monitorExec(null);
        assertTrue(thereWasATimeout);
    }

    @Test
    public void testNoTimeout() throws IOException {
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.