Dela via


Add-AzureRmHDInsightComponentVersion

Lägger till en version för en tjänst som körs i ett kluster i ett klusterkonfigurationsobjekt.

Varning

AzureRM PowerShell-modulen är officiellt inaktuell från och med den 29 februari 2024. Användare rekommenderas att migrera från AzureRM till Az PowerShell-modulen för att säkerställa fortsatt support och uppdateringar.

Även om AzureRM-modulen fortfarande kan fungera, underhålls den inte längre eller stöds, vilket gör att användaren kan välja och riskera fortsatt användning. Se våra migreringsresurser för vägledning om övergången till Az-modulen.

Syntax

Add-AzureRmHDInsightComponentVersion
   [-Config] <AzureHDInsightConfig>
   [-ComponentName] <String>
   [-ComponentVersion] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Cmdleten Add-AzureRmHDInsightComponentVersion lägger till en version för en tjänst som körs i ett kluster i Azure HDInsight-konfigurationsobjektet som skapats av cmdleten New-AzureRmHDInsightClusterConfig.

Exempel

Exempel 1: Lägg till en version för Spark i klusterkonfigurationsobjektet.

PS C:\> # Primary storage account info
        $storageAccountResourceGroupName = "Group"
        $storageAccountName = "yourstorageacct001"
        $storageAccountKey = Get-AzureStorageAccountKey `
            -ResourceGroupName $storageAccountResourceGroupName `
            -Name $storageAccountName | %{ $_.Key1 }
        $storageContainer = "container001"

        # Cluster configuration info
        $location = "East US 2"
        $clusterResourceGroupName = "Group"
        $clusterName = "your-spark-001"
        $clusterCreds = Get-Credential
        $sshClusterCreds = Get-Credential

        # If the cluster's resource group doesn't exist yet, run:
        #   New-AzureRmResourceGroup -Name $clusterResourceGroupName -Location $location

        # Create the cluster
        New-AzureRmHDInsightClusterConfig `
            | Add-AzureRmHDInsightComponentVersion `
                -ComponentName "Spark" `
                -ComponentVersion "2.0" `
            | New-AzureRmHDInsightCluster `
                -ClusterType Spark `
                -OSType Linux `
                -ClusterSizeInNodes 4 `
                -ResourceGroupName $clusterResourceGroupName `
                -ClusterName $clusterName `
                -HttpCredential $clusterCreds `
                -Location $location `
                -DefaultStorageAccountName "$storageAccountName.blob.core.contoso.net" `
                -DefaultStorageAccountKey $storageAccountKey `
                -DefaultStorageContainer $storageContainer `
                -SshCredential $sshCredentials `
                -Version "3.5"

Det här kommandot lägger till versionen av Spark i HDInsight-klustret med namnet "your-spark-001".

Parametrar

-ComponentName

Typ:String
Position:1
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ComponentVersion

Typ:String
Position:2
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-Config

Typ:AzureHDInsightConfig
Position:0
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-Confirm

Uppmanar dig att bekräfta innan du kör cmdleten.

Typ:SwitchParameter
Alias:cf
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-DefaultProfile

Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure

Typ:IAzureContextContainer
Alias:AzureRmContext, AzureCredential
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-WhatIf

Typ:SwitchParameter
Alias:wi
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

Indata

AzureHDInsightConfig

Parametrar: Config (ByValue)

Utdata

AzureHDInsightConfig