Examples of SimpleColumnMetadata


Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

    public void testMissingListInColumnsInput() throws Exception
    {
        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();
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

   
    public void testWrongTypeColumnsInput() throws Exception
    {
        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();
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

    {
        int columnCount = outputTuple.getColumnCount();
        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>(columnCount);
        for (int i=0; i<columnCount; i++)
        {
            ColumnMetadata col = new SimpleColumnMetadata("", TupleTypes._DOUBLE, 0,0,0);
            columns.add(col);
        }
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        return new MetadataWrapper(metadata);
      
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

      }
    
      private List<Object> buildInputTable()
      {
          List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
          ColumnMetadata column = new SimpleColumnMetadata("outlook", TupleTypes._STRING, 0, 0, 0);
          columns.add(column);
          column = new SimpleColumnMetadata("windy", TupleTypes._STRING, 0, 0, 0);
          columns.add(column);
          column = new SimpleColumnMetadata("temperature", TupleTypes._INT, 0, 0, 0);
          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>();
       
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

        super.tearDown();
    }
   
    public void testSimple() throws Exception
    {
        ColumnMetadata col = new SimpleColumnMetadata("class", TupleTypes._STRING, 0,0,0);
        TupleMetadata metadata = new SimpleTupleMetadata(Collections.singletonList(col));
        MockInputPipe inputExpected = new MockInputPipe(new Object[] {
            ControlBlock.LIST_BEGIN,
            new MetadataWrapper(metadata),
            new SimpleTuple(Arrays.asList("yes")),
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

        assertEquals(1, tuple3.getLong(3));
    }

    public void testUnmatched() throws Exception
    {
        ColumnMetadata col = new SimpleColumnMetadata("class", TupleTypes._STRING, 0,0,0);
        TupleMetadata metadata = new SimpleTupleMetadata(Collections.singletonList(col));
        MockInputPipe inputExpected = new MockInputPipe(new Object[] {
            ControlBlock.LIST_BEGIN,
            new MetadataWrapper(metadata),
            new SimpleTuple(Arrays.asList("yes")),
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

    }
   
    public void testSimple() throws Exception
    {
        List<ColumnMetadata> cdlist = new ArrayList<ColumnMetadata>();
        cdlist.add(new SimpleColumnMetadata("ID", TupleTypes._INT, 0, 0, 11));
        cdlist.add(new SimpleColumnMetadata("ITEMS", TupleTypes._OBJECT, 0, 0, 11));
        SimpleTupleMetadata metadata = new SimpleTupleMetadata(cdlist);
       
        Vector v1 = new Vector();
        v1.add("30");
        v1.add("90");
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

   
    public void testSimple() throws Exception
    {
        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);
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

    }

    public TupleMetadata getMetadata()
    {
        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
        ColumnMetadata col = new SimpleColumnMetadata("A", TupleTypes._DOUBLE, 0,0,0);
        columns.add(col);
        col = new SimpleColumnMetadata("B", TupleTypes._DOUBLE, 0,0,0);
        columns.add(col);
        col = new SimpleColumnMetadata("C", TupleTypes._DOUBLE, 0,0,0);
        columns.add(col);
        col = new SimpleColumnMetadata("D", TupleTypes._DOUBLE, 0,0,0);
        columns.add(col);
        col = new SimpleColumnMetadata("E", TupleTypes._DOUBLE, 0,0,0);
        columns.add(col);
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        return metadata;
    }
View Full Code Here

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata

            Iterator<String> it1 = resultvars.listIterator();
            List<ColumnMetadata> listColumnMetadata = new ArrayList<ColumnMetadata>();
            while (it1.hasNext())
            {
                String var = (String) it1.next();
                listColumnMetadata.add(new SimpleColumnMetadata(var,
                        TupleTypes._STRING, 100, ColumnMetadata.COLUMN_NULLABLE,
                        10000));
            }

            output.write(new MetadataWrapper(new SimpleTupleMetadata(
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.