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.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
withBlockCache(BlockCache dataCache, BlockCache indexCache)
(Optional) Set the block cache pair to be used to optimize reads within the constructed reader.FileOperations.ReaderBuilder
withDataCache(BlockCache dataCache)
(Optional) set the data cache to be used to optimize reads within the constructed reader.FileOperations.ReaderBuilder
withFileLenCache(com.google.common.cache.Cache<String,Long> fileLenCache)
FileOperations.ReaderBuilder
withIndexCache(BlockCache indexCache)
(Optional) set the index cache to be used to optimize reads within the constructed reader.FileOperations.ReaderBuilder
withRateLimiter(RateLimiter rateLimiter)
FileOperations.ReaderBuilder
withTableConfiguration(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:
withTableConfiguration
in interfaceFileOperations.ReaderTableConfiguration
-
withBlockCache
public FileOperations.ReaderBuilder withBlockCache(BlockCache dataCache, BlockCache indexCache)
(Optional) Set the block cache pair to be used to optimize reads within the constructed reader.
-
withDataCache
public FileOperations.ReaderBuilder withDataCache(BlockCache dataCache)
(Optional) set the data cache to be used to optimize reads within the constructed reader.
-
withIndexCache
public FileOperations.ReaderBuilder withIndexCache(BlockCache indexCache)
(Optional) set the index cache 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
-
-