Class StoreFileWriter.Builder
java.lang.Object
org.apache.hadoop.hbase.regionserver.StoreFileWriter.Builder
- Enclosing class:
- StoreFileWriter
-
Field Summary
Modifier and TypeFieldDescriptionprivate BloomType
private final CacheConfig
private Supplier<Collection<HStoreFile>>
private CellComparator
private final org.apache.hadoop.conf.Configuration
private org.apache.hadoop.fs.Path
private InetSocketAddress[]
private HFileContext
private String
private final org.apache.hadoop.fs.FileSystem
private org.apache.hadoop.fs.Path
private boolean
private org.apache.hadoop.fs.Path
private long
private int
private boolean
private boolean
private Consumer<org.apache.hadoop.fs.Path>
-
Constructor Summary
ConstructorDescriptionBuilder
(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs) Creates Builder with cache configuration disabledBuilder
(org.apache.hadoop.conf.Configuration conf, CacheConfig cacheConf, org.apache.hadoop.fs.FileSystem fs) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a store file writer.withBloomType
(BloomType bloomType) withCellComparator
(CellComparator comparator) withCompactedFilesSupplier
(Supplier<Collection<HStoreFile>> compactedFilesSupplier) withFavoredNodes
(InetSocketAddress[] favoredNodes) withFileContext
(HFileContext fileContext) withFilePath
(org.apache.hadoop.fs.Path filePath) Use either this method orwithOutputDir(org.apache.hadoop.fs.Path)
, but not both.withFileStoragePolicy
(String fileStoragePolicy) withIsCompaction
(boolean isCompaction) withMaxKeyCount
(long maxKeyCount) withMaxVersions
(int maxVersions) withNewVersionBehavior
(boolean newVersionBehavior) withOutputDir
(org.apache.hadoop.fs.Path dir) Use either this method orwithFilePath(org.apache.hadoop.fs.Path)
, but not both.withShouldDropCacheBehind
(boolean shouldDropCacheBehind) withWriterCreationTracker
(Consumer<org.apache.hadoop.fs.Path> writerCreationTracker)
-
Field Details
-
conf
-
cacheConf
-
fs
-
bloomType
-
maxKeyCount
-
dir
-
liveFilePath
-
historicalFilePath
-
favoredNodes
-
fileContext
-
shouldDropCacheBehind
-
compactedFilesSupplier
-
fileStoragePolicy
-
writerCreationTracker
-
maxVersions
-
newVersionBehavior
-
comparator
-
isCompaction
-
-
Constructor Details
-
Builder
public Builder(org.apache.hadoop.conf.Configuration conf, CacheConfig cacheConf, org.apache.hadoop.fs.FileSystem fs) -
Builder
Creates Builder with cache configuration disabled
-
-
Method Details
-
withOutputDir
Use either this method orwithFilePath(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
Use either this method orwithOutputDir(org.apache.hadoop.fs.Path)
, but not both.- Parameters:
filePath
- the StoreFile path to write- Returns:
- this (for chained invocation)
-
withFavoredNodes
- Parameters:
favoredNodes
- an array of favored nodes or possibly null- Returns:
- this (for chained invocation)
-
withBloomType
-
withMaxKeyCount
- Parameters:
maxKeyCount
- estimated maximum number of keys we expect to add- Returns:
- this (for chained invocation)
-
withFileContext
-
withShouldDropCacheBehind
-
withCompactedFilesSupplier
public StoreFileWriter.Builder withCompactedFilesSupplier(Supplier<Collection<HStoreFile>> compactedFilesSupplier) -
withFileStoragePolicy
-
withWriterCreationTracker
public StoreFileWriter.Builder withWriterCreationTracker(Consumer<org.apache.hadoop.fs.Path> writerCreationTracker) -
withMaxVersions
-
withNewVersionBehavior
-
withCellComparator
-
withIsCompaction
-
build
Create a store file writer. Client is responsible for closing file when done. If metadata, add BEFORE closing usingStoreFileWriter.appendMetadata(long, boolean)
.- Throws:
IOException
-