Package uk.org.ogsadai.tuple

Examples of uk.org.ogsadai.tuple.ColumnMetadata


//  +----------+-------+-------------+----------+------+
// 
    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);
View Full Code Here


//  +----------+-------+-------------+----------+------+
// 
    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);
View Full Code Here

    {
        validateOutput(OUTPUT);
        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);
View Full Code Here

    {
        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

      }
    
      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);
View Full Code Here

        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

        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

    }

    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);
View Full Code Here

      if (!metadataSent)
      {
        try{
          mOutput.write(ControlBlock.LIST_BEGIN);
          ColumnMetadata columnMetadata = new SimpleColumnMetadata
          (columnName, TupleTypes._INT, 0, ColumnMetadata.COLUMN_NO_NULLS, 0);
          TupleMetadata tupleMetadata =
            new SimpleTupleMetadata(Collections.singletonList(columnMetadata));
          MetadataWrapper metadataWrapper = new MetadataWrapper(tupleMetadata);
          mOutput.write(metadataWrapper);
View Full Code Here

        {
          String name = (String) block;
         
          try{
              mOutput.write(ControlBlock.LIST_BEGIN);
              ColumnMetadata columnMetadata = new SimpleColumnMetadata
                  (name, type, 0, ColumnMetadata.COLUMN_NO_NULLS, 0);
              TupleMetadata tupleMetadata =
                  new SimpleTupleMetadata(Collections.singletonList(columnMetadata));
              MetadataWrapper metadataWrapper = new MetadataWrapper(tupleMetadata);
              mOutput.write(metadataWrapper);
View Full Code Here

TOP

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

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.