@Override public Map<String, String> getCompressionOptions(String cf) throws BackendException { CFMetaData cfm = Schema.instance.getCFMetaData(keySpaceName, cf); if (cfm == null) return null; return ImmutableMap.copyOf(cfm.compressionParameters().asThriftOptions()); }
if (compressionEnabled) { try { cp = new CompressionParameters(compressionClass, compressionChunkSizeKB * 1024, Collections.<String, String>emptyMap()); cp = new CompressionParameters(null); log.debug("Creating CF {}: setting {} to null to disable compression", columnfamilyName, CompressionParameters.SSTABLE_COMPRESSION);
@Override public BufferType preferredBufferType() { return metadata.compressor().preferredBufferType(); }
public ByteBuffer allocateBuffer(int size) { return metadata.compressor().preferredBufferType().allocate(size); }
@Override public DataPosition mark() { if (!buffer.hasRemaining()) doFlush(0); return new CompressedFileWriterMark(chunkOffset, current(), buffer.position(), chunkCount + 1); }
public CompressionMetadata open(long overrideLength) { if (overrideLength <= 0) overrideLength = uncompressedSize; return metadataWriter.open(overrideLength, chunkOffset); }
/** * Allocate buffer using set buffer type and buffer size. * * @return allocated ByteBuffer */ public ByteBuffer allocateBuffer() { return bufferType.allocate(bufferSize); }
@Override public int chunkSize() { return metadata.chunkLength(); }
@Override protected SequentialWriter.TransactionalProxy txnProxy() { return new TransactionalProxy(); }
public ByteBuffer allocateBuffer(int size) { return metadata.compressor().preferredBufferType().allocate(size); }
@Override public BufferType preferredBufferType() { return metadata.compressor().preferredBufferType(); }
public CompressionMetadata open(long overrideLength) { if (overrideLength <= 0) overrideLength = uncompressedSize; return metadataWriter.open(overrideLength, chunkOffset); }
/** * Allocate buffer using set buffer type and buffer size. * * @return allocated ByteBuffer */ public ByteBuffer allocateBuffer() { return bufferType.allocate(bufferSize); }
@Override public int chunkSize() { return metadata.chunkLength(); }
@Override protected SequentialWriter.TransactionalProxy txnProxy() { return new TransactionalProxy(); }
public ByteBuffer allocateBuffer(int size) { return metadata.compressor().preferredBufferType().allocate(size); }
@Override public BufferType preferredBufferType() { return metadata.compressor().preferredBufferType(); }
public ByteBuffer allocateBuffer(int size) { return metadata.compressor().preferredBufferType().allocate(size); }
@Override public BufferType preferredBufferType() { return metadata.compressor().preferredBufferType(); }