Skip to content

Command Line Interface

Wojtek Bednarzak edited this page Apr 9, 2018 · 2 revisions

Command Line Interface

Version: 0.2.0 This document outlines the command line interface options.


Usage

Global Options

The application has 1 global option.

  • --manager: This option is used to specify the address of a manager. This manager will be in charge of the specified map reduce. The manager location can optionally be specified using HERACLES_MANAGER ENV var.

Commands

There are 3 main Commands

  • schedule: This command tells the master to perform a MapReduce job from a job definition file. The file must be specified.
    • --job_file, -f: This specifies the location of the job definition, written in text proto format.

Example:

$ hrctl --manager=[::]:8081 schedule -f /shared/shakespeare/job.pb
Successfully scheduled. You can see the job status by running:
    hrctl describe job mr42
  • cancel: Allows to cancel a job based on its ID. All already running tasks will be allowed to finish, but the manager would not schedule any new tasks.

Example:

$ hrctl cancel mr42
Job mr42 successfully cancelled
  • describe: This command allows to get insight into what is running on the cluster. It has a variety of subcommands:
    • cluster: Gives information about the cluster, like currently amount running jobs, tasks and queue size.
    • queue: List of jobs in the queue
    • job <JOB-ID>: Information about the job. It takes one argument JOB-ID which must be specified
    • jobs: List of currently running jobs
    • task <TASK-ID: Information about a specific task
    • tasks: List of active tasks. The list can be limited to only one job:
      • --job <JOB-ID>: The flag used to filiter the tasks. This must be a valid task ID

Example:

$ hrctl describe cluster
queue_size: 2
available_workers: 20
total_workers: 100

$ hrctl describe queue
+---------+-------------+
| mr42 | 10s ago |
| mr42 | 46s ago |
+---------+-------------+
Clone this wiki locally