本文整理汇总了Java中org.apache.cassandra.io.util.DataIntegrityMetadata.ChecksumWriter方法的典型用法代码示例。如果您正苦于以下问题:Java DataIntegrityMetadata.ChecksumWriter方法的具体用法?Java DataIntegrityMetadata.ChecksumWriter怎么用?Java DataIntegrityMetadata.ChecksumWriter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.io.util.DataIntegrityMetadata
的用法示例。
在下文中一共展示了DataIntegrityMetadata.ChecksumWriter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CompressedSequentialWriter
import org.apache.cassandra.io.util.DataIntegrityMetadata; //导入方法依赖的package包/类
public CompressedSequentialWriter(File file,
String offsetsPath,
CompressionParameters parameters,
MetadataCollector sstableMetadataCollector)
{
super(file, parameters.chunkLength());
this.compressor = parameters.sstableCompressor;
// buffer for compression should be the same size as buffer itself
compressed = new ICompressor.WrappedArray(new byte[compressor.initialCompressedBufferLength(buffer.length)]);
/* Index File (-CompressionInfo.db component) and it's header */
metadataWriter = CompressionMetadata.Writer.open(parameters, offsetsPath);
this.sstableMetadataCollector = sstableMetadataCollector;
crcMetadata = new DataIntegrityMetadata.ChecksumWriter(out);
}
示例2: CompressedSequentialWriter
import org.apache.cassandra.io.util.DataIntegrityMetadata; //导入方法依赖的package包/类
public CompressedSequentialWriter(File file,
String offsetsPath,
CompressionParams parameters,
MetadataCollector sstableMetadataCollector)
{
super(file, parameters.chunkLength(), parameters.getSstableCompressor().preferredBufferType());
this.compressor = parameters.getSstableCompressor();
// buffer for compression should be the same size as buffer itself
compressed = compressor.preferredBufferType().allocate(compressor.initialCompressedBufferLength(buffer.capacity()));
/* Index File (-CompressionInfo.db component) and it's header */
metadataWriter = CompressionMetadata.Writer.open(parameters, offsetsPath);
this.sstableMetadataCollector = sstableMetadataCollector;
crcMetadata = new DataIntegrityMetadata.ChecksumWriter(new DataOutputStream(Channels.newOutputStream(channel)));
}
示例3: CompressedSequentialWriter
import org.apache.cassandra.io.util.DataIntegrityMetadata; //导入方法依赖的package包/类
public CompressedSequentialWriter(File file,
String offsetsPath,
boolean skipIOCache,
CompressionParameters parameters,
MetadataCollector sstableMetadataCollector)
{
super(file, parameters.chunkLength(), skipIOCache);
this.compressor = parameters.sstableCompressor;
// buffer for compression should be the same size as buffer itself
compressed = new ICompressor.WrappedArray(new byte[compressor.initialCompressedBufferLength(buffer.length)]);
/* Index File (-CompressionInfo.db component) and it's header */
metadataWriter = CompressionMetadata.Writer.open(offsetsPath);
metadataWriter.writeHeader(parameters);
this.sstableMetadataCollector = sstableMetadataCollector;
crcMetadata = new DataIntegrityMetadata.ChecksumWriter(out);
}