public interface IgfsRecordResolver extends Serializable
IgfsTask
is split into IgfsJob
s each produced job will obtain
IgfsFileRange
based on file data location. Record resolver is invoked in each job before actual
execution in order to adjust record boundaries in a way consistent with user data.
E.g., you may want to split your task into jobs so that each job process zero, one or several lines from that file. But file is split into ranges based on block locations, not new line boundaries. Using convenient record resolver you can adjust job range so that it covers the whole line(s).
The following record resolvers are available out of the box:
Modifier and Type | Method and Description |
---|---|
@Nullable IgfsFileRange |
resolveRecords(IgniteFileSystem fs,
IgfsInputStream stream,
IgfsFileRange suggestedRecord)
Adjusts record start offset and length.
|
@Nullable @Nullable IgfsFileRange resolveRecords(IgniteFileSystem fs, IgfsInputStream stream, IgfsFileRange suggestedRecord) throws IgniteException, IOException
fs
- IGFS instance to use.stream
- Input stream for split file.suggestedRecord
- Suggested file system record.null
, original record is ignored.IgniteException
- If resolve failed.IOException
- If resolve failed.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019