Package org.apache.accumulo.core.file
Class FileOperations
- java.lang.Object
-
- org.apache.accumulo.core.file.FileOperations
-
- Direct Known Subclasses:
MapFileOperations
,RFileOperations
public abstract class FileOperations extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
FileOperations.FileHelper
Helper class extended by both writers and readers.class
FileOperations.FileOptions
class
FileOperations.IndexReaderBuilder
Operation object for opening an index.static interface
FileOperations.IndexReaderTableConfiguration
class
FileOperations.ReaderBuilder
Options common to allFileOperations
which perform reads.static interface
FileOperations.ReaderTableConfiguration
class
FileOperations.ScanReaderBuilder
Operation object for opening a scan reader.static interface
FileOperations.ScanReaderTableConfiguration
class
FileOperations.WriterBuilder
Operation object for constructing a writer.static interface
FileOperations.WriterTableConfiguration
-
Constructor Summary
Constructors Constructor Description FileOperations()
-
Method Summary
-
-
-
Method Detail
-
getNewFileExtension
public static String getNewFileExtension(AccumuloConfiguration acuconf)
-
getInstance
public static FileOperations getInstance()
-
getFileSize
protected abstract long getFileSize(FileOperations.FileOptions options) throws IOException
- Throws:
IOException
-
openWriter
protected abstract FileSKVWriter openWriter(FileOperations.FileOptions options) throws IOException
- Throws:
IOException
-
openIndex
protected abstract FileSKVIterator openIndex(FileOperations.FileOptions options) throws IOException
- Throws:
IOException
-
openScanReader
protected abstract FileSKVIterator openScanReader(FileOperations.FileOptions options) throws IOException
- Throws:
IOException
-
openReader
protected abstract FileSKVIterator openReader(FileOperations.FileOptions options) throws IOException
- Throws:
IOException
-
newWriterBuilder
public FileOperations.WriterBuilder newWriterBuilder()
Construct an operation object allowing one to create a writer for a file.
Syntax:FileSKVWriter writer = fileOperations.newWriterBuilder() .forFile(...) .withTableConfiguration(...) .withRateLimiter(...) // optional .withCompression(...) // optional .build();
-
newIndexReaderBuilder
public FileOperations.IndexReaderBuilder newIndexReaderBuilder()
Construct an operation object allowing one to create an index iterator for a file.
Syntax:FileSKVIterator iterator = fileOperations.newIndexReaderBuilder() .forFile(...) .withTableConfiguration(...) .withRateLimiter(...) // optional .withBlockCache(...) // optional .build();
-
newScanReaderBuilder
public FileOperations.ScanReaderBuilder newScanReaderBuilder()
Construct an operation object allowing one to create a "scan" reader for a file. Scan readers do not have any optimizations for seeking beyond their initial position. This is useful for file operations that only need to scan data within a range and do not need to seek. Therefore file metadata such as indexes does not need to be kept in memory while the file is scanned. Also seek optimizations like bloom filters do not need to be loaded.
Syntax:FileSKVIterator scanner = fileOperations.newScanReaderBuilder() .forFile(...) .withTableConfiguration(...) .overRange(...) .withRateLimiter(...) // optional .withBlockCache(...) // optional .build();
-
newReaderBuilder
public FileOperations.ReaderBuilder newReaderBuilder()
Construct an operation object allowing one to create a reader for a file. A reader constructed in this manner fully supports seeking, and also enables any optimizations related to seeking (e.g. Bloom filters).
Syntax:FileSKVIterator scanner = fileOperations.newReaderBuilder() .forFile(...) .withTableConfiguration(...) .withRateLimiter(...) // optional .withBlockCache(...) // optional .seekToBeginning(...) // optional .build();
-
-