Package org.apache.accumulo.core.file
Class FileOperations.ReaderBuilder
- java.lang.Object
-
- org.apache.accumulo.core.file.FileOperations.FileHelper
-
- org.apache.accumulo.core.file.FileOperations.ReaderBuilder
-
- All Implemented Interfaces:
FileOperations.ReaderTableConfiguration
- Enclosing class:
- FileOperations
public class FileOperations.ReaderBuilder extends FileOperations.FileHelper implements FileOperations.ReaderTableConfiguration
Options common to allFileOperations
which perform reads.
-
-
Constructor Summary
Constructors Constructor Description ReaderBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileSKVIterator
build()
Execute the operation, constructing the specified file reader.FileOperations.ReaderBuilder
dropCachesBehind()
FileOperations.ReaderTableConfiguration
forFile(String filename, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration fsConf, CryptoService cs)
FileOperations.ReaderBuilder
seekToBeginning()
Seek the constructed iterator to the beginning of its domain before returning.FileOperations.ReaderBuilder
seekToBeginning(boolean seekToBeginning)
If true, seek the constructed iterator to the beginning of its domain before returning.FileOperations.ReaderBuilder
withCacheProvider(CacheProvider cacheProvider)
(Optional) Set the block cache pair to be used to optimize reads within the constructed reader.FileOperations.ReaderBuilder
withFileLenCache(com.google.common.cache.Cache<String,Long> fileLenCache)
FileOperations.ReaderBuilder
withRateLimiter(RateLimiter rateLimiter)
FileOperations.ReaderBuilder
withTableConfiguration(AccumuloConfiguration tableConfiguration)
-
Methods inherited from class org.apache.accumulo.core.file.FileOperations.FileHelper
cryptoService, dropCacheBehind, filename, fs, fsConf, getTableConfiguration, rateLimiter, tableConfiguration, toIndexReaderBuilderOptions, toReaderBuilderOptions, toScanReaderBuilderOptions, toWriterBuilderOptions
-
-
-
-
Method Detail
-
forFile
public FileOperations.ReaderTableConfiguration forFile(String filename, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration fsConf, CryptoService cs)
-
withTableConfiguration
public FileOperations.ReaderBuilder withTableConfiguration(AccumuloConfiguration tableConfiguration)
- Specified by:
withTableConfiguration
in interfaceFileOperations.ReaderTableConfiguration
-
withCacheProvider
public FileOperations.ReaderBuilder withCacheProvider(CacheProvider cacheProvider)
(Optional) Set the block cache pair to be used to optimize reads within the constructed reader.
-
withFileLenCache
public FileOperations.ReaderBuilder withFileLenCache(com.google.common.cache.Cache<String,Long> fileLenCache)
-
withRateLimiter
public FileOperations.ReaderBuilder withRateLimiter(RateLimiter rateLimiter)
-
dropCachesBehind
public FileOperations.ReaderBuilder dropCachesBehind()
-
seekToBeginning
public FileOperations.ReaderBuilder seekToBeginning()
Seek the constructed iterator to the beginning of its domain before returning. Equivalent toseekToBeginning(true)
.
-
seekToBeginning
public FileOperations.ReaderBuilder seekToBeginning(boolean seekToBeginning)
If true, seek the constructed iterator to the beginning of its domain before returning.
-
build
public FileSKVIterator build() throws IOException
Execute the operation, constructing the specified file reader.- Throws:
IOException
-
-