Package org.apache.accumulo.core.file.rfile.MultiLevelIndex

Examples of org.apache.accumulo.core.file.rfile.MultiLevelIndex.BufferedWriter


  private void runTest(int maxBlockSize, int num) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    FSDataOutputStream dos = new FSDataOutputStream(baos, new FileSystem.Statistics("a"));
    CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(dos, "gz", CachedConfiguration.getInstance());
   
    BufferedWriter mliw = new BufferedWriter(new Writer(_cbw, maxBlockSize));
   
    for (int i = 0; i < num; i++)
      mliw.add(new Key(String.format("%05d000", i)), i, 0, 0, 0);
   
    mliw.addLast(new Key(String.format("%05d000", num)), num, 0, 0, 0);
   
    ABlockWriter root = _cbw.prepareMetaBlock("root");
    mliw.close(root);
    root.close();
   
    _cbw.close();
    dos.close();
    baos.close();
View Full Code Here


  private void runTest(int maxBlockSize, int num) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    FSDataOutputStream dos = new FSDataOutputStream(baos, new FileSystem.Statistics("a"));
    CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(dos, "gz", CachedConfiguration.getInstance());
   
    BufferedWriter mliw = new BufferedWriter(new Writer(_cbw, maxBlockSize));
   
    for (int i = 0; i < num; i++)
      mliw.add(new Key(String.format("%05d000", i)), i, 0, 0, 0);
   
    mliw.addLast(new Key(String.format("%05d000", num)), num, 0, 0, 0);
   
    ABlockWriter root = _cbw.prepareMetaBlock("root");
    mliw.close(root);
    root.close();
   
    _cbw.close();
    dos.close();
    baos.close();
View Full Code Here

    AccumuloConfiguration aconf = AccumuloConfiguration.getDefaultConfiguration();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    FSDataOutputStream dos = new FSDataOutputStream(baos, new FileSystem.Statistics("a"));
    CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(dos, "gz", CachedConfiguration.getInstance(), aconf);
   
    BufferedWriter mliw = new BufferedWriter(new Writer(_cbw, maxBlockSize));
   
    for (int i = 0; i < num; i++)
      mliw.add(new Key(String.format("%05d000", i)), i, 0, 0, 0);
   
    mliw.addLast(new Key(String.format("%05d000", num)), num, 0, 0, 0);
   
    ABlockWriter root = _cbw.prepareMetaBlock("root");
    mliw.close(root);
    root.close();
   
    _cbw.close();
    dos.close();
    baos.close();
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.file.rfile.MultiLevelIndex.BufferedWriter

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.