你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az hdinsight script-action

管理 HDInsight 脚本操作。

命令

名称 说明 类型 状态
az hdinsight script-action delete

删除对群集的指定持久化脚本操作。

核心 GA
az hdinsight script-action execute

在指定的 HDInsight 群集上执行脚本操作。

核心 GA
az hdinsight script-action list

列出指定群集的所有持久化脚本操作。

核心 GA
az hdinsight script-action list-execution-history

列出指定群集的所有脚本的执行历史记录。

核心 GA
az hdinsight script-action promote

将指定的即席脚本执行提升为持久化脚本。

核心 GA
az hdinsight script-action show-execution-details

获取给定脚本执行 ID 的脚本执行详细信息。

核心 GA

az hdinsight script-action delete

删除对群集的指定持久化脚本操作。

az hdinsight script-action delete --cluster-name
                                  --name
                                  --resource-group

必需参数

--cluster-name

群集的名称。

--name -n

脚本的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az hdinsight script-action execute

在指定的 HDInsight 群集上执行脚本操作。

az hdinsight script-action execute --cluster-name
                                   --name
                                   --resource-group
                                   --roles
                                   --script-uri
                                   [--persist-on-success]
                                   [--script-parameters]

示例

执行脚本操作并持续成功。

az hdinsight script-action execute -g MyResourceGroup -n MyScriptActionName \
--cluster-name MyCluster \
--script-uri https://hdiconfigactions.blob.core.windows.net/linuxgiraphconfigactionv01/giraph-installer-v01.sh \
--roles headnode workernode \
--persist-on-success

必需参数

--cluster-name

群集的名称。

--name -n

脚本操作的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--roles

将在其中执行脚本的角色(节点)的空格分隔列表。 有效角色为 headnode、workernode、zookeepernode、edgenode。

--script-uri

脚本的 URI。

可选参数

--persist-on-success

如果需要持久保存脚本。

默认值: False
--script-parameters

脚本的参数。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az hdinsight script-action list

列出指定群集的所有持久化脚本操作。

az hdinsight script-action list --cluster-name
                                --resource-group

必需参数

--cluster-name

群集的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az hdinsight script-action list-execution-history

列出指定群集的所有脚本的执行历史记录。

az hdinsight script-action list-execution-history --cluster-name
                                                  --resource-group

必需参数

--cluster-name

群集的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az hdinsight script-action promote

将指定的即席脚本执行提升为持久化脚本。

az hdinsight script-action promote --cluster-name
                                   --execution-id
                                   --resource-group

必需参数

--cluster-name

群集的名称。

--execution-id

脚本执行 ID。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az hdinsight script-action show-execution-details

获取给定脚本执行 ID 的脚本执行详细信息。

az hdinsight script-action show-execution-details --cluster-name
                                                  --execution-id
                                                  --resource-group

必需参数

--cluster-name

群集的名称。

--execution-id

脚本执行 ID。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。