Examples of HowlRecord


Examples of org.apache.howl.data.HowlRecord

      bytesWritable.set(i, cu);
    }

    //Convert byte array to HowlRecord using isd, convert howlrecord back to byte array
    //using osd, compare the two arrays
    HowlRecord record = isd.convertToHowlRecord(null, bytesWritable);

    HowlOutputStorageDriver osd = new RCFileOutputDriver();

    osd.setSchema(jc, schema);
    osd.initialize(jc, new Properties());
View Full Code Here

Examples of org.apache.howl.data.HowlRecord

    HowlRecord[] tuples = getExpectedRecords();
    for(int j=0; j < 2; j++){
      Assert.assertTrue(rr.nextKeyValue());
      BytesRefArrayWritable w = (BytesRefArrayWritable)rr.getCurrentValue();
      Assert.assertEquals(bytesArr[j], w);
      HowlRecord t = sd.convertToHowlRecord(null,w);
      Assert.assertEquals(8, t.size());
      Assert.assertEquals(t,tuples[j]);
    }
  }
View Full Code Here

Examples of org.apache.howl.data.HowlRecord

    for(int j=0; j < 2; j++){
      Assert.assertTrue(rr.nextKeyValue());
      BytesRefArrayWritable w = (BytesRefArrayWritable)rr.getCurrentValue();
      Assert.assertFalse(bytesArr[j].equals(w));
      Assert.assertEquals(w.size(), 8);
      HowlRecord t = sd.convertToHowlRecord(null,w);
      Assert.assertEquals(5, t.size());
      Assert.assertEquals(t,tuples[j]);
    }
    assertFalse(rr.nextKeyValue());
  }
View Full Code Here

Examples of org.apache.howl.data.HowlRecord

    for(int j=0; j < 2; j++){
      Assert.assertTrue(rr.nextKeyValue());
      BytesRefArrayWritable w = (BytesRefArrayWritable)rr.getCurrentValue();
      Assert.assertFalse(bytesArr[j].equals(w));
      Assert.assertEquals(w.size(), 8);
      HowlRecord t = sd.convertToHowlRecord(null,w);
      Assert.assertEquals(7, t.size());
      Assert.assertEquals(t,tuples[j]);
    }
    assertFalse(rr.nextKeyValue());
  }
View Full Code Here

Examples of org.apache.howl.data.HowlRecord

    rec_1.add( new Double(5.3D));
    rec_1.add( new String("howl and hadoop"));
    rec_1.add( null);
    rec_1.add( null);

    HowlRecord tup_1 = new DefaultHowlRecord(rec_1);

    List<Object> rec_2 = new ArrayList<Object>(8);
    rec_2.add( new Byte("100"));
    rec_2.add( new Short("200"));
    rec_2.add( new Integer(123));
    rec_2.add( new Long(1000L));
    rec_2.add( new Double(5.3D));
    rec_2.add( new String("howl and hadoop"));
    rec_2.add( null);
    rec_2.add( null);
    HowlRecord tup_2 = new DefaultHowlRecord(rec_2);

    return  new HowlRecord[]{tup_1,tup_2};

  }
View Full Code Here

Examples of org.apache.howl.data.HowlRecord

    rec_1.add(new Byte("123"));
    rec_1.add( new Integer(789));
    rec_1.add( new Double(5.3D));
    rec_1.add( new String("howl and hadoop"));
    rec_1.add( null);
    HowlRecord tup_1 = new DefaultHowlRecord(rec_1);

    List<Object> rec_2 = new ArrayList<Object>(8);
    rec_2.add( new Byte("100"));
    rec_2.add( new Integer(123));
    rec_2.add( new Double(5.3D));
    rec_2.add( new String("howl and hadoop"));
    rec_2.add( null);
    HowlRecord tup_2 = new DefaultHowlRecord(rec_2);

    return  new HowlRecord[]{tup_1,tup_2};

  }
View Full Code Here

Examples of org.apache.howl.data.HowlRecord

    rec_1.add( new Double(5.3D));
    rec_1.add( null); // new column
    rec_1.add( new String("howl and hadoop"));
    rec_1.add( new Byte("123"));
    rec_1.add( null);
    HowlRecord tup_1 = new DefaultHowlRecord(rec_1);

    List<Object> rec_2 = new ArrayList<Object>(7);

    rec_2.add( new Integer(123));
    rec_2.add( new String("first-part"));
    rec_2.add( new Double(5.3D));
    rec_2.add(null);
    rec_2.add( new String("howl and hadoop"));
    rec_2.add( new Byte("100"));
    rec_2.add( null);
    HowlRecord tup_2 = new DefaultHowlRecord(rec_2);

    return  new HowlRecord[]{tup_1,tup_2};

  }
View Full Code Here

Examples of org.apache.howl.data.HowlRecord

    @Override
    public void map(LongWritable key, Text value, Context context
    ) throws IOException, InterruptedException {
      {
        try {
          HowlRecord rec = writeRecords.get(writeCount);
          context.write(null, rec);
          writeCount++;

        }catch(Exception e) {
View Full Code Here

Examples of org.apache.howl.data.HowlRecord

  }

  @Override
  public Tuple getNext() throws IOException {
    try {
      HowlRecord hr =  (HowlRecord) (reader.nextKeyValue() ? reader.getCurrentValue() : null);
      Tuple t = PigHowlUtil.transformToTuple(hr,outputSchema);
      // TODO : we were discussing an iter interface, and also a LazyTuple
      // change this when plans for that solidifies.
      return t;
    } catch (ExecException e) {
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.