class type mapred_job =object
..end
method custom_params : string list
method check_config : mapred_env -> mapred_job_config -> unit
method pre_job_start : mapred_env -> mapred_job_config -> unit
method post_job_finish : mapred_env -> mapred_job_config -> unit
method map : mapred_env ->
mapred_job_config ->
task_info ->
Mapred_io.record_reader -> Mapred_io.record_writer -> unit
method extract_key : mapred_env -> mapred_job_config -> string -> string
let f = job#extract_key me jc
, and then
calling f line
for each input line. Because of this, it is
possible to factor initializations out as in
method extract_key me jc =
...; (* init stuff *)
(fun line -> ... (* real extraction *) )
method partition_of_key : mapred_env -> mapred_job_config -> string -> int
fun k -> (Hashtbl.hash k) mod partitions
, or something more
elaborated. This method is always called by
first evaluating let f = job#partition_of_key me jc
, and then
calling f line
for each input line. Because of this, it is
possible to factor initializations out as in
method partition_of_key me jc =
...; (* init stuff *)
(fun line -> ... (* real extraction *) )
method reduce : mapred_env ->
mapred_job_config ->
task_info ->
Mapred_io.record_reader -> Mapred_io.record_writer -> unit