Package org.elasticsearch.hadoop.util

Examples of org.elasticsearch.hadoop.util.FastByteArrayInputStream


    DataOutputStream da = new DataOutputStream(out);
    written.write(da);
    da.close();
   
    LinkedMapWritable read = new LinkedMapWritable();
    read.readFields(new DataInputStream(new FastByteArrayInputStream(out.bytes())));
    assertThat(read.size(), is(written.size()));
    assertThat(read.toString(), is(written.toString()));
  }
View Full Code Here


        Assert.notNull(content);

        if (log.isTraceEnabled()) {
            //copy content
            BytesArray copy = IOUtils.asBytes(content);
            content = new FastByteArrayInputStream(copy);
            log.trace("About to parse scroll content " + copy);
        }

        this.parser = new JacksonJsonParser(content);
View Full Code Here

    private Parser parser;

    @Before
    public void before() throws Exception {
        InputStream in = new FastByteArrayInputStream(IOUtils.asBytes(getClass().getResourceAsStream("parser-test-nested.json")));
        parser = new JacksonJsonParser(in);
    }
View Full Code Here

        Assert.notNull(content);

        if (log.isTraceEnabled()) {
            //copy content
            BytesArray copy = IOUtils.asBytes(content);
            content = new FastByteArrayInputStream(copy);
            log.trace("About to parse scroll content " + copy);
        }

        this.parser = new JacksonJsonParser(content);
View Full Code Here

TOP

Related Classes of org.elasticsearch.hadoop.util.FastByteArrayInputStream

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.