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.Serializable
A 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 FileFormat
blob(boolean writeGzip)
Create blob file format with specifiedFileSystem
as root.java.lang.String
fileSuffix()
Retrieve suffix of file names.static FileFormat
json(boolean gzip)
Create json file format.Reader
openReader(Path path, EntityDescriptor entity)
Open reader for data stored at givenPath
Writer
openWriter(Path path, EntityDescriptor entity)
Open writer for data on givenPath
.default void
setup(AttributeFamilyDescriptor family)
Setup FileFormat for givenAttributeFamilyDescriptor
.
-
-
-
Method Detail
-
blob
static FileFormat blob(boolean writeGzip)
Create blob file format with specifiedFileSystem
as root.- Parameters:
writeGzip
- whether produced files should be compressed using gzip- Returns:
BinaryBlobFormat
asFileFormat
.
-
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
-Path
on associatedFileSystem
entity
- 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
-Path
on associatedFileSystem
entity
- 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
-
-