org.apache.hadoop.hbase.regionserver
Class StoreFile.WriterBuilder

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.StoreFile.WriterBuilder
Enclosing class:
StoreFile

public static class StoreFile.WriterBuilder
extends Object


Constructor Summary
StoreFile.WriterBuilder(org.apache.hadoop.conf.Configuration conf, CacheConfig cacheConf, org.apache.hadoop.fs.FileSystem fs)
           
 
Method Summary
 StoreFile.Writer build()
          Create a store file writer.
 StoreFile.WriterBuilder withBloomType(BloomType bloomType)
           
 StoreFile.WriterBuilder withComparator(KeyValue.KVComparator comparator)
           
 StoreFile.WriterBuilder withFavoredNodes(InetSocketAddress[] favoredNodes)
           
 StoreFile.WriterBuilder withFileContext(HFileContext fileContext)
           
 StoreFile.WriterBuilder withFilePath(org.apache.hadoop.fs.Path filePath)
          Use either this method or withOutputDir(org.apache.hadoop.fs.Path), but not both.
 StoreFile.WriterBuilder withMaxKeyCount(long maxKeyCount)
           
 StoreFile.WriterBuilder withOutputDir(org.apache.hadoop.fs.Path dir)
          Use either this method or withFilePath(org.apache.hadoop.fs.Path), but not both.
 StoreFile.WriterBuilder withShouldDropCacheBehind(boolean shouldDropCacheBehind)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreFile.WriterBuilder

public StoreFile.WriterBuilder(org.apache.hadoop.conf.Configuration conf,
                               CacheConfig cacheConf,
                               org.apache.hadoop.fs.FileSystem fs)
Method Detail

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)

withFavoredNodes

public StoreFile.WriterBuilder withFavoredNodes(InetSocketAddress[] favoredNodes)
Parameters:
favoredNodes - an array of favored nodes or possibly null
Returns:
this (for chained invocation)

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)

withFileContext

public StoreFile.WriterBuilder withFileContext(HFileContext fileContext)

withShouldDropCacheBehind

public StoreFile.WriterBuilder withShouldDropCacheBehind(boolean shouldDropCacheBehind)

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 © 2007–2015 The Apache Software Foundation. All rights reserved.