在 Azure HDInsight 中使用 Apache Ambari 优化群集Optimize clusters with Apache Ambari in Azure HDInsight

HDInsight 为大规模数据处理应用程序提供 Apache Hadoop 群集。HDInsight provides Apache Hadoop clusters for large-scale data processing applications. 对这些复杂的多节点群集进行管理、监视和优化可能充满挑战。Managing, monitoring, and optimizing these complex multi-node clusters can be challenging. Apache Ambari 是可用于管理和监视 HDInsight Linux 群集的 Web 界面。Apache Ambari is a web interface to manage and monitor HDInsight Linux clusters.

有关使用 Ambari Web UI 的简介,请参阅使用 Apache Ambari Web UI 管理 HDInsight 群集For an introduction to using the Ambari Web UI, see Manage HDInsight clusters by using the Apache Ambari Web UI

使用群集凭据通过 https://CLUSTERNAME.azurehdidnsight.cn 登录到 Ambari。Log in to Ambari at https://CLUSTERNAME.azurehdidnsight.cn with your cluster credentials. 初始屏幕显示了概述仪表板。The initial screen displays an overview dashboard.

Ambari 仪表板

Ambari Web UI 可用于管理主机、服务、警报、配置和视图。The Ambari web UI is used to manage hosts, services, alerts, configurations, and views. Ambari 不能用于创建 HDInsight 群集或升级服务。Ambari can't be used to create an HDInsight cluster, or upgrade services. 它也无法管理堆栈和版本、停用或重新启用主机,或向群集添加服务。Also can't manage stacks and versions, decommission or recommission hosts, or add services to the cluster.

管理群集的配置Manage your cluster's configuration

配置设置可帮助优化特定服务。Configuration settings help tune a particular service. 若要修改某个服务的配置设置,请从“服务”边栏(左侧)中选择该服务,然后在服务详细信息页中导航到“配置”选项卡。 To modify a service's configuration settings, select the service from the Services sidebar (on the left), and then navigate to the Configs tab in the service detail page.

“服务”边栏

修改 NameNode Java 堆大小Modify NameNode Java heap size

NameNode Java 堆大小取决于许多因素,例如群集上的负载。The NameNode Java heap size depends on many factors such as the load on the cluster. 此外,还有文件数和块数。Also, the numbers of files, and the numbers of blocks. 默认大小 1 GB 能够很好地满足大多数群集的需要,不过,某些工作负荷可能需要更多或更少的内存。The default size of 1 GB works well with most clusters, although some workloads can require more or less memory.

修改 NameNode Java 堆大小:To modify the NameNode Java heap size:

  1. 从“服务”边栏中选择“HDFS”,然后导航到“配置”选项卡。 Select HDFS from the Services sidebar and navigate to the Configs tab.

    HDFS 配置

  2. 找到“NameNode Java 堆大小”设置。Find the setting NameNode Java heap size. 也可以使用“筛选器”文本框键入和查找特定的设置。You can also use the filter text box to type and find a particular setting. 选择设置名称旁边的图标。Select the pen icon beside the setting name.

    NameNode Java 堆大小

  3. 在文本框中键入新值,然后按 Enter 保存更改。Type the new value in the text box, and then press Enter to save the change.

    编辑 NameNode Java 堆大小 1

  4. NameNode Java 堆大小已从 2 GB 更改为 1 GB。The NameNode Java heap size is changed to 1 GB from 2 GB.

    已编辑 NameNode Java 堆大小 2

  5. 单击配置屏幕顶部的绿色“保存”按钮保存所做的更改。Save your changes by clicking on the green Save button on the top of the configuration screen.

    保存更改

后续步骤Next steps