Skip to content

Commit

Permalink
Expose support/docs for configuring multiple cores in a container
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Wills committed Mar 7, 2014
1 parent 37647f9 commit f76efc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,23 @@ function.
2. **memory** (integer, defaults to 512): The amount of memory to allocate for the container, in megabytes.
If the same amount of memory is allocated for both the master and the containers, you can specify the value
once inside of the yarn table and it will be linked to the subtables by the `yarn` function.
3. **instances** (integer, defaults to 1): The number of instances of this container type to create
3. **cores** (integer, defaults to 1): The number of virtual cores to allocate for the container. If the
same number of cores are allocated for both the master and the containers, you can specify the value once
inside of the yarn table and it will be linked to the subtables by the `yarn` function.
4. **instances** (integer, defaults to 1): The number of instances of this container type to create
on the cluster. Note that this only applies to the **container/containers** arguments; the system will only
allocate a single master for each application.
4. **priority** (integer, defaults to 0): The relative priority of the containers that are allocated. Note
5. **priority** (integer, defaults to 0): The relative priority of the containers that are allocated. Note
that this prioritization is internal to each application; it does not control how many resources the
application is allowed to use or how they are prioritized.
5. **tolerated_failures** (integer, defaults to 4): This field is only specified on the application master,
6. **tolerated_failures** (integer, defaults to 4): This field is only specified on the application master,
and it specifies how many container failures should be tolerated before the application shuts down.
5. **command/commands** (string(s) or table(s), optional): **command** is a shortcut for **commands** in the
7. **command/commands** (string(s) or table(s), optional): **command** is a shortcut for **commands** in the
case that there is only a single command that needs to be executed within each container. This field
can either be a string that will be run as-is, or it may be a table that contains two subfields: a **base**
field that is a string and an **args** field that is a table. Kitten will construct a command by concatenating
the values in the args table to the base string to form the command to execute.
6. **resources** (table of tables, optional): The resources (in terms of files, URLs, etc.) that the command
8. **resources** (table of tables, optional): The resources (in terms of files, URLs, etc.) that the command
needs to run in the container. An outline of the resources fields are given in the following section.

YARN has a mechanism for copying files that are needed by an application to a working directory created
Expand Down
1 change: 1 addition & 0 deletions java/common/src/main/resources/lua/kitten.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function yarn(t)
clp = f_check(clp, name)
clp.user = t_check(clp.user, name .. ".user", "string")
clp.memory = t_check(clp.memory or 512, name .. ".memory", "number")
clp.cores = t_check(clp.cores or 1, name .. ".cores", "number")
clp.priority = t_check(clp.priority or 0, name .. ".priority", "number")
clp.instances = t_check(clp.instances or 1, name .. ".instances", "number")

Expand Down

0 comments on commit f76efc7

Please sign in to comment.