Package uk.org.ogsadai.tuple

Examples of uk.org.ogsadai.tuple.TupleMetadata


        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
        ColumnMetadata column = new SimpleColumnMetadata("class", TupleTypes._DOUBLE, 0, 0, 0);
        columns.add(column);
        column = new SimpleColumnMetadata("attribute", TupleTypes._INT, 0, 0, 0);
        columns.add(column);
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        List<Object> table = new ArrayList<Object>();
        table.add(ControlBlock.LIST_BEGIN);
        table.add(new MetadataWrapper(metadata));
        table.add(new SimpleTuple(Arrays.asList(2, 3)));
        table.add(new SimpleTuple(Arrays.asList(2, 4)));
View Full Code Here


        columns.add(column);
        column = new SimpleColumnMetadata("humidity", TupleTypes._INT, 0, 0, 0);
        columns.add(column);
        column = new SimpleColumnMetadata("play", TupleTypes._STRING, 0, 0, 0);
        columns.add(column);
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
     
        List<Object> result = new ArrayList<Object>();
     
        result.add(ControlBlock.LIST_BEGIN);
        result.add(new MetadataWrapper(metadata));
View Full Code Here

        columns.add(column);
        column = new SimpleColumnMetadata("humidity", TupleTypes._INT, 0, 0, 0);
        columns.add(column);
        column = new SimpleColumnMetadata("play", TupleTypes._STRING, 0, 0, 0);
        columns.add(column);
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
     
        List<Object> result = new ArrayList<Object>();
     
        result.add(ControlBlock.LIST_BEGIN);
        result.add(new MetadataWrapper(metadata));
View Full Code Here

    {
        GroupByActivity activity = new GroupByActivity();
        List<ColumnMetadata> cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("A", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("B", TupleTypes._INT, 0, 0, 11));
        TupleMetadata metadata = new SimpleTupleMetadata(cdlist);
        TestBlockReader dataInput = new TestBlockReader(10000);
        dataInput.setTupleFactory(new GroupTupleFactory());
        dataInput.setTupleMetadata(metadata);
        activity.addInput(GroupByActivity.INPUT_DATA, dataInput);
        MockInputPipe columnsInput = new MockInputPipe(new Object[] {
View Full Code Here

        mOutput = getOutput();
        try{
            mOutput.write(ControlBlock.LIST_BEGIN);
            ColumnMetadata columnMetadata = new SimpleColumnMetadata
                ("", TupleTypes._STRING, 0, ColumnMetadata.COLUMN_NO_NULLS, 0);
            TupleMetadata tupleMetadata =
                new SimpleTupleMetadata(Collections.singletonList(columnMetadata));
            MetadataWrapper metadataWrapper = new MetadataWrapper(tupleMetadata);
            mOutput.write(metadataWrapper);
        }
            catch (PipeClosedException e)
View Full Code Here

        final int TUPLE_COUNT = 20000;
        List<ColumnMetadata> cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("A", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("B", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("C", TupleTypes._INT, 0, 0, 11));
        TupleMetadata metadata = new SimpleTupleMetadata(cdlist);
        TestBlockReader input = new TestBlockReader(TUPLE_COUNT);
        input.setTupleFactory(new SimpleTupleFactory());
        input.setTupleMetadata(metadata);
        SortActivity activity = new SortActivity();
        activity.addInput("data", input);
View Full Code Here

        final int TUPLE_COUNT = 20000;
        List<ColumnMetadata> cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("A", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("B", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("C", TupleTypes._INT, 0, 0, 11));
        TupleMetadata metadata = new SimpleTupleMetadata(cdlist);
        TestBlockReader input = new TestBlockReader(TUPLE_COUNT);
        input.setTupleFactory(new SimpleTupleFactory());
        input.setTupleMetadata(metadata);
        SortActivity activity = new SortActivity();
        activity.addInput("data", input);
View Full Code Here

        final int TUPLE_COUNT = 20000;
        List<ColumnMetadata> cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("A", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("B", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("C", TupleTypes._INT, 0, 0, 11));
        TupleMetadata metadata = new SimpleTupleMetadata(cdlist);
        TestBlockReader input = new TestBlockReader(TUPLE_COUNT);
        input.setTupleFactory(new SimpleTupleFactory());
        input.setTupleMetadata(metadata);
        SortActivity activity = new SortActivity();
        activity.addInput("data", input);
View Full Code Here

        final int TUPLE_COUNT = 20000;
        List<ColumnMetadata> cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("A", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("B", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("C", TupleTypes._INT, 0, 0, 11));
        TupleMetadata metadata = new SimpleTupleMetadata(cdlist);
        TestBlockReader input = new TestBlockReader(TUPLE_COUNT);
        input.setTupleFactory(new SimpleTupleFactory());
        input.setTupleMetadata(metadata);
        SortActivity activity = new SortActivity();
        activity.addInput("data", input);
View Full Code Here

          columns.add(column);
          column = new SimpleColumnMetadata("humidity", TupleTypes._INT, 0, 0, 0);
          columns.add(column);
          column = new SimpleColumnMetadata("play", TupleTypes._STRING, 0, 0, 0);
          columns.add(column);
          TupleMetadata metadata = new SimpleTupleMetadata(columns);
       
          List<Object> result = new ArrayList<Object>();
       
          result.add(ControlBlock.LIST_BEGIN);
          result.add(new MetadataWrapper(metadata));
View Full Code Here

TOP

Related Classes of uk.org.ogsadai.tuple.TupleMetadata

Copyright © 2018 www.massapicom. 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.