Class StoreFileWriter.Builder
java.lang.Object
org.apache.hadoop.hbase.regionserver.StoreFileWriter.Builder
- Enclosing class:
- StoreFileWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BloomTypeprivate final CacheConfigprivate Supplier<Collection<HStoreFile>>private final org.apache.hadoop.conf.Configurationprivate org.apache.hadoop.fs.Pathprivate InetSocketAddress[]private HFileContextprivate org.apache.hadoop.fs.Pathprivate Stringprivate final org.apache.hadoop.fs.FileSystemprivate longprivate booleanprivate Consumer<org.apache.hadoop.fs.Path> -
Constructor Summary
ConstructorsConstructorDescriptionBuilder(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) 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) withMaxKeyCount(long maxKeyCount) 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
-
filePath
-
favoredNodes
-
fileContext
-
shouldDropCacheBehind
-
compactedFilesSupplier
-
fileStoragePolicy
-
writerCreationTracker
-
-
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) -
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
-