Examples of DataCollector


Examples of org.apache.pig.impl.eval.collector.DataCollector

                                   StreamingCommand command,
                                   DataCollector endOfPipe) {
            super(endOfPipe);
            this.executableManager = executableManager;

            DataCollector successor =
                new DataCollector(endOfPipe) {
                public void add(Datum d) {
                    // Just forward the data to the next EvalSpec in the pipeline
                    addToSuccessor(d);
                }
            };
View Full Code Here

Examples of org.apache.pig.impl.eval.collector.DataCollector

    }
   
    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe){
            LinkedList<CrossProductItem> pendingCrossProducts = new LinkedList<CrossProductItem>();
           
            @Override
            public void add(Datum d) {
               
View Full Code Here

Examples of org.apache.pig.impl.eval.collector.DataCollector

    }
   
    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe) {

            @Override
            public void add(Datum d){
                if (checkDelimiter(d))
                    addToSuccessor(d);
View Full Code Here

Examples of org.apache.pig.impl.eval.collector.DataCollector

public abstract class SimpleEvalSpec extends EvalSpec {

    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe){
            @Override
            public void add(Datum d) {
                if (checkDelimiter(d))
                    addToSuccessor(d);
                else
View Full Code Here

Examples of org.apache.pig.impl.eval.collector.DataCollector

    }
   
    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe){
            @Override
            public void add(Datum d) {
                if (cond.eval(d)){
                    addToSuccessor(ifTrue.simpleEval(d));
                }else{
View Full Code Here

Examples of org.apache.pig.impl.eval.collector.DataCollector

    }

    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe){
            private Datum getPlaceHolderForFuncOutput(){
                Type returnType = func.getReturnType();
                if (returnType == DataAtom.class)
                    return new DataAtom();
                else if (returnType == Tuple.class)
View Full Code Here

Examples of org.apache.pig.impl.eval.collector.DataCollector

    }
   
    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe) {

            @Override
            public void add(Datum d){
               
                boolean changed = false;
View Full Code Here

Examples of org.apache.pig.impl.eval.collector.DataCollector

    }
   
    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe) {

            @Override
            public void add(Datum d) {
                if (d!=null){
               
View Full Code Here

Examples of org.lightfish.business.servermonitoring.control.collectors.DataCollector

        when(action.dataCollectionRetries.get()).thenReturn(1);
    }

    @Test
    public void action_all_good() throws Exception {
        DataCollector collector = mock(DataCollector.class);
        DataPoint expectedResult = mock(DataPoint.class);
        when(collector.collect()).thenReturn(expectedResult);
        Future compute = action.compute(collector);
        assertEquals(expectedResult, compute.get());
    }
View Full Code Here

Examples of org.lightfish.business.servermonitoring.control.collectors.DataCollector

        assertEquals(expectedResult, compute.get());
    }

    @Test
    public void action_with_retry() throws Exception {
        DataCollector collector = mock(DataCollector.class);
        DataPoint expectedResult = mock(DataPoint.class);
        when(collector.collect())
                .thenThrow(new Exception("Ahh!!"))
                .thenReturn(expectedResult);
        Future compute = action.compute(collector);
        assertEquals(expectedResult, compute.get());
    }
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.