module Mapred_io_bgreader:sig..end
Mapred_iotype bgreader
val create : Mapred_fs.filesystem ->
string -> int64 -> int64 -> int -> bgreadercreate fs name startblock endblock bufnum
The new reader uses a copy of the client fs for the fs access.
The file is name, which is read from startblock to
endblock-1. bufnum is the length of the buffer in blocks
(for each of the two buffers, foreground and background).
After create the first returned buffer is empty. Call read
to read the first blocks.
val extend : bgreader -> int64 -> unitextend bgreader endblock: Sets a new endblock (higher value than the
old endblock)val read : bgreader -> intread bgreader: reads the next blocks into the buffer. Returns the
number of blocks - 0 if at eofval buffer : bgreader -> Netsys_mem.memoryread is called.val buffer_block : bgreader -> int64bufferval buffer_len : bgreader -> intbuffer in blocksval close : bgreader -> unit