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

Examples of org.apache.accumulo.core.file.rfile.RFile.Writer


   
    long blockSize = acuconf.getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE);
    long indexBlockSize = acuconf.getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE_INDEX);
   
    CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(fs.create(new Path(file), false, bufferSize, (short) rep, block), compression, conf);
    Writer writer = new RFile.Writer(_cbw, (int) blockSize, (int) indexBlockSize);
    return writer;
  }
View Full Code Here


      }
      String smallName = file.substring(0, file.length() - 3) + "_small.rf";
      String largeName = file.substring(0, file.length() - 3) + "_large.rf";
     
      int blockSize = (int) DefaultConfiguration.getDefaultConfiguration().getMemoryInBytes(Property.TABLE_FILE_BLOCK_SIZE);
      Writer small = new RFile.Writer(new CachableBlockFile.Writer(fs, new Path(smallName), "gz", conf), blockSize);
      small.startDefaultLocalityGroup();
      Writer large = new RFile.Writer(new CachableBlockFile.Writer(fs, new Path(largeName), "gz", conf), blockSize);
      large.startDefaultLocalityGroup();

      iter.seek(new Range(), new ArrayList<ByteSequence>(), false);
      while (iter.hasTop()) {
        Key key = iter.getTopKey();
        Value value = iter.getTopValue();
        if (key.getSize() + value.getSize() < maxSize) {
          small.append(key, value);
        } else {
          large.append(key, value);
        }
        iter.next();
      }

      iter.close();
      large.close();
      small.close();
    }
  }
View Full Code Here

      }
      String smallName = arg.substring(0, arg.length() - 3) + "_small.rf";
      String largeName = arg.substring(0, arg.length() - 3) + "_large.rf";
     
      int blockSize = (int) DefaultConfiguration.getDefaultConfiguration().getMemoryInBytes(Property.TABLE_FILE_BLOCK_SIZE);
      Writer small = new RFile.Writer(new CachableBlockFile.Writer(fs, new Path(smallName), "gz", conf), blockSize);
      small.startDefaultLocalityGroup();
      Writer large = new RFile.Writer(new CachableBlockFile.Writer(fs, new Path(largeName), "gz", conf), blockSize);
      large.startDefaultLocalityGroup();

      iter.seek(new Range(), new ArrayList<ByteSequence>(), false);
      while (iter.hasTop()) {
        Key key = iter.getTopKey();
        Value value = iter.getTopValue();
        if (key.getSize() + value.getSize() < maxSize) {
          small.append(key, value);
        } else {
          large.append(key, value);
        }
        iter.next();
      }

      iter.close();
      large.close();
      small.close();
    }
  }
View Full Code Here

    long indexBlockSize = acuconf.getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE_INDEX);
   
    String compression = acuconf.get(Property.TABLE_FILE_COMPRESSION_TYPE);
   
    CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(fs.create(new Path(file), false, bufferSize, (short) rep, block), compression, conf);
    Writer writer = new RFile.Writer(_cbw, (int) blockSize, (int) indexBlockSize);
    return writer;
  }
View Full Code Here

   
    long blockSize = acuconf.getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE);
    long indexBlockSize = acuconf.getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE_INDEX);
   
    CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(fs.create(new Path(file), false, bufferSize, (short) rep, block), compression, conf, acuconf);
    Writer writer = new RFile.Writer(_cbw, (int) blockSize, (int) indexBlockSize);
    return writer;
  }
View Full Code Here

      }
      String smallName = file.substring(0, file.length() - 3) + "_small.rf";
      String largeName = file.substring(0, file.length() - 3) + "_large.rf";
     
      int blockSize = (int) aconf.getMemoryInBytes(Property.TABLE_FILE_BLOCK_SIZE);
      Writer small = new RFile.Writer(new CachableBlockFile.Writer(fs, new Path(smallName), "gz", conf, aconf), blockSize);
      small.startDefaultLocalityGroup();
      Writer large = new RFile.Writer(new CachableBlockFile.Writer(fs, new Path(largeName), "gz", conf, aconf), blockSize);
      large.startDefaultLocalityGroup();

      iter.seek(new Range(), new ArrayList<ByteSequence>(), false);
      while (iter.hasTop()) {
        Key key = iter.getTopKey();
        Value value = iter.getTopValue();
        if (key.getSize() + value.getSize() < maxSize) {
          small.append(key, value);
        } else {
          large.append(key, value);
        }
        iter.next();
      }

      iter.close();
      large.close();
      small.close();
    }
  }
View Full Code Here

    long blockSize = acuconf.getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE);
   
    String compression = acuconf.get(Property.TABLE_FILE_COMPRESSION_TYPE);
   
    CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(fs.create(new Path(file), false, bufferSize, (short) rep, block), compression, conf);
    Writer writer = new RFile.Writer(_cbw, (int) blockSize);
    return writer;
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.file.rfile.RFile.Writer

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.