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 allFileOperationswhich perform reads.
-
-
Constructor Summary
Constructors Constructor Description ReaderBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileSKVIteratorbuild()Execute the operation, constructing the specified file reader.FileOperations.ReaderTableConfigurationforFile(String filename, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration fsConf, CryptoService cs)FileOperations.ReaderBuilderseekToBeginning()Seek the constructed iterator to the beginning of its domain before returning.FileOperations.ReaderBuilderseekToBeginning(boolean seekToBeginning)If true, seek the constructed iterator to the beginning of its domain before returning.FileOperations.ReaderBuilderwithCacheProvider(CacheProvider cacheProvider)(Optional) Set the block cache pair to be used to optimize reads within the constructed reader.FileOperations.ReaderBuilderwithFileLenCache(com.google.common.cache.Cache<String,Long> fileLenCache)FileOperations.ReaderBuilderwithRateLimiter(RateLimiter rateLimiter)FileOperations.ReaderBuilderwithTableConfiguration(AccumuloConfiguration tableConfiguration)-
Methods inherited from class org.apache.accumulo.core.file.FileOperations.FileHelper
cryptoService, 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:
withTableConfigurationin 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)
-
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
-
-