All Products
Search
Document Center

E-MapReduce:Cold Access Collection for JindoTable Tables or Partitions

Last Updated:Jun 21, 2026

The cold access collection feature for JindoTable tables or partitions records the last access time of each table or partition. This helps you identify data that has not been accessed recently, optimize your data storage strategy, and reduce costs. For example, in data analytics, you can move infrequently used partition data to a lower-cost storage medium to save money.

Prerequisites

Create an EMR cluster of version 3.35.0 or later, or version 4.9.0 or later. For more information, see Create a cluster.

Background information

SmartData 3.5.x and later versions support cold access collection for Hive, Spark, and Presto components. This feature is disabled by default. To enable it, see Enable cold access collection for Spark, Enable cold access collection for Hive, and Enable cold access collection for Presto.
Note Because cold access collection uses the same hooks or listeners as hot access collection, enabling cold access collection also enables hot access collection. For details about hot access collection for tables or partitions, see Hot access collection for JindoTable tables or partitions.

Limits

  • DLF data lake metadata is not supported.
  • The IP addresses of Hive CLI, HiveServer2, Spark SQL CLI, Spark Thriftserver, and Presto services must have permission to access the underlying metadata storage (MySQL or RDS).
  • Cold access collection is supported only for Hive, Spark, and Presto components.

Query data

JindoTable provides a command-line method to query cold access information.
  • Syntax
    jindo table -leastUseStat -n <num> [-i/-ignoreNever]

    num is the number of entries to display and must be a positive integer. -i/-ignoreNever is optional. If specified, tables or partitions that have never been accessed are excluded from the results.

  • Function

    Displays the tables or partitions that have not been accessed for the longest time.

  • Example: Query the 20 least recently accessed tables or partitions.
    jindo table -leastUseStat -n 20
    Returns three columns as shown in the following figure.cold_result
    • The first column shows the table name in the format database_name.table_name.
    • The second column shows the partition name in the format partition_key_column1=value1/partition_key_column2=value2/.... This field is empty for non-partitioned tables.
    • The third column shows the most recent access time in the format yyyy-MM-dd HH:mm:ss.
    Note For partitioned tables, only partitions are displayed. The table itself is not listed separately.

For more information about using JindoTable, see JindoTable usage instructions.

Enable cold access collection for Spark

  1. Go to the Spark page.
    1. Log on to the Alibaba Cloud E-MapReduce console.
    2. In the top menu bar, select a region and resource group as needed.
    3. Click the Clusters tab.
    4. On the Clusters page, click Details in the row of the target cluster.
    5. In the navigation pane on the left, choose Services > Spark.
  2. On the Spark service page, click the Configure tab.
  3. Search for the parameter spark.sql.queryExecutionListeners. Ensure its value includes com.aliyun.emr.table.spark.SparkSQLQueryListener. Separate multiple listeners with commas (,).
    Spark
  4. Add a custom configuration.
    1. On the Service Configuration page, click the spark-defaults tab.
    2. Click Custom Configuration in the upper-right corner.
    3. In the Add Configuration Item dialog box, set Key to spark.sql.query.update.access.time.enabled and Value to true.
      add_spark_paraname
    4. Click OK.
  5. Save the configuration.
    1. Click Save.
    2. In the Confirm dialog box, enter an Execution Reason and click OK.
  6. Restart all components.
    1. In the upper-right corner, choose Actions > Restart All Components.
    2. In the Execute Cluster Operation dialog box, enter an Execution Reason and click OK.
    3. In the Confirm dialog box, click OK.

Enable cold access collection for Hive

  1. Go to the Hive page.
    1. Log on to the Alibaba Cloud E-MapReduce console.
    2. In the top menu bar, select a region and resource group as needed.
    3. Click the Clusters tab.
    4. On the Clusters page, click Details in the row of the target cluster.
    5. In the navigation pane on the left, choose Services > Hive.
  2. On the Hive service page, click the Configure tab.
  3. Search for the parameter hive.exec.post.hooks. Ensure its value includes com.aliyun.emr.table.hive.HivePostHook. Separate multiple hooks with commas (,).
    hive
  4. Add a custom configuration.
    1. On the Service Configuration page, click the hive-site tab.
    2. Click Custom Configuration in the upper-right corner.
    3. In the Add Configuration Item dialog box, set Key to hive.hook.update.access.time.enabled and Value to true.
      add_hive_paraname
    4. Click OK.
  5. Save the configuration.
    1. Click Save.
    2. In the Confirm dialog box, enter an Execution Reason and click OK.
  6. Restart all components.
    1. In the upper-right corner, choose Actions > Restart All Components.
    2. In the Execute Cluster Operation dialog box, enter an Execution Reason and click OK.
    3. In the Confirm dialog box, click OK.

Enable cold access collection for Presto

  1. Go to the Presto page.
    1. Log on to the Alibaba Cloud E-MapReduce console.
    2. In the top menu bar, select a region and resource group as needed.
    3. Click the Clusters tab.
    4. On the Clusters page, click Details in the row of the target cluster.
    5. In the navigation pane on the left, choose Services > Presto.
  2. On the Presto service page, click the Configure tab.
  3. Search for the parameter event-listener.name. Ensure its value includes jindo-presto-post-event-listener.
    presto
  4. Add a custom configuration.
    1. On the Service Configuration page, click the event-listener.properties tab.
    2. Click Custom Configuration in the upper-right corner.
    3. In the Add Configuration Item dialog box, set Key to listener.update.access.time.enabled and Value to true.
      add_presto_paraname
    4. Click OK.
  5. Save the configuration.
    1. Click Save.
    2. In the Confirm dialog box, enter an Execution Reason and click OK.
  6. Restart all components.
    1. In the upper-right corner, choose Actions > Restart All Components.
    2. In the Execute Cluster Operation dialog box, enter an Execution Reason and click OK.
    3. In the Confirm dialog box, click OK.