Package com.cloudera.flume.handlers.avro

Examples of com.cloudera.flume.handlers.avro.AvroJsonOutputFormat.format()


    snk.append(e);
    snk.close();

    ByteArrayOutputStream exWriter = new ByteArrayOutputStream();
    AvroJsonOutputFormat ajof = new AvroJsonOutputFormat();
    ajof.format(exWriter, e);
    exWriter.close();
    String expected = new String(exWriter.toByteArray());

    // check the output to make sure it is what we expected.
    File fo = new File(f.getPath() + "/sub-foo");
View Full Code Here


  @Test
  public void testAvroJson() throws IOException {
    OutputFormat format = new AvroJsonOutputFormat();
    ByteArrayOutputStream sos = new ByteArrayOutputStream();
    format.format(sos, e);
    String s = new String(sos.toByteArray());
    System.out.print(s);
    // TODO (jon) not sure if this will pass on every machine the same (how does
    // avro order fields?)
    Assert.assertEquals(s, "{\"body\":\"test\",\"timestamp\":0,"
View Full Code Here

    snk.append(e);
    snk.close();

    ByteArrayOutputStream exWriter = new ByteArrayOutputStream();
    AvroJsonOutputFormat ajof = new AvroJsonOutputFormat();
    ajof.format(exWriter, e);
    exWriter.close();
    String expected = new String(exWriter.toByteArray());

    // check the output to make sure it is what we expected.
    File fo = new File(f.getPath() + "/sub-foo");
View Full Code Here

  @Test
  public void testAvroJson() throws IOException {
    OutputFormat format = new AvroJsonOutputFormat();
    ByteArrayOutputStream sos = new ByteArrayOutputStream();
    format.format(sos, e);
    String s = new String(sos.toByteArray());
    System.out.print(s);
    // TODO (jon) not sure if this will pass on every machine the same (how does
    // avro order fields?)
    Assert.assertEquals(s, "{\"body\":\"test\",\"timestamp\":0,"
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.