Package com.facebook.hive.orc.OrcTestUtils

Examples of com.facebook.hive.orc.OrcTestUtils.StringStruct


    Writer writer = new WriterImpl(fs, testFilePath, conf, inspector,
        1000000, CompressionKind.NONE, 100, 1000, memory);

    // Write 1000 rows (the first stride)
    for (int i = 0; i < 1000; i ++) {
      writer.addRow(new StringStruct(Integer.toString(i)));
    }

    // Force the writer to enter low memory mode, note since the stride length was set to 1000
    // we're just starting the second stride
    memory.forceEnterLowMemoryMode();

    // Write 500 more rows (a portion of the second stride)
    for (int i = 0; i < 500; i ++) {
      writer.addRow(new StringStruct(Integer.toString(i)));
    }

    writer.close();
    Reader reader = OrcFile.createReader(fs, testFilePath, conf);
    RecordReader rows = reader.rows(null);
View Full Code Here


    Writer writer = new WriterImpl(fs, testFilePath, conf, inspector,
        1000000, CompressionKind.NONE, 100, 1000, memory);

    // Write 1000 rows (the first stride)
    for (int i = 0; i < 1001; i ++) {
      writer.addRow(new StringStruct(Integer.toString(i % 1000)));
    }

    // Force the writer to enter low memory mode, note since the stride length was set to 1000
    // we're just after starting the second stride
    memory.forceEnterLowMemoryMode();

    // Write 499 more rows (a portion of the second stride)
    for (int i = 1; i < 500; i ++) {
      writer.addRow(new StringStruct(Integer.toString(i)));
    }

    writer.close();
    Reader reader = OrcFile.createReader(fs, testFilePath, conf);
    RecordReader rows = reader.rows(null);
View Full Code Here

    Writer writer = new WriterImpl(fs, testFilePath, conf, inspector,
        1000000, CompressionKind.NONE, 100, 10000, memory);

    // Write 500 rows, they wil be directly encoded
    for (int i = 0; i < 1000; i ++) {
      writer.addRow(new StringStruct(Integer.toString(i)));
    }

    // Flush the first stripe
    memory.forceFlushStripe();

    // Write 500 more rows
    for (int i = 0; i < 500; i ++) {
      writer.addRow(new StringStruct(Integer.toString(i)));
    }

    // Force the writer to enter low memory mode
    memory.forceEnterLowMemoryMode();

    // Write 500 more rows
    for (int i = 0; i < 500; i ++) {
      writer.addRow(new StringStruct(Integer.toString(i + 500)));
    }

    writer.close();
    Reader reader = OrcFile.createReader(fs, testFilePath, conf);
    RecordReader rows = reader.rows(null);
View Full Code Here

TOP

Related Classes of com.facebook.hive.orc.OrcTestUtils.StringStruct

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.