Package com.ebay.erl.mobius.core.model

Examples of com.ebay.erl.mobius.core.model.Array


  @Override
  public void consume(Tuple tuple)
  {
    if( this.array==null )
    {
      this.array = new Array(this.delimiter);
    }
    Object value = tuple.get(this.inputColumnName);
   
    byte type = Tuple.getType(value);
    if( type==Tuple.RESULT_WRAPPER_TYPE )
    {
      // result coming from Combiner
      ResultWrapper wrapper = (ResultWrapper)value;
      Array wrapped = (Array)wrapper.getCombinedResult();
      for( Object elem:wrapped )
      {
        array.add(elem);
      }
    }
View Full Code Here


    throws IOException
  {
    // test values that has wrapped results.
    List<Tuple> tuples = new ArrayList<Tuple>();
   
    Array a1 = new Array();
    a1.add(1);
    a1.add(2);
    a1.add(3);   
    Tuple t1 = new Tuple();
    t1.put("C1", new ResultWrapper(a1));   
    tuples.add(t1);
   
    Tuple t2 = new Tuple();
    t2.put("C1", 4);
    tuples.add(t2);
   
    Array a2 = new Array();
    a2.add(5);   
    Tuple t3 = new Tuple();
    t3.put("C1", a2);
    tuples.add(t3);
   
   
View Full Code Here

TOP

Related Classes of com.ebay.erl.mobius.core.model.Array

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.