管理 Azure HDInsight 中的磁盘空间Manage disk space in Azure HDInsight

本文介绍在与 Azure HDInsight 群集交互时出现的问题的故障排除步骤和可能的解决方案。This article describes troubleshooting steps and possible resolutions for issues when interacting with Azure HDInsight clusters.

Hive 日志配置Hive log configurations

  1. 在 Web 浏览器中导航到 https://CLUSTERNAME.azurehdinsight.cn,其中的 CLUSTERNAME 是群集的名称。From a web browser, navigate to https://CLUSTERNAME.azurehdinsight.cn, where CLUSTERNAME is the name of your cluster.

  2. 导航到“Hive” > “配置” > “高级” > “高级 hive-log4j”。Navigate to Hive > Configs > Advanced > Advanced hive-log4j. 查看以下设置:Review the following settings:

    • hive.root.logger=DEBUG,RFA 列中的一个值匹配。hive.root.logger=DEBUG,RFA. 这是默认值,将日志级别修改为 INFO 即可输出较少的日志条目。This is the default value, modify the log level to INFO to print less logs entries.

    • log4jhive.log.maxfilesize=1024MB 列中的一个值匹配。log4jhive.log.maxfilesize=1024MB. 这是默认值,可以根据需要进行修改。This is the default value, modify as desired.

    • log4jhive.log.maxbackupindex=10 列中的一个值匹配。log4jhive.log.maxbackupindex=10. 这是默认值,可以根据需要进行修改。This is the default value, modify as desired. 如果省略了该参数,则生成的日志文件会是无限的。If the parameter has been omitted, the generated log files will be endless.

Yarn 日志配置Yarn log configurations

查看以下配置:Review the following configurations:

  • Apache AmbariApache Ambari

    1. 在 Web 浏览器中导航到 https://CLUSTERNAME.azurehdinsight.cn,其中的 CLUSTERNAME 是群集的名称。From a web browser, navigate to https://CLUSTERNAME.azurehdinsight.cn, where CLUSTERNAME is the name of your cluster.

    2. 导航到“Hive” > “配置” > “高级” > “资源管理器”。Navigate to Hive > Configs > Advanced > Resource Manager. 确保选中“启用日志聚合” 。Ensure Enable Log Aggregation is checked. 如果禁用该项,则当应用程序完成或终止时,名称节点会将日志保存在本地,而不会将它们聚合到远程存储中。If disabled, name nodes will keep the logs locally and not aggregate them in remote store on application completion or termination.

  • 确保群集大小适合工作负荷。Ensure that the cluster size is appropriate for the workload. 工作负载可能最近发生了变化,或者群集的大小可能已重设。The workload might have changed recently or the cluster might have been resized. 纵向扩展群集,使之与更高的工作负载匹配。Scale up the cluster to match a higher workload.

  • /mnt/resource 中可能填充了孤立的文件(资源管理器重启时就是如此)。/mnt/resource might be filled with orphaned files (as in the case of resource manager restart). 如有必要,请手动清理 /mnt/resource/hadoop/yarn/log/mnt/resource/hadoop/yarn/localIf necessary, manually clean /mnt/resource/hadoop/yarn/log and /mnt/resource/hadoop/yarn/local.

后续步骤Next steps

如果你的问题未在本文中列出,或者无法解决问题,请访问以下渠道以获取更多支持:If you didn't see your problem or are unable to solve your issue, visit the following channel for more support:

  • 如果需要更多帮助,可以从 Azure 门户提交支持请求。If you need more help, you can submit a support request from the Azure portal.