All Products
Search
Document Center

Lindorm:Configure cold storage

Last Updated:Mar 28, 2026

To reduce storage costs for infrequently accessed data — such as archived IoT sensor readings, historical order records, or application audit logs — assign cold storage to a table or column family in LindormTable. Data assigned to cold storage moves to Capacity storage and stops counting against your instance's default storage quota. This topic explains how to configure cold storage using Lindorm Shell or the ApsaraDB for HBase API for Java.

Limits

  • Cold storage requires LindormTable V2.1.8 or later.

  • Cold storage must be enabled on the Lindorm instance before you can configure it on a table or column family.

  • For read IOPS limits that apply to Capacity storage, see Limits on the read IOPS of Capacity storage.

Prerequisites

Before you begin, ensure that you have:

Configure cold storage using Lindorm Shell

Create a table with cold storage

When creating a table, set STORAGE_POLICY to COLD on the column family:

create 'coldTable', {NAME => 'f', STORAGE_POLICY => 'COLD'}

Switch an existing column family to cold storage

Run alter to update the storage policy on an existing column family:

alter 'coldTable', {NAME=>'f', STORAGE_POLICY => 'COLD'}
Important

If the column family already contains data, the data is archived to cold storage only after a major compaction completes.

Switch back to hot storage

To revert a column family to the default hot storage tier:

alter 'coldTable', {NAME=>'f', STORAGE_POLICY => 'DEFAULT'}

Configure cold storage using ApsaraDB for HBase API for Java

Create a table with cold storage

Set STORAGE_POLICY to AliHBaseConstants.STORAGETYPE_COLD on the column family descriptor before calling createTable:

Admin admin = connection.getAdmin();
HTableDescriptor descriptor = new HTableDescriptor(TableName.valueOf("coldTable"));
HColumnDescriptor cf = new HColumnDescriptor("f");
// Set the storage type of the column family to cold storage.
cf.setValue("STORAGE_POLICY", AliHBaseConstants.STORAGETYPE_COLD);
descriptor.addFamily(cf);
admin.createTable(descriptor);

Switch an existing column family to cold storage

Retrieve the table descriptor, update the column family's storage policy, and call modifyTable:

Admin admin = connection.getAdmin();
TableName tableName = TableName.valueOf("coldTable");
HTableDescriptor descriptor = admin.getTableDescriptor(tableName);
HColumnDescriptor cf = descriptor.getFamily("f".getBytes());
// Set the storage type of the column family to cold storage.
cf.setValue("STORAGE_POLICY", AliHBaseConstants.STORAGETYPE_COLD);
admin.modifyTable(tableName, descriptor);
Important

If the column family already contains data, the data is archived to cold storage only after a major compaction completes.

Switch back to hot storage

Set STORAGE_POLICY to AliHBaseConstants.STORAGETYPE_DEFAULT to revert the column family to hot storage:

Admin admin = connection.getAdmin();
TableName tableName = TableName.valueOf("coldTable");
HTableDescriptor descriptor = admin.getTableDescriptor(tableName);
HColumnDescriptor cf = descriptor.getFamily("f".getBytes());
// Set the storage type of the column family to hot storage (default).
cf.setValue("STORAGE_POLICY", AliHBaseConstants.STORAGETYPE_DEFAULT);
admin.modifyTable(tableName, descriptor);

What's next