public class CompressedFileSplit extends FileSplit
| Constructor and Description |
|---|
CompressedFileSplit(Path path,
CompressionFormat format)
Creates a split encompassing the entire file named by the path.
|
| Modifier and Type | Method and Description |
|---|---|
FileSplit |
authorize(FileClient client)
Creates an identical split which will use the specified authorization
context for access.
|
InputStream |
openSource()
Opens the underlying source for access.
|
getEndOffset, getFileClient, getLength, getPath, getStartOffset, openSplit, toStringpublic CompressedFileSplit(Path path, CompressionFormat format)
path - the file on which the split is definedformat - the compression format of the filepublic InputStream openSource() throws IOException
DataSplitDataSplit.openSplit(int), the caller is responsible for making sure
accesses are aligned to split boundaries. The stream is also unbuffered.
This method may be required for dealing with formats which store metadata at the beginning of the file.
openSource in interface DataSplitopenSource in class FileSplitIOException - if an I/O error occurs opening
the underlying sourcepublic FileSplit authorize(FileClient client)
DataSplitThis method is used by clients of the IO APIs which want to provide an alternative to the OS-level authorization inherited from the JVM's execution environment. Data access methods for the split will use the supplied context.
The authorization context is not a serializable attribute of a data split, as it represents the environment in which the data in accesses, not a property of the data itself. The context is associated with the split as a matter of convenience.
Copyright © 2021 Actian Corporation. All rights reserved.