Plasma GitLab Archive
Projects Blog Knowledge

Class type Mapred_io.record_reader_factory


class type record_reader_factory = object .. end

method read_file : read_flag list ->
Mapred_fs.filesystem ->
Plasma_shm.shm_manager ->
record_config ->
string -> int64 -> int64 -> record_reader
read_file flags fs rc name block len: Reads from name, starting at block, ending at block+len-1 (plus the following overflow region). Reading is done in a separate transaction.

Note that len>=1 is a requirement here.

If block=0 (or the `Process_first_record flag is given), the first record of the selected file region is returned to the user. If block>0 (or the `Skip_first_record flag is set), the first record is skipped, i.e. reading starts after the first encountered record separator.

Reading continues past the last block if the last record does not terminate within the block. The maximum record length is the size of a bigblock (including the separator), so read_file will at most read the bigblock following the last selected block.

Reading always stops if the real EOF of the file is reached, or the position given with the `Eof option (whatever comes first).

It is not required that block or len are multiples of bigblocks, although this is usually the case.

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml