Archive storage class files normally require a restore operation before you can read them — a process that can take hours. ArchiveDirectRead removes this wait by letting you read Archive storage class files in the OSS-Hadoop Distributed File System (HDFS) service directly, without restoring them first. This is useful for workloads that need occasional, real-time access to infrequently accessed data.
Prerequisites
Before you begin, make sure you have:
An Elastic Compute Service (ECS) instance. For more information, see Create an instance.
The OSS-HDFS service activated. For more information, see Activate the OSS-HDFS service.
Permissions to enable ArchiveDirectRead. Your Alibaba Cloud account has this permission by default. To use a Resource Access Management (RAM) user instead, grant the user the required permissions. For more information, see Authorize a RAM user to access the OSS-HDFS service from a non-EMR cluster.
Limits
ArchiveDirectRead applies only to Archive storage class files in OSS-HDFS buckets. Files in other storage classes are not supported.
Billing
When you access an Archive object that has not been restored, you are charged Archive data retrieval fees (RetrievalDataArchiveDirect) based on the size of the data accessed. Accessing a restored Archive object does not incur retrieval fees. For more information, see Data processing fees.
Retrieval fees are calculated based on the data read range specified in the request header when the HTTP connection is established — not the amount of data actually transferred. If you close the connection early, you are still charged for the full requested range. For example, if you request a 100 MB–200 MB range but close the connection after reading 1 byte, you are charged for 100 MB.
Enable ArchiveDirectRead for a bucket
Connect to your ECS instance. For more information, see Connect to an ECS instance.
Download the Jindofs SDK (version 6.2.5).
Configure your AccessKey pair and set the environment variable.
Go to the
bindirectory of the extracted Jindofs SDK package. The following example usesjindofs-sdk-x.x.x-linux. Replace the package name with your actual version.cd jindofs-sdk-x.x.x-linux/bin/Create a configuration file named
jindofs.cfgin thebindirectory and add your AccessKey pair.[client] fs.oss.accessKeyId = <your-access-key-id> fs.oss.accessKeySecret = <your-access-key-secret>Set the
JINDOSDK_CONF_DIRenvironment variable to the absolute path ofjindofs.cfg.export JINDOSDK_CONF_DIR=<absolute-path-to-jindofs-cfg>
Enable ArchiveDirectRead for the bucket. The following example enables ArchiveDirectRead for a bucket named
examplebucketin the China (Shanghai) region. Replace the region and bucket name with your actual values../jindofs admin -putConfig -dlsUri oss://examplebucket.cn-shanghai.oss-dls.aliyuncs.com/ -conf namespace.archive.directread.enable=trueVerify the configuration. Run the following command to confirm ArchiveDirectRead is enabled:
./jindofs admin -getConfig -dlsUri oss://examplebucket.cn-shanghai.oss-dls.aliyuncs.com/ -name namespace.archive.directread.enableThe expected output is:
namespace.archive.directread.enable: true
What's next
After enabling ArchiveDirectRead, you can perform read operations on archived objects — such as downloading files, viewing file information, and copying files — without restoring them first.
If you need to restore archived objects instead, see Temporarily restore archived objects.