The command is used to interact with MapReduce jobs.

The usage is as follows:

$ mapred job | [GENERIC_OPTIONS] | [-submit <job-file>] | [-status <job-id>] | [-counter <job-id> <group-name> <counter-name>] | [-kill <job-id>] | [-events <job-id> <from-event-#> <#-of-events>] | [-history [all] <jobHistoryFile|jobId> [-outfile <file>] [-format <human|json>]] | [-list [all]] | [-kill-task <task-id>] | [-fail-task <task-id>] | [-set-priority <job-id> <priority>] | [-list-active-trackers] | [-list-blacklisted-trackers] | [-list-attempt-ids <job-id> <task-type> <task-state>] [-logs <job-id> <task-attempt-id>] [-config <job-id> <file>]

-submit <job-file>

Submits a job

-status <job-id>

Prints the map and reduce completion percentage and all job counters

-counter <job-id> | <group-name> | <counter-name>

Prints the counter value

-kill <job-id>

Kills a job

-events <job-id> | <from-event-#> | <#-of-events>

Prints events details received by jobtracker for the given range

-history [all] jobHistoryFilejobId [-outfile <file>] [-format human|json]

Prints job details, failed and killed task details. The all flag allows to view more details about a job, such as successful tasks, task attempts made for each task, task counters, and so on. -outfile <file> allows to direct the output to a file (instead of stdout). The format defaults to human-readable but can also be changed to JSON using the -format flag

-list [all]

Displays jobs which are not complete. -list all displays all jobs

-kill-task <task-id>

Kills a task. Killed tasks are NOT counted as failed attempts

-fail-task <task-id>

Fails a task. Failed tasks are counted as failed attempts

-set-priority <job-id> <priority>

Changes the priority of a job. Supported priority values are VERY_HIGH, HIGH, NORMAL, LOW, VERY_LOW


Lists all the active NodeManagers in the cluster


Lists the blacklisted task trackers in the cluster. This command is not supported in MRv2-based clusters

list-attempt-ids <job-id> <task-type> <task-state>

Lists the attempt IDs based on the provided task type and status. Valid task types are REDUCE, MAP. Valid task states are running, pending, completed, failed, killed

-logs <job-id> <task-attempt-id>

Dumps the container log for a job if <task-attempt-id> is not provided, otherwise dumps the log for the task with the specified <task-attempt-id>. The logs are dumped to stdout

-config <job-id> <file>

Downloads the job configuration file


$ mapred job -status job_141643275736_2152
Found a mistake? Seleсt text and press Ctrl+Enter to report it