All Products
Search
Document Center

Object Storage Service:Real-time access to archived objects in OSS-HDFS service without restoration

Last Updated:May 08, 2025

ArchiveDirectRead enables direct access to files within the archive storage class in the OSS-HDFS service, eliminating the need for prior restoration. This feature is suitable for occasional access to extremely infrequently accessed data.

Prerequisites

Limitation

Real-time access of Archive objects can be used to access only Archive objects stored in buckets for which OSS-HDFS is enabled.

Billing

  • After you enable real-time access of Archive objects for a bucket, when you access Archive objects that are not restored in the bucket, you are charged Archive data retrieval fees based on the size of accessed Archive data (RetrievalDataArchiveDirect). When you access Archive objects that are restored in the bucket, you are not charged Archive data retrieval fees. For more information, see Data processing fees.

  • The size of directly accessed Archive data depends on the data range specified in the request headers when an HTTP connection is established. Early disconnection does not affect the size of directly accessed data that has been requested. For example, if disconnection occurs after 1 byte of data is read, and the data range specified in the request is 100 MB~200 MB, the size of directly accessed Archive data is calculated as 100 MB~200 MB.

Procedure

  1. Connect to your ECS instance. For detailed instructions, see Connect to the ECS instance.

  2. Download the Jindofs SDK.

  3. Configure the AccessKey pair and environment variables.

    1. Go to the bin directory of the installed JindoFS SDK JAR package.

      The following sample code provides an example on how to go to the bin directory of the jindofs-sdk-x.x.x-linux JAR package. If you use a different version of JindoFS SDK, replace the package name with the name of the corresponding JindoFS SDK JAR package.

      cd jindofs-sdk-x.x.x-linux/bin/
    2. Create a configuration file named jindofs.cfg in the bin directory and configure the AccessKey pair of your Alibaba Cloud account or the AccessKey pair of a RAM user that has the required permissions.

      [client]
      fs.oss.accessKeyId = <key>              
      fs.oss.accessKeySecret = <secret>
    3. Configure environment variables.

      Note

      Replace <JINDOSDK_CONF_DIR> with the absolute path of the jindofs.cfg configuration file.

      export JINDOSDK_CONF_DIR=<JINDOSDK_CONF_DIR>
  4. Enable real-time access of Archive objects.

    To enable ArchiveDirectRead for the examplebucket in the China East 1 (Shanghai) region, use the following example. Adjust the region and bucket name as needed for other regions.

    ./jindofs admin -putConfig -dlsUri oss://examplebucket.cn-shanghai.oss-dls.aliyuncs.com/ -conf namespace.archive.directread.enable=true
  5. Check the ArchiveDirectRead configuration for the bucket.

    ./jindofs admin -putConfig -dlsUri oss://examplebucket.cn-shanghai.oss-dls.aliyuncs.com/ -name namespace.archive.directread.enable

    The response below indicates that real-time access of Archive objects is enabled for the bucket.

    namespace.archive.directread.enable: true

What to do next

After you enable real-time access of Archive objects for a bucket, you can directly perform read operations — such as downloading, viewing metadata, and copying — on Archive objects without the need to restore them beforehand.

Reference

If real-time access of Archive objects is not enabled, you must restore the Archive objects before you can access them. For how to restore Archive objects, see Temporarily restore Archive objects.