您现在访问的是微软AZURE全睃版技术文档网站,若需覝访问由世纪互蝔违蝥的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

使用浏览器、PowerShell 或 Azure CLI 删除 HDInsight 群集Delete an HDInsight cluster using your browser, PowerShell, or the Azure CLI

创建群集后便开始 HDInsight 群集计费,删除群集后停止计费。HDInsight cluster billing starts once a cluster is created and stops when the cluster is deleted. 计费每分钟按比例收费,因此,当不再使用群集时,应始终将其删除。Billing is pro-rated per minute, so you should always delete your cluster when it's no longer in use. 在本文档中,了解如何使用Azure 门户Azure PowerShell Az 模块Azure CLI删除群集。In this document, you learn how to delete a cluster using the Azure portal, Azure PowerShell Az module, and the Azure CLI.

重要

删除 HDInsight 群集时不会删除与群集关联的 Azure 存储帐户或 Data Lake Storage。Deleting an HDInsight cluster does not delete the Azure Storage accounts or Data Lake Storage associated with the cluster. 可重新使用以后存储在这些服务中的数据。You can reuse data stored in those services in the future.

Azure 门户Azure portal

  1. 登录 Azure 门户Sign in to the Azure portal.

  2. 在左侧菜单中,导航到“所有服务” > “分析” > “HDInsight 群集”,然后选择群集。From the left menu, navigate to All services > Analytics > HDInsight clusters and select your cluster.

  3. 在默认视图中,选择“删除” 图标。From the default view, select the Delete icon. 按提示删除群集。Follow the prompt to delete your cluster.

    HDInsight "删除群集" 按钮

Azure PowerShellAzure PowerShell

在下面的代码中,将 CLUSTERNAME 替换为 HDInsight 群集的名称。Replace CLUSTERNAME with the name of your HDInsight cluster in the code below. 在 PowerShell 提示符处输入以下命令,以便删除群集:From a PowerShell prompt, enter the following command to delete the cluster:

Remove-AzHDInsightCluster -ClusterName CLUSTERNAME

Azure CLIAzure CLI

在下面的代码中,将 CLUSTERNAME 替换为 HDInsight 群集的名称,将 RESOURCEGROUP 替换为资源组的名称。Replace CLUSTERNAME with the name of your HDInsight cluster, and RESOURCEGROUP with the name of your resource group in the code below. 在命令提示符处输入以下命令,以便删除群集:From a command prompt, enter the following to delete the cluster:

az hdinsight delete --name CLUSTERNAME --resource-group RESOURCEGROUP