sig
type file_fragment = string * int64 * int64
type file = Mapred_tasks.file_fragment list
type file_tag = [ `Tag of string ]
type locality = [ `Any | `Dn_identity of string ]
type map_task = {
map_input : Mapred_tasks.file;
map_output_prefix : string;
map_output_suffix : string;
map_id : int;
map_best_hosts : Unix.inet_addr list;
}
type sort_task = {
sort_input : Mapred_tasks.file;
sort_input_del : bool;
sort_output : string;
sort_output_locality : Mapred_tasks.locality;
sort_id : int;
}
type shuffle_task = {
shuffle_input : (Mapred_tasks.file * int * int) list;
shuffle_input_del : bool;
shuffle_output : (string * int * int * Mapred_tasks.locality) list;
shuffle_partitions : int * int;
shuffle_coverage : int * int;
shuffle_reduce : bool;
shuffle_round : int;
shuffle_avg_part_width : float;
}
type emap_task = {
emap_map : Mapred_tasks.map_task;
emap_output :
(Mapred_tasks.file_tag * int * int * Mapred_tasks.locality) list;
}
type task =
[ `Cleanup
| `Emap of Mapred_tasks.emap_task
| `Map of Mapred_tasks.map_task
| `Shuffle of Mapred_tasks.shuffle_task
| `Sort of Mapred_tasks.sort_task ]
type task_ok = {
ok_files : (Mapred_tasks.file_tag * Mapred_tasks.file) list;
ok_counters : Mapred_stats.stats;
}
type task_result =
[ `Corrupt_input of Mapred_tasks.file list
| `Error of string
| `Ok of Mapred_tasks.task_ok
| `Retry_later ]
module Ord :
sig
type t = Mapred_tasks.task
val compare : Mapred_tasks.task -> Mapred_tasks.task -> int
end
val encode_task : Mapred_tasks.task -> string
val decode_task : string -> Mapred_tasks.task
val encode_task_result : Mapred_tasks.task_result * string list -> string
val decode_task_result : string -> Mapred_tasks.task_result * string list
val lock_name_of_task_id : Mapred_tasks.task -> string
val string_of_task_id : Mapred_tasks.task -> string
val print_task_id :
Netchannels.out_obj_channel -> Mapred_tasks.task -> int -> unit
val print_task :
Netchannels.out_obj_channel -> Mapred_tasks.task -> int -> unit
val print_file :
?tag:string ->
Netchannels.out_obj_channel -> Mapred_tasks.file -> int -> unit
end