org.apache.hadoop.hbase.regionserver
Class StoreFile.WriterBuilder
java.lang.Object
org.apache.hadoop.hbase.regionserver.StoreFile.WriterBuilder
- Enclosing class:
- StoreFile
public static class StoreFile.WriterBuilder
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StoreFile.WriterBuilder
public StoreFile.WriterBuilder(org.apache.hadoop.conf.Configuration conf,
CacheConfig cacheConf,
org.apache.hadoop.fs.FileSystem fs,
int blockSize)
withOutputDir
public StoreFile.WriterBuilder withOutputDir(org.apache.hadoop.fs.Path dir)
- Use either this method or
withFilePath(org.apache.hadoop.fs.Path)
, but not both.
- Parameters:
dir
- Path to column family directory. The directory is created if
does not exist. The file is given a unique name within this
directory.
- Returns:
- this (for chained invocation)
withFilePath
public StoreFile.WriterBuilder withFilePath(org.apache.hadoop.fs.Path filePath)
- Use either this method or
withOutputDir(org.apache.hadoop.fs.Path)
, but not both.
- Parameters:
filePath
- the StoreFile path to write
- Returns:
- this (for chained invocation)
withCompression
public StoreFile.WriterBuilder withCompression(Compression.Algorithm compressAlgo)
withFavoredNodes
public StoreFile.WriterBuilder withFavoredNodes(InetSocketAddress[] favoredNodes)
- Parameters:
favoredNodes
- an array of favored nodes or possibly null
- Returns:
- this (for chained invocation)
withDataBlockEncoder
public StoreFile.WriterBuilder withDataBlockEncoder(HFileDataBlockEncoder encoder)
withComparator
public StoreFile.WriterBuilder withComparator(KeyValue.KVComparator comparator)
withBloomType
public StoreFile.WriterBuilder withBloomType(BloomType bloomType)
withMaxKeyCount
public StoreFile.WriterBuilder withMaxKeyCount(long maxKeyCount)
- Parameters:
maxKeyCount
- estimated maximum number of keys we expect to add
- Returns:
- this (for chained invocation)
withChecksumType
public StoreFile.WriterBuilder withChecksumType(ChecksumType checksumType)
- Parameters:
checksumType
- the type of checksum
- Returns:
- this (for chained invocation)
withBytesPerChecksum
public StoreFile.WriterBuilder withBytesPerChecksum(int bytesPerChecksum)
- Parameters:
bytesPerChecksum
- the number of bytes per checksum chunk
- Returns:
- this (for chained invocation)
includeMVCCReadpoint
public StoreFile.WriterBuilder includeMVCCReadpoint(boolean includeMVCCReadpoint)
- Parameters:
includeMVCCReadpoint
- whether to write the mvcc readpoint to the file for each KV
- Returns:
- this (for chained invocation)
build
public StoreFile.Writer build()
throws IOException
- Create a store file writer. Client is responsible for closing file when
done. If metadata, add BEFORE closing using
StoreFile.Writer.appendMetadata(long, boolean)
.
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.