你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzHDInsightClusterAutoscaleConfiguration
Sets the autoscale configuration of an Azure HDInsight cluster.
Syntax
Set-AzHDInsightClusterAutoscaleConfiguration
[[-ResourceGroupName] <String>]
[-ClusterName] <String>
[-MinWorkerNodeCount <Int32>]
[-MaxWorkerNodeCount <Int32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
[[-ResourceGroupName] <String>]
[-ClusterName] <String>
[-TimeZone <String>]
[-Condition <System.Collections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightAutoscaleCondition]>]
[-Schedule]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
[[-ResourceGroupName] <String>]
[-ClusterName] <String>
-AutoscaleConfiguration <AzureHDInsightAutoscale>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
[-ResourceId] <String>
[-MinWorkerNodeCount <Int32>]
[-MaxWorkerNodeCount <Int32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
[-ResourceId] <String>
[-TimeZone <String>]
[-Condition <System.Collections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightAutoscaleCondition]>]
[-Schedule]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
[-ResourceId] <String>
-AutoscaleConfiguration <AzureHDInsightAutoscale>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
[-InputObject] <AzureHDInsightCluster>
[-MinWorkerNodeCount <Int32>]
[-MaxWorkerNodeCount <Int32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
[-InputObject] <AzureHDInsightCluster>
[-TimeZone <String>]
[-Condition <System.Collections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightAutoscaleCondition]>]
[-Schedule]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
[-InputObject] <AzureHDInsightCluster>
-AutoscaleConfiguration <AzureHDInsightAutoscale>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
This cmdlet Set-AzHDInsightClusterAutoscaleConfiguration sets the autoscale configuration of an Azure HDInsight cluster.
Examples
Example 1: Set the Load-based autoscale configuration of the HDInsight cluster
$clusterResourceGroup="group"
$clusterName="MyCluster"
Set-AzHDInsightClusterAutoscaleConfiguration -ResourceGroupName $clusterResourceGroup `
-ClusterName $clusterName -MinWorkerNodeCount 3 -MaxWorkerNodeCount 5
This command sets the Load-based autoscale configuration of an Azure HDInsight cluster.
Example 2: Set the Schedule-based autoscale of the HDInsight cluster
# Create autoscale conditions
$condition1=New-AzHDInsightClusterAutoscaleScheduleCondition -Time 09:00 -WorkerNodeCount 5 -Day Monday,Wednesday
$condition2=New-AzHDInsightClusterAutoscaleScheduleCondition -Time 09:00 -WorkerNodeCount 4 -Day Friday
# Set autoscale configuration
$clusterResourceGroup="group"
$clusterName="MyCluster"
Set-AzHDInsightClusterAutoscaleConfiguration -ResourceGroupName $clusterResourceGroup -ClusterName $clusterName -Schedule -TimeZone "Pacific Standard Time" -Condition $condition1,$condition2
This command sets the Schedule-based autoscale configuration of the HDInsight cluster.
Example 3: Set the autoscale configuration of the HDInsight cluster based another cluster which has set autoscale configuration
# Get the autoscale configuration of another cluster.
$clusterResourceGroup="group"
$anotherClusterName="anotherClusterName"
$autoscaleConfig=Get-AzHDInsightClusterAutoscaleConfiguration -ResourceGroupName $clusterResourceGroup -ClusterName $anotherClusterName
# Set autoscale configuration
$clusterResourceGroup="group"
$clusterName="MyCluster"
Set-AzHDInsightClusterAutoscaleConfiguration -ResourceGroupName $clusterResourceGroup -ClusterName $clusterName `
-AutoscaleConfiguration $autoscaleConfig
This command sets the autoscale configuration of the HDInsight cluster based another cluster.
Parameters
-AsJob
Run cmdlet in the background
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AutoscaleConfiguration
Gets or sets the autoscale configuration
Type: | AzureHDInsightAutoscale |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClusterName
Gets or sets the name of the cluster.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Condition
Gets or sets the condition of schedule-based autoscale.
Type: | List<T>[AzureHDInsightAutoscaleCondition] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Gets or sets the input object.
Type: | AzureHDInsightCluster |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MaxWorkerNodeCount
Gets or sets the maximal workernode count of load-based autoscale.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MinWorkerNodeCount
Gets or sets the minimal workernode count of load-based autoscale.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Gets or sets the name of the resource group.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
Gets or sets the resource id.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Schedule
Set schedule-based parameters
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TimeZone
Gets or sets the time zone of schedule-based autoscale.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |