Package uk.org.ogsadai.tuple

Examples of uk.org.ogsadai.tuple.SimpleTuple


        if ((block = inputs[0].read()) != ControlBlock.NO_MORE_DATA)
        {
          Object data = block;
            List elements = new ArrayList();
            elements.add(data);
            Tuple tuple = new SimpleTuple(elements);
            try{
              mOutput.write(tuple);
            } catch (PipeClosedException e)
            {
                iterativeStageComplete();
View Full Code Here


                {
                    value = Null.VALUE;
                }
                elements.add(value);
            }
            SimpleTuple tuple = new SimpleTuple(elements);
            output.writeTuple(tuple);
        }
        output.close();
        ProcessingElement bytesToTuple =
            new ProcessingElement(TUPLE_DESERIALISER);
View Full Code Here

        mOutput.write(ControlBlock.LIST_BEGIN);
        mOutput.write(prepareMetadata(dataTuples));
        while((tuple = (Tuple)dataTuples.nextValue()) != null) {
          ArrayList<String> list = new ArrayList<String>();
          list.add(getBinName(tuple, binNames, aggregates));
          mOutput.write(new SimpleTuple(list));
        }
        mOutput.write(ControlBlock.LIST_END);
        mOutput.toString();
      }
View Full Code Here

               
                Object result = classify(classifiers, tuple);
               
                LOG.debug("Classified " + tuple + " : " + result);
                List<?> elements = Collections.singletonList(result);
                Tuple out = new SimpleTuple(elements);
                mOutput.write(out);
            }
            mOutput.write(ControlBlock.LIST_END);
           
           
View Full Code Here

                }
                LOG.debug("Classified " + tuple + " : result = " + result);
                List<?> elements = Collections.singletonList(result);
               

                Tuple out = new SimpleTuple(elements);
                mOutput.write(out);
            }
            mOutput.write(ControlBlock.LIST_END);
        }
        catch (PipeClosedException e)
View Full Code Here

        for (Entry<Integer, String[]> entry:set)
        {
            List<Object> elements = new ArrayList<Object>();
            for(int i=0;i<entry.getValue().length;i++)
              elements.add(entry.getValue()[i]);
            mOutput.write(new SimpleTuple(elements));
        }   
   
    mOutput.write(ControlBlock.LIST_END);
    iterativeStageComplete();
    }
View Full Code Here

                    else
                    {
                        elements.add(count);
                    }
                }
                Tuple tuple = new SimpleTuple(elements);
                mOutput.write(tuple);
            }
            mOutput.write(ControlBlock.LIST_END);
       
        }
View Full Code Here

           
           
           
            mResultOutput.write(new MetadataWrapper(outMetadata));
            for(List<Object> v:values) {
              Tuple t = new SimpleTuple(v);
              mResultOutput.write(t);
            }
            mResultOutput.write(ControlBlock.LIST_END);
            iterativeStageComplete();
    }
View Full Code Here

         
            newNumber = prevNumber + random.nextInt(maxStep) + 1;
            prevNumber = newNumber;
              List<Object> values = new ArrayList<Object>();
              values.add(newNumber);
            mNumbersOutput.write(new SimpleTuple(values));

          }

            mNumbersOutput.write(ControlBlock.LIST_END);
            mExpressionOutput.write(baseQuery.replaceFirst("\\?",tableName));
View Full Code Here

          output.write(new MetadataWrapper(new SimpleTupleMetadata(listColumnMetadata)));

          for(int i=0;i<numberTuples;i++){
                    // Create the tuple tuple consisting of the above data
                    // and the metadata.
                    Tuple tuple = new SimpleTuple(data);
                    output.write(tuple);
          }
          output.write(ControlBlock.LIST_END);
         
        } catch (PipeClosedException e) {
View Full Code Here

TOP

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

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.