Plasma GitLab Archive
Projects Blog Knowledge

Module Mapred_main

module Mapred_main: sig .. end
Main program for the task server and job controller, for this single job only

val main : Mapred_def.mapred_job -> unit
Main program for the task server and job controller, for this single job only
val exec_job : ?options:((string * string) list Pervasives.ref ->
(Arg.key * Arg.spec * Arg.doc) list) ->
Mapred_def.mapred_env -> Mapred_def.mapred_job -> unit
Command-line interface for running this job.

By passing options it is possible to define additional command-line options as for the Arg module of the standard library. options is called with a list of keys and values as argument. By extending this list, additional custom job options can be set (as for -override).

type spec = string * string * (Mapred_def.mapred_env -> Mapred_def.mapred_job) *
(Mapred_def.mapred_env -> Mapred_def.mapred_job -> unit)
Specification of a command for dispatch. A command is described as 4-tuple (name, usage, get_job, run_job):

  • name is the command name (taken from the command-line)
  • usage is a help text
  • get_job: must return the job definition
  • run_job: starts the job
run_job can parse further command-line parameters with Arg.
val dispatch : spec list -> unit
Alternative main program for dispatching between several types of jobs. The list includes 4-tuples:

 (command_name, usage, get_job, run_job) 

See spec for more information.

Note that exec_job is a valid run_job function, and that Mapred_toolkit.toolkit_job can be used for get_job.

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