Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Az.HDInsight Syntax Errors #17597

Merged
merged 2 commits into from
Apr 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ New-AzHDInsightClusterConfig `
| Add-AzHDInsightClusterIdentity `
-AadTenantId $tenantId `
-ObjectId $objectId `
-Application $applicationId
-ApplicationId $applicationId
-CertificateFilePath $certificateFilePath `
-CertificatePassword $certificatePassword `
| New-AzHDInsightCluster `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The Add-AzHDInsightComponentVersion cmdlet adds a version for a service running
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | %{ $_.Key1 }
-Name $storageAccountName | ForEach-Object{ $_.Key1 }
$storageContainer = "container001"

# Cluster configuration info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $clusterUsersGroupDNs=("groupdn1","groupdn2")
# Create the cluster
New-AzHDInsightClusterConfig `
| Add-AzHDInsightSecurityProfile `
-Domain $domain `
-DomainResourceId $domain `
-DomainUserCredential $domainUserCredential `
-OrganizationalUnitDN $organizationalUnitDN `
-LdapsUrls $ldapsUrls `
Expand Down
2 changes: 1 addition & 1 deletion src/HDInsight/HDInsight/help/Add-AzHDInsightStorage.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $secondStorageAccountResourceGroupName = "Group"
$secondStorageAccountName = "yourstorageacct002"
$secondStorageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $secondStorageAccountResourceGroupName `
-Name $secondStorageAccountName | %{ $_.Key1 }
-Name $secondStorageAccountName | ForEach-Object{ $_.Key1 }

# Create the cluster
New-AzHDInsightClusterConfig `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This cmdlet **Disable-AzHDInsightAzureMonitor** disables Azure Monitor in a spec
# Cluster info
$clusterName = "your-hadoop-001"
$resourceGroupName = "Group"
Disable-AzHDInsightAzureMonitor -ClusterName $clusterName -ResourceGroup $resourceGroupName
Disable-AzHDInsightAzureMonitor -ClusterName $clusterName -ResourceGroupName $resourceGroupName
```

This cmdlet disables the azure monitor in a specified HDInsight cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $clusterName = "your-hadoop-001"
$resourceGroupName = "Group"
$workspaceId = "your-workspace-id"
$primaryKey = "your-primary-key"
Enable-AzHDInsightAzureMonitor -ClusterName $clusterName -ResourceGroup $resourceGroupName -WorkspaceId $workspaceId -PrimaryKey $primaryKey
Enable-AzHDInsightAzureMonitor -ClusterName $clusterName -ResourceGroupName $resourceGroupName -WorkspaceId $workspaceId -PrimaryKey $primaryKey
```

This cmdlet enables the azure monitor in a specified HDInsight cluster.
Expand Down
26 changes: 13 additions & 13 deletions src/HDInsight/HDInsight/help/New-AzHDInsightCluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The cmdlet may call below Microsoft Graph API according to input parameters:
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
Expand Down Expand Up @@ -150,7 +150,7 @@ This command creates a cluster in the current subscription.
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
Expand Down Expand Up @@ -194,7 +194,7 @@ This command creates a cluster in the current subscription.
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}}
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
Expand Down Expand Up @@ -229,7 +229,7 @@ This command creates a cluster in the current subscription.
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
Expand Down Expand Up @@ -269,7 +269,7 @@ This command creates a cluster in the current subscription.
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
Expand Down Expand Up @@ -304,7 +304,7 @@ This command creates a cluster in the current subscription.
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
Expand Down Expand Up @@ -343,7 +343,7 @@ This command creates a cluster in the current subscription.
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
Expand Down Expand Up @@ -384,7 +384,7 @@ This command creates a cluster in the current subscription.
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageManagedIdentity = "yourstorageusermanagedidentity"
$storageFileSystem = "filesystem01"
$storageAccountType=AzureDataLakeStorageGen2
$storageAccountType = "AzureDataLakeStorageGen2"

# Cluster configuration info
$location = "East US 2"
Expand Down Expand Up @@ -436,7 +436,7 @@ This command creates a cluster in the current subscription.
$clusterUserGroupDns = "dominusergroup"
$ldapUrls = "ldaps://{your domain name}:636"

$clusterTier = Premium
$clusterTier = "Premium"
$vnetId = "yourvnetid"
$subnetName = "yoursubnetname"
$assignedIdentity = "your user managed assigned identity resourcee id"
Expand All @@ -446,7 +446,7 @@ This command creates a cluster in the current subscription.

# Create the cluster
New-AzHDInsightCluster `
-ClusteTier $clusterTier `
-ClusterTier $clusterTier `
-ClusterType Hadoop `
-ClusterSizeInNodes 3 `
-ResourceGroupName $clusterResourceGroupName `
Expand All @@ -470,7 +470,7 @@ This command creates a cluster in the current subscription.
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
Expand Down Expand Up @@ -511,7 +511,7 @@ This command creates a cluster in the current subscription.
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
Expand Down Expand Up @@ -562,7 +562,7 @@ This command creates a cluster in the current subscription.
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}
-Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | ForEach-Object{$_.Value}
$storageContainer = "container002"

# Cluster configuration info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ipConfigName="ipconfig"
$privateIPAllocationMethod="dynamic"
$subnetId=$vnetId+"/subnets/"+$subnetName
# Create Private IP configuration
$ipConfiguration= New-AzHDInsightIPConfiguration -Name $ipConfigName PrivateIPAllocationMethod $privateIPAllocationMethod -SubnetId $subnetId -Primary
$ipConfiguration= New-AzHDInsightIPConfiguration -Name $ipConfigName -PrivateIPAllocationMethod $privateIPAllocationMethod -SubnetId $subnetId -Primary
```

This creates the ip configuration object in memory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ipConfigName="ipconfig"
$privateIPAllocationMethod="dynamic"
$subnetId=$vnetId+"/subnets/"+$subnetName
# Create Private IP configuration
$ipConfiguration= New-AzHDInsightIPConfiguration -Name $ipConfigName PrivateIPAllocationMethod $privateIPAllocationMethod -SubnetId $subnetId -Primary
$ipConfiguration= New-AzHDInsightIPConfiguration -Name $ipConfigName -PrivateIPAllocationMethod $privateIPAllocationMethod -SubnetId $subnetId -Primary

$privateLinkConfigurationName="plconfig"
$groupId="headnode"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ $clusterCreds = Get-Credential
$statusFolder = "tempStatusFolder/"
$query = "SHOW TABLES"

New-AzHDInsightStreamingMapReduceJobDefinition -StatusFolder $statusFolder `
-Query $query `
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-File $query `

New-AzHDInsightStreamingMapReduceJobDefinition -StatusFolder $statusFolder -File $query `
| Start-AzHDInsightJob `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ $autoscaleConfig=Get-AzHDInsightClusterAutoscaleConfiguration -ResourceGroupName
$clusterResourceGroup="group"
$clusterName="MyCluster"
Set-AzHDInsightClusterAutoscaleConfiguration -ResourceGroupName $clusterResourceGroup -ClusterName $clusterName `
-Autoscale $autoscaleConfig
-AutoscaleConfiguration $autoscaleConfig
```

This command sets the autoscale configuration of the HDInsight cluster based another cluster.
Expand Down
4 changes: 2 additions & 2 deletions src/HDInsight/HDInsight/help/Set-AzHDInsightDefaultStorage.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $storageAccountName = "yourstorageaccountname"
$storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name $storageAccountName)[0].value


$storageContainer = "container002"
$storageType = "AzureStorage"

# Cluster configuration info
$location = "East US 2"
Expand All @@ -49,7 +49,7 @@ New-AzHDInsightClusterConfig `
| Set-AzHDInsightDefaultStorage `
-StorageAccountResourceId $storageAccountResourceId `
-StorageAccountKey $key2 `
-StorageContainer $storageContainer `
Copy link
Contributor

@ziyuezh576 ziyuezh576 Mar 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

36: $storageType = "AzureStorage"
...
52: -StorageAccountType $storageType `

-StorageAccountType $storageType `
| New-AzHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
Expand Down