Package cz.o2.proxima.direct.io.bulkfs
Interface FileFormat
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
JsonFormat,ParquetFileFormat
public interface FileFormat extends java.io.SerializableA specific format of data stored in bulk storage.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static FileFormatblob(boolean writeGzip)Create blob file format with specifiedFileSystemas root.java.lang.StringfileSuffix()Retrieve suffix of file names.static FileFormatjson(boolean gzip)Create json file format.ReaderopenReader(Path path, EntityDescriptor entity)Open reader for data stored at givenPathWriteropenWriter(Path path, EntityDescriptor entity)Open writer for data on givenPath.default voidsetup(AttributeFamilyDescriptor family)Setup FileFormat for givenAttributeFamilyDescriptor.
-
-
-
Method Detail
-
blob
static FileFormat blob(boolean writeGzip)
Create blob file format with specifiedFileSystemas root.- Parameters:
writeGzip- whether produced files should be compressed using gzip- Returns:
BinaryBlobFormatasFileFormat.
-
json
static FileFormat json(boolean gzip)
Create json file format.- Parameters:
gzip- read/write gzipped data- Returns:
JsonFormat
-
setup
default void setup(AttributeFamilyDescriptor family)
Setup FileFormat for givenAttributeFamilyDescriptor.- Parameters:
family- attribute family
-
openReader
Reader openReader(Path path, EntityDescriptor entity) throws java.io.IOException
Open reader for data stored at givenPath- Parameters:
path-Pathon associatedFileSystementity- descriptor of entity whose data we are going to read- Returns:
- reader of the data
- Throws:
java.io.IOException- on errors
-
openWriter
Writer openWriter(Path path, EntityDescriptor entity) throws java.io.IOException
Open writer for data on givenPath.- Parameters:
path-Pathon associatedFileSystementity- descriptor of entity whose data we are going to write- Returns:
- writer for the data
- Throws:
java.io.IOException- on errors
-
fileSuffix
java.lang.String fileSuffix()
Retrieve suffix of file names.- Returns:
- String suffix
-
-