Skip to content

Commit fdb8f5a

Browse files
authored
Merge pull request #77014 from dagiro/freshness73a
freshness73a
2 parents 5bc74c0 + d03d7df commit fdb8f5a

15 files changed

+70
-82
lines changed

articles/hdinsight/hadoop/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
- name: Use Azure PowerShell
290290
href: ../hdinsight-administer-use-powershell.md
291291
maintainContext: true
292-
- name: Use the Azure Classic CLI
292+
- name: Use the Azure CLI
293293
href: ../hdinsight-administer-use-command-line.md
294294
maintainContext: true
295295
- name: Manage clusters using the Apache Ambari web UI

articles/hdinsight/hbase/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
href: https://docs.microsoft.com/azure/hdinsight/hdinsight-go-sdk-overview
115115
- name: Use Azure PowerShell
116116
href: ../hdinsight-administer-use-powershell.md
117-
- name: Use the Azure Classic CLI
117+
- name: Use the Azure CLI
118118
href: ../hdinsight-administer-use-command-line.md
119119
- name: Manage clusters using the Apache Ambari web UI
120120
href: ../hdinsight-hadoop-manage-ambari.md
Lines changed: 56 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,94 @@
11
---
2-
title: Manage Apache Hadoop clusters using Azure Classic CLI - Azure HDInsight
3-
description: Learn how to use the Azure classic CLI to manage Apache Hadoop clusters in Azure HDInsight.
2+
title: Manage Azure HDInsight clusters using Azure CLI
3+
description: Learn how to use the Azure CLI to manage Azure HDInsight clusters. Cluster types include Apache Hadoop, Spark, HBase, Storm, Kafka, Interactive Query, and ML Services.
44
ms.reviewer: jasonh
55
author: tylerfox
66

77
ms.service: hdinsight
88
ms.custom: hdinsightactive,hdiseo17may2017
99
ms.topic: conceptual
10-
ms.date: 11/06/2018
10+
ms.date: 05/13/2019
1111
ms.author: tyfox
12-
1312
---
14-
# Manage Apache Hadoop clusters in HDInsight using the Azure Classic CLI
13+
14+
# Manage Azure HDInsight clusters using Azure CLI
15+
1516
[!INCLUDE [selector](../../includes/hdinsight-portal-management-selector.md)]
1617

17-
Learn how to use the [Azure Classic CLI](../cli-install-nodejs.md) to manage [Apache Hadoop](https://hadoop.apache.org/) clusters in Azure HDInsight. The classic CLI is implemented in Node.js. It can be used on any platform that supports Node.js, including Windows, Mac, and Linux.
18+
Learn how to use [Azure CLI](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest) to manage Azure HDInsight clusters. The Azure command-line interface (CLI) is Microsoft's cross-platform command-line experience for managing Azure resources.
1819

19-
[!INCLUDE [classic-cli-warning](../../includes/requires-classic-cli.md)]
20+
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
2021

2122
## Prerequisites
22-
Before you begin this article, you must have the following:
23-
24-
* **An Azure subscription**. See [Get Azure free trial](https://azure.microsoft.com/documentation/videos/get-azure-free-trial-for-testing-hadoop-in-hdinsight/).
25-
* **Azure Classic CLI** - See [Install and configure the Azure Classic CLI](../cli-install-nodejs.md) for installation and configuration information.
26-
* **Connect to Azure**, using the following command:
27-
28-
```cli
29-
azure login
30-
```
31-
32-
For more information on authenticating using a work or school account, see [Connect to an Azure subscription from the Azure Classic CLI](/cli/azure/authenticate-azure-cli).
33-
* **Switch to the Azure Resource Manager mode**, using the following command:
34-
35-
```cli
36-
azure config mode arm
37-
```
38-
39-
To get help, use the **-h** switch. For example:
40-
41-
```cli
42-
azure hdinsight cluster create -h
23+
24+
* Azure CLI. If you haven't installed the Azure CLI, see [Install the Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli) for steps.
25+
26+
* An Apache Hadoop cluster on HDInsight. See [Get Started with HDInsight on Linux](hadoop/apache-hadoop-linux-tutorial-get-started.md).
27+
28+
## Connect to Azure
29+
30+
Sign in to your Azure subscription. If you plan to use Azure Cloud Shell then simply select **Try it** in the upper-right corner of the code block. Else, enter the command below:
31+
32+
```azurecli-interactive
33+
az login
34+
35+
# If you have multiple subscriptions, set the one to use
36+
# az account set --subscription "SUBSCRIPTIONID"
4337
```
4438

45-
## Create clusters with the CLI
46-
See [Create clusters in HDInsight using the Azure Classic CLI](hdinsight-hadoop-create-linux-clusters-azure-cli.md).
39+
## List clusters
4740

48-
## List and show cluster details
49-
Use the following commands to list and show cluster details:
41+
Use [az hdinsight list](https://docs.microsoft.com/cli/azure/hdinsight?view=azure-cli-latest#az-hdinsight-list) to list clusters. Edit the commands below by replacing `RESOURCE_GROUP_NAME` with the name of your resource group, then enter the commands:
5042

51-
```cli
52-
azure hdinsight cluster list
53-
azure hdinsight cluster show <Cluster Name>
43+
```azurecli-interactive
44+
# List all clusters in the current subscription
45+
az hdinsight list
46+
47+
# List only cluster name and its resource group
48+
az hdinsight list --query "[].{Cluster:name, ResourceGroup:resourceGroup}" --output table
49+
50+
# List all cluster for your resource group
51+
az hdinsight list --resource-group RESOURCE_GROUP_NAME
52+
53+
# List all cluster names for your resource group
54+
az hdinsight list --resource-group RESOURCE_GROUP_NAME --query "[].{clusterName:name}" --output table
5455
```
5556

56-
![Command-line view of cluster list][image-cli-clusterlisting]
57+
## Show cluster
5758

58-
## Delete clusters
59-
Use the following command to delete a cluster:
59+
Use [az hdinsight show](https://docs.microsoft.com/cli/azure/hdinsight?view=azure-cli-latest#az-hdinsight-show) to show information for a specified cluster. Edit the command below by replacing `RESOURCE_GROUP_NAME`, and `CLUSTER_NAME` with the relevant information, then enter the command:
6060

61-
```cli
62-
azure hdinsight cluster delete <Cluster Name>
61+
```azurecli-interactive
62+
az hdinsight show --resource-group RESOURCE_GROUP_NAME --name CLUSTER_NAME
6363
```
6464

65-
You can also delete a cluster by deleting the resource group that contains the cluster. Please note, this will delete all the resources in the group including the default storage account.
65+
## Delete clusters
6666

67-
```cli
68-
azure group delete <Resource Group Name>
67+
Use [az hdinsight delete](https://docs.microsoft.com/cli/azure/hdinsight?view=azure-cli-latest#az-hdinsight-delete) to delete a specified cluster. Edit the command below by replacing `RESOURCE_GROUP_NAME`, and `CLUSTER_NAME` with the relevant information, then enter the command:
68+
69+
```azurecli-interactive
70+
az hdinsight delete --resource-group RESOURCE_GROUP_NAME --name CLUSTER_NAME
6971
```
7072

71-
## Scale clusters
72-
To change the Apache Hadoop cluster size:
73+
You can also delete a cluster by deleting the resource group that contains the cluster. Note, this will delete all the resources in the group including the default storage account.
7374

74-
```cli
75-
azure hdinsight cluster resize [options] <clusterName> <Target Instance Count>
75+
```azurecli-interactive
76+
az group delete --name RESOURCE_GROUP_NAME
7677
```
7778

79+
## Scale clusters
7880

79-
## Enable/disable HTTP access for a cluster
81+
Use [az hdinsight resize](https://docs.microsoft.com/cli/azure/hdinsight?view=azure-cli-latest#az-hdinsight-resize) to resize the specified HDInsight cluster to the specified size. Edit the command below by replacing `RESOURCE_GROUP_NAME`, and `CLUSTER_NAME` with the relevant information. Replace `TARGET_INSTANCE_COUNT` with the desired number of worker nodes for your cluster. For more information about scaling clusters, see [Scale HDInsight clusters](./hdinsight-scaling-best-practices.md). Enter the command:
8082

81-
```cli
82-
azure hdinsight cluster enable-http-access [options] <Cluster Name> <userName> <password>
83-
azure hdinsight cluster disable-http-access [options] <Cluster Name>
83+
```azurecli-interactive
84+
az hdinsight delete --resource-group RESOURCE_GROUP_NAME --name CLUSTER_NAME --target-instance-count TARGET_INSTANCE_COUNT
8485
```
8586

8687
## Next steps
88+
8789
In this article, you have learned how to perform different HDInsight cluster administrative tasks. To learn more, see the following articles:
8890

8991
* [Manage Apache Hadoop clusters in HDInsight by using the Azure portal](hdinsight-administer-use-portal-linux.md)
90-
* [Administer HDInsight by using Azure PowerShell][hdinsight-admin-powershell]
91-
* [Get started with Azure HDInsight][hdinsight-get-started]
92-
* [How to use the Azure Classic CLI][azure-command-line-tools]
93-
94-
[azure-command-line-tools]: ../cli-install-nodejs.md
95-
[azure-create-storageaccount]:../storage/common/storage-create-storage-account.md
96-
[azure-purchase-options]: https://azure.microsoft.com/pricing/purchase-options/
97-
[azure-member-offers]: https://azure.microsoft.com/pricing/member-offers/
98-
[azure-free-trial]: https://azure.microsoft.com/pricing/free-trial/
99-
100-
[hdinsight-admin-powershell]: hdinsight-administer-use-powershell.md
101-
[hdinsight-get-started]:hadoop/apache-hadoop-linux-tutorial-get-started.md
102-
103-
[image-cli-account-download-import]: ./media/hdinsight-administer-use-command-line/HDI.CLIAccountDownloadImport.png
104-
[image-cli-clustercreation]: ./media/hdinsight-administer-use-command-line/HDI.CLIClusterCreation.png
105-
[image-cli-clustercreation-config]: ./media/hdinsight-administer-use-command-line/HDI.CLIClusterCreationConfig.png
106-
[image-cli-clusterlisting]: ./media/hdinsight-administer-use-command-line/command-line-list-of-clusters.png "List and show clusters"
92+
* [Administer HDInsight by using Azure PowerShell](hdinsight-administer-use-powershell.md)
93+
* [Get started with Azure HDInsight](hadoop/apache-hadoop-linux-tutorial-get-started.md)
94+
* [Get started with Azure CLI](https://docs.microsoft.com/cli/azure/get-started-with-azure-cli?view=azure-cli-latest)

articles/hdinsight/hdinsight-administer-use-portal-linux.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ There are many ways you can program the process:
200200

201201
* User Azure Data Factory. See [Create on-demand Linux-based Apache Hadoop clusters in HDInsight using Azure Data Factory](hdinsight-hadoop-create-linux-clusters-adf.md) for creating on-demand HDInsight linked services.
202202
* Use Azure PowerShell. See [Analyze flight delay data](hdinsight-analyze-flight-delay-data-linux.md).
203-
* Use Azure Classic CLI. See [Manage HDInsight clusters using Azure Classic CLI](hdinsight-administer-use-command-line.md).
203+
* Use Azure CLI. See [Manage Azure HDInsight clusters using Azure CLI](hdinsight-administer-use-command-line.md).
204204
* Use HDInsight .NET SDK. See [Submit Apache Hadoop jobs](hadoop/submit-apache-hadoop-jobs-programmatically.md).
205205

206206
For the pricing information, see [HDInsight pricing](https://azure.microsoft.com/pricing/details/hdinsight/). To delete a cluster from the Portal, see [Delete clusters](#delete-clusters)
@@ -280,7 +280,7 @@ HDInsight clusters have the following HTTP web services (all of these services h
280280
* Oozie
281281
* Templeton
282282

283-
By default, these services are granted for access. You can revoke/grant the access using [Azure Classic CLI](hdinsight-administer-use-command-line.md#enabledisable-http-access-for-a-cluster) and [Azure PowerShell](hdinsight-administer-use-powershell.md#grantrevoke-access).
283+
By default, these services are granted for access. You can revoke/grant the access using [Azure PowerShell](hdinsight-administer-use-powershell.md#grantrevoke-access).
284284

285285
## Find the subscription ID
286286
Each cluster is tied to an Azure subscription. The Azure subscription ID is visible from the [cluster home page](#homePage).
@@ -312,7 +312,7 @@ The **Usage** section of the HDInsight cluster blade displays information about
312312
In this article, you have learned some basic administrative functions. To learn more, see the following articles:
313313

314314
* [Administer HDInsight Using Azure PowerShell](hdinsight-administer-use-powershell.md)
315-
* [Administer HDInsight Using Azure Classic CLI](hdinsight-administer-use-command-line.md)
315+
* [Administer HDInsight Using Azure CLI](hdinsight-administer-use-command-line.md)
316316
* [Create HDInsight clusters](hdinsight-hadoop-provision-linux-clusters.md)
317317
* [Read more about using the Apache Ambari Web UI](hdinsight-hadoop-manage-ambari.md)
318318
* [Details on using the Apache Ambari REST API](hdinsight-hadoop-manage-ambari-rest-api.md)

articles/hdinsight/hdinsight-apps-install-custom-applications.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ From the portal, you can also delete the cluster or delete the resource group wh
112112
### Use Azure PowerShell
113113
Using Azure PowerShell, you can delete the cluster or delete the resource group. See [Delete clusters by using Azure PowerShell](hdinsight-administer-use-powershell.md#delete-clusters).
114114

115-
### Use Azure Classic CLI
116-
Using Azure Classic CLI, you can delete the cluster or delete the resource group. See [Delete clusters by using Azure Classic CLI](hdinsight-administer-use-command-line.md#delete-clusters).
115+
### Use Azure CLI
116+
Using Azure CLI, you can delete the cluster or delete the resource group. See [Delete clusters by using Azure CLI](hdinsight-administer-use-command-line.md#delete-clusters).
117117

118118
## Next steps
119119
* [MSDN: Install an HDInsight application](https://msdn.microsoft.com/library/mt706515.aspx): learn how to develop Resource Manager templates for deploying HDInsight applications.

articles/hdinsight/hdinsight-hadoop-linux-information.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ The different cluster types are affected by scaling as follows:
246246
For specific information on scaling your HDInsight cluster, see:
247247

248248
* [Manage Apache Hadoop clusters in HDInsight by using the Azure portal](hdinsight-administer-use-portal-linux.md#scale-clusters)
249-
* [Manage Apache Hadoop clusters in HDInsight by using Azure PowerShell](hdinsight-administer-use-command-line.md#scale-clusters)
249+
* [Manage Apache Hadoop clusters in HDInsight by using Azure CLI](hdinsight-administer-use-command-line.md#scale-clusters)
250250

251251
## How do I install Hue (or other Hadoop component)?
252252

articles/hdinsight/hdinsight-scaling-best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Microsoft provides the following utilities to scale clusters:
2727
|[PowerShell Az](https://docs.microsoft.com/powershell/azure)|[Set-AzHDInsightClusterSize](https://docs.microsoft.com/powershell/module/az.hdinsight/set-azhdinsightclustersize) -ClusterName \<Cluster Name> -TargetInstanceCount \<NewSize>|
2828
|[PowerShell AzureRM](https://docs.microsoft.com/powershell/azure/azurerm) |[Set-AzureRmHDInsightClusterSize](https://docs.microsoft.com/powershell/module/azurerm.hdinsight/set-azurermhdinsightclustersize) -ClusterName \<Cluster Name> -TargetInstanceCount \<NewSize>|
2929
|[Azure CLI](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest)| [az hdinsight resize](https://docs.microsoft.com/cli/azure/hdinsight?view=azure-cli-latest#az-hdinsight-resize) --resource-group \<Resource group> --name \<Cluster Name> --target-instance-count \<NewSize>|
30-
|[Azure Classic CLI](hdinsight-administer-use-command-line.md)|azure hdinsight cluster resize \<clusterName> \<Target Instance Count> |
30+
|[Azure CLI](hdinsight-administer-use-command-line.md)|azure hdinsight cluster resize \<clusterName> \<Target Instance Count> |
3131
|[Azure portal](https://portal.azure.com)|Open your HDInsight cluster pane, select **Cluster size** on the left-hand menu, then on the Cluster size pane, type in the number of worker nodes, and select Save.|
3232

3333
![Scale cluster](./media/hdinsight-scaling-best-practices/scale-cluster-blade.png)

articles/hdinsight/interactive-query/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
- name: Use Azure PowerShell
206206
href: ../hdinsight-administer-use-powershell.md
207207
maintainContext: true
208-
- name: Use the Azure Classic CLI
208+
- name: Use the Azure CLI
209209
href: ../hdinsight-administer-use-command-line.md
210210
maintainContext: true
211211
- name: Manage clusters using the Apache Ambari web UI

articles/hdinsight/kafka/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
href: https://docs.microsoft.com/azure/hdinsight/hdinsight-go-sdk-overview
130130
- name: Use Azure PowerShell
131131
href: ../hdinsight-administer-use-powershell.md
132-
- name: Use the Azure Classic CLI
132+
- name: Use the Azure CLI
133133
href: ../hdinsight-administer-use-command-line.md
134134
- name: Manage clusters using the Apache Ambari web UI
135135
href: ../hdinsight-hadoop-manage-ambari.md

articles/hdinsight/r-server/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
href: https://docs.microsoft.com/azure/hdinsight/hdinsight-go-sdk-overview
128128
- name: Use Azure PowerShell
129129
href: ../hdinsight-administer-use-powershell.md
130-
- name: Use the Azure Classic CLI
130+
- name: Use the Azure CLI
131131
href: ../hdinsight-administer-use-command-line.md
132132
- name: Manage clusters using the Apache Ambari web UI
133133
href: ../hdinsight-hadoop-manage-ambari.md

articles/hdinsight/spark/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
href: https://docs.microsoft.com/azure/hdinsight/hdinsight-go-sdk-overview
232232
- name: Use Azure PowerShell
233233
href: ../hdinsight-administer-use-powershell.md
234-
- name: Use the Azure Classic CLI
234+
- name: Use the Azure CLI
235235
href: ../hdinsight-administer-use-command-line.md
236236
- name: Manage clusters using the Apache Ambari web UI
237237
href: ../hdinsight-hadoop-manage-ambari.md

articles/hdinsight/storm/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
href: https://docs.microsoft.com/azure/hdinsight/hdinsight-go-sdk-overview
108108
- name: Use Azure PowerShell
109109
href: ../hdinsight-administer-use-powershell.md
110-
- name: Use the Azure Classic CLI
110+
- name: Use the Azure CLI
111111
href: ../hdinsight-administer-use-command-line.md
112112
- name: Manage clusters using the Apache Ambari web UI
113113
href: ../hdinsight-hadoop-manage-ambari.md

0 commit comments

Comments
 (0)