public static class StoreFileWriter.Builder extends Object
Modifier and Type | Field and Description |
---|---|
private BloomType |
bloomType |
private CacheConfig |
cacheConf |
private Supplier<Collection<HStoreFile>> |
compactedFilesSupplier |
private org.apache.hadoop.conf.Configuration |
conf |
private org.apache.hadoop.fs.Path |
dir |
private InetSocketAddress[] |
favoredNodes |
private HFileContext |
fileContext |
private org.apache.hadoop.fs.Path |
filePath |
private String |
fileStoragePolicy |
private org.apache.hadoop.fs.FileSystem |
fs |
private long |
maxKeyCount |
private boolean |
shouldDropCacheBehind |
private Consumer<org.apache.hadoop.fs.Path> |
writerCreationTracker |
Constructor and Description |
---|
Builder(org.apache.hadoop.conf.Configuration conf,
CacheConfig cacheConf,
org.apache.hadoop.fs.FileSystem fs) |
Builder(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs)
Creates Builder with cache configuration disabled
|
private final org.apache.hadoop.conf.Configuration conf
private final CacheConfig cacheConf
private final org.apache.hadoop.fs.FileSystem fs
private long maxKeyCount
private org.apache.hadoop.fs.Path dir
private org.apache.hadoop.fs.Path filePath
private InetSocketAddress[] favoredNodes
private HFileContext fileContext
private boolean shouldDropCacheBehind
private Supplier<Collection<HStoreFile>> compactedFilesSupplier
private String fileStoragePolicy
private Consumer<org.apache.hadoop.fs.Path> writerCreationTracker
public Builder(org.apache.hadoop.conf.Configuration conf, CacheConfig cacheConf, org.apache.hadoop.fs.FileSystem fs)
public Builder(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs)
public StoreFileWriter.Builder withOutputDir(org.apache.hadoop.fs.Path dir)
withFilePath(org.apache.hadoop.fs.Path)
, but not both.dir
- Path to column family directory. The directory is created if does not exist. The
file is given a unique name within this directory.public StoreFileWriter.Builder withFilePath(org.apache.hadoop.fs.Path filePath)
withOutputDir(org.apache.hadoop.fs.Path)
, but not both.filePath
- the StoreFile path to writepublic StoreFileWriter.Builder withFavoredNodes(InetSocketAddress[] favoredNodes)
favoredNodes
- an array of favored nodes or possibly nullpublic StoreFileWriter.Builder withBloomType(BloomType bloomType)
public StoreFileWriter.Builder withMaxKeyCount(long maxKeyCount)
maxKeyCount
- estimated maximum number of keys we expect to addpublic StoreFileWriter.Builder withFileContext(HFileContext fileContext)
public StoreFileWriter.Builder withShouldDropCacheBehind(boolean shouldDropCacheBehind)
public StoreFileWriter.Builder withCompactedFilesSupplier(Supplier<Collection<HStoreFile>> compactedFilesSupplier)
public StoreFileWriter.Builder withFileStoragePolicy(String fileStoragePolicy)
public StoreFileWriter.Builder withWriterCreationTracker(Consumer<org.apache.hadoop.fs.Path> writerCreationTracker)
public StoreFileWriter build() throws IOException
StoreFileWriter.appendMetadata(long, boolean)
.IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.