跳到主要内容

Job Group Management Command: jobgroup

Query: ls

Entry:

lbg jobgroup ls

Summary:

usage: lbg jobgroup ls [-h] [-q] [-s START] [-e END] [-k SEARCH] [-o SORTBY] [-as] [--csv]
[--json] [--yaml] [--table] [--noheader] [-n NUMBER]

options:
-h, --help show this help message and exit
-q, --quiet only show job group id
-s START, --start START
default is a day ago. format is yyyy-mm-dd
-e END, --end END default is a day today. format is yyyy-mm-dd
-k SEARCH, --search SEARCH
allow search id/name
-o SORTBY, --sortby SORTBY
sort by id/createTime default is id
-as, --asce list by ascending, default descending
--csv output with csv format
--json output with json format
--yaml output with yaml format
--table output with table format
--noheader does not print header information
-n NUMBER, --number NUMBER
number of result to be display, default 50

Parameter Description:

ParameterAbbreviationDescriptionRequired
--start-sStart time, format is yyyy-mm-ddNo
--end-eEnd time, format is yyyy-mm-ddNo
--search-kSearch by id/nameNo
--sortby-oSort by createTime/id, default is idNo
--asce-asSort in reverse orderNo
--number-nNumber of job groups to display, default is 50No

Example:

$ lbg jobgroup ls -n 10 # Display the first 10 job groups
$ lbg jobgroup ls -s 2022-03-05 -e 2022-07-08 # Display job groups from March 5, 2022, to July 8, 2022

Terminate: terminate

Entry:

lbg jobgroup terminate

Summary:

usage: lbg jobgroup terminate [-h] [-f] jobgroup_id [jobgroup_id ...]

positional arguments:
jobgroup_id id of the job group

options:
-h, --help show this help message and exit
-f, --force force terminate job group

Parameter Description:

ParameterAbbreviationDescriptionRequired
--force-fNo promptNo
--job_ids-Job group id to be terminated earlyNo

Example:

$ lbg jobgroup terminate 123 654 # Terminate job groups with ID 123 and 654 early

Delete: rm

Entry:

lbg jobgroup rm

Summary:

usage: lbg jobgroup rm [-h] [-f] jobgroup_id [jobgroup_id ...]

positional arguments:
jobgroup_id id of the job group

options:
-h, --help show this help message and exit
-f, --force force delete job group

Parameter Description:

ParameterAbbreviationDescriptionRequired
--force-fNo promptNo
--job_ids-Job group id to be deletedNo

Example:

$ lbg jobgroup rm 123 654 # Delete job groups with ID 123 and 654

Download: download

Entry:

lbg jobgroup download

Summary:

usage: lbg jobgroup download [-h] [-p PATH] [-pr] jobgroup_id [jobgroup_id ...]

positional arguments:
jobgroup_id id of the job group

options:
-h, --help show this help message and exit
-p PATH, --path PATH download location default current dir
-pr, --parent create parent dir if needed

Parameter Description:

ParameterAbbreviationDescriptionRequired
--parent-prCreate parent directory if it does not existNo
--path-pDownload to the specified directory, default is the current directoryNo

Example:

$ lbg jobgroup download 123 654 # Download job groups with ID 123 and 654

Create: create

Entry:

lbg jobgroup create

Summary:

usage: lbg jobgroup create [-h] [-n NAME] [-pjid PROJECT_ID]

optional arguments:
-h, --help show this help message and exit
-n NAME, --name NAME name of the job group
-pjid PROJECT_ID, --project_id PROJECT_ID project id of the job group

Parameter Description:

ParameterAbbreviationDescriptionRequired
--name-nthe name of job groupYes
--project_id-pjidthe project id of job groupYes

Example:

$ lbg jobgroup create -n test -pjid 123 # Create a job group named test with project ID 123
{'groupId': 345} #GroupId is the created job group ID

Note on Using Job Group ID:

Attention

The groupId referenced here differs from the JOB GROUP ID that you receive upon creating a job. When submitting a job, the group id that is acquired through the lbg jobgroup create command should be specified as bohrJobGroupId within the job configuration JSON file, instead of jobGroupId.