All Products
Search
Document Center

E-MapReduce:Manage logs

Last Updated:Mar 26, 2026

E-MapReduce (EMR) clusters generate logs from open source components like HDFS, Spark, and Hive. Log Management integrates EMR with Simple Log Service (SLS) so you can query these logs directly in the EMR console—without switching tools or manually configuring log collection.

Prerequisites

Before you begin, ensure that you have:

Limitations

  • Log Management is available only for DataLake, DataFlow, Online Analytical Processing (OLAP), DataServing, and Hadoop clusters.

  • Log shipping is supported for the following services: Hadoop Distributed File System (HDFS), YARN, YARN application, Hive, Spark, JindoData, Tez, Flink, HBase, ZooKeeper, Kafka, Presto, Kudu, Impala, Flume, StarRocks, ClickHouse, Kyuubi, RSS, and host.

Usage notes

  • SLS charges for log storage and indexed traffic at standard rates. For more information, see Billable items.

  • If you use a Resource Access Management (RAM) user, grant the AliyunLogFullAccess permission to the RAM user from the RAM console using your Alibaba Cloud account. For more information, see Grant permissions to a RAM user.

Enable log shipping

  1. Go to the Logs page.

    1. Log on to the EMR console. In the left-side navigation pane, click EMR on ECS.

    2. In the top menu bar, select a region and resource group.

    3. On the EMR on ECS page, click the Cluster ID of the target cluster.

    4. In the left navigation pane, click the Logs tab.

  2. Configure the log shipping scope.

    1. On the Logs page, click Set Log Shipping Scope in the upper-right corner. log

    2. In the dialog box, configure the project for log storage.

      Select an existing project or create a new one.

      Important

      A project cannot be changed after it is selected.

    3. Select the services for which you want to ship logs, then click OK.

  3. View service logs.

    1. From the Please select EMR service drop-down list, select the service whose logs you want to view.

    2. On the log analysis page, analyze the logs. Specify a time range and a search statement to run real-time queries. For example, analyze the distribution of a field over a period of time, or filter and count access records based on specific conditions.

Disable log shipping

Important

Disabling real-time log shipping does not automatically delete the project. To avoid ongoing SLS charges, go to the Simple Log Service console and delete the project you configured for log shipping. For more information, see Manage a project.

  1. On the Logs page, click Disable Log Shipping in the upper-right corner.

  2. In the dialog box, click OK.

Manage SLS projects

On the Logs page, click Go To Log Service Console to open the SLS console. In the SLS console, set the log retention period and modify Logstore configurations.

Log field details

Field nameDescription
__source__The internal IP address of the node.
__tag__:__hostname__The hostname of the node.
__tag__:__path__The log storage path.
__tag__:__user_defined_id__The custom identifier that SLS defines for the cluster.
__tag__:_aliyun_user_id_The UID of the Alibaba Cloud account.
__tag__:_ecs_id_The ID of the ECS instance.
__tag__:_main_cluster_id_The ID of the EMR cluster.
__tag__:_role_The node name. Example: core-1-1.
__topic__The log topic. Used to classify log content.
contentThe raw log content, which is usually a complete log record.
levelThe log level: INFO, WARN, ERROR, or DEBUG.
messageThe log message, which is the main information part after parsing.
threadThe thread that generated the log.
timeThe time when the log was generated.

Asset details

Custom projects and dedicated Logstores

Specify a custom project. The system then creates a dedicated Logstore named emr_<EMR_service_name>_log in that project. For example, the Logstore for the host service is emr_host_log.

Important
  • Do not delete the SLS projects and Logstores associated with EMR logs before disabling Log Management. Doing so purges stored logs and prevents new logs from being delivered to SLS.

  • If you previously enabled the pay-by-ingested-data billing method, the system creates a dedicated Logstore that uses this billing method by default. To switch to the pay-by-feature billing method, modify the Logstore configuration. For more information, see Manage Logstore configurations.

Dedicated dashboards

No dedicated dashboards are provided. Create custom dashboards to display query results. For more information, see Create a dashboard.

Billing

FAQ

Q: SLS is activated and the required permissions are granted. Why do I still see "Service log collection is not enabled for this resource. Go to the Log Management page of the cluster in the EMR console to enable it."?

log

The services for log shipping haven't been configured for this cluster yet. Click Set Log Shipping Scope to complete the configuration.