dataproc-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUsage
使用方法
All scripts can be executed using Node.js. Replace and with actual values.
<param_name><param_value>Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
所有脚本均可通过Node.js执行。将和替换为实际值。
<param_name><param_value>Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'注意:脚本会自动从多个.env文件加载环境变量。除非因缺少环境变量导致技能执行失败,否则不要要求用户设置变量。
Scripts
脚本
get_cluster
get_cluster
Gets a Dataproc cluster
获取一个Dataproc集群
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| clusterName | string | The short name of the cluster, e.g. for "projects/my-project/regions/us-central1/clusters/my-cluster", pass "my-cluster" (the project and region are inherited from the source) | No |
| 名称 | 类型 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|---|
| clusterName | string | 集群的简称,例如对于"projects/my-project/regions/us-central1/clusters/my-cluster",传入"my-cluster"(项目和区域会从源继承) | 否 |
get_job
get_job
Gets a Dataproc job
获取一个Dataproc作业
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| jobId | string | The job ID, e.g. for "projects/my-project/regions/us-central1/jobs/my-job", pass "my-job" (the project and region are inherited from the source) | No |
| 名称 | 类型 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|---|
| jobId | string | 作业ID,例如对于"projects/my-project/regions/us-central1/jobs/my-job",传入"my-job"(项目和区域会从源继承) | 否 |
list_clusters
list_clusters
Lists and filters Dataproc clusters
列出并筛选Dataproc集群
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| filter | string | A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax: field = value [AND [field = value]] ... where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, UPDATING, STOPPING, or STOPPED. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING, ERROR, STOPPING, and STOPPED states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator. | No | |
| pageSize | integer | The maximum number of clusters to return in a single page (default 20) | No | |
| pageToken | string | A page token, received from a previous | No |
| 名称 | 类型 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|---|
| filter | string | 用于约束要列出的集群的筛选条件。筛选条件区分大小写,语法如下:field = value [AND [field = value]] ... 其中field为status.state、clusterName或labels.[KEY]之一,[KEY]是标签键。value可以为*以匹配所有值。status.state可以是以下值之一:ACTIVE、INACTIVE、CREATING、RUNNING、ERROR、DELETING、UPDATING、STOPPING或STOPPED。ACTIVE包含CREATING、UPDATING和RUNNING状态。INACTIVE包含DELETING、ERROR、STOPPING和STOPPED状态。clusterName是创建集群时提供的名称。仅支持逻辑AND运算符;空格分隔的项视为隐含AND运算符。 | 否 | |
| pageSize | integer | 单页返回的最大集群数量(默认20) | 否 | |
| pageToken | string | 从之前的 | 否 |
list_jobs
list_jobs
Lists and filters Dataproc jobs
列出并筛选Dataproc作业
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| filter | string | A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax: field = value [AND [field = value]] ... where field is clusterName, status.state, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: PENDING, RUNNING, CANCEL_PENDING, JOB_STATE_CANCELLED, DONE, ERROR, or ATTEMPT_FAILURE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator. Filtering by clusterName is recommended to improve query performance. | No | |
| jobStateMatcher | string | Specifies if the job state matcher should match ALL jobs, only ACTIVE jobs, or only NON_ACTIVE jobs. Defaults to ALL. Supported values: ALL, ACTIVE, NON_ACTIVE. | No | |
| pageSize | integer | The maximum number of jobs to return in a single page (default 20) | No | |
| pageToken | string | A page token, received from a previous | No |
| 名称 | 类型 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|---|
| filter | string | 用于约束要列出的作业的筛选条件。筛选条件区分大小写,语法如下:field = value [AND [field = value]] ... 其中field为clusterName、status.state或labels.[KEY]之一,[KEY]是标签键。value可以为*以匹配所有值。status.state可以是以下值之一:PENDING、RUNNING、CANCEL_PENDING、JOB_STATE_CANCELLED、DONE、ERROR或ATTEMPT_FAILURE。仅支持逻辑AND运算符;空格分隔的项视为隐含AND运算符。建议通过clusterName进行筛选以提升查询性能。 | 否 | |
| jobStateMatcher | string | 指定作业状态匹配器应匹配所有作业、仅匹配ACTIVE作业还是仅匹配NON_ACTIVE作业。默认为ALL。支持的值:ALL、ACTIVE、NON_ACTIVE。 | 否 | |
| pageSize | integer | 单页返回的最大作业数量(默认20) | 否 | |
| pageToken | string | 从之前的 | 否 |