Access archived objects in the OSS-HDFS service in real time without restoration

更新时间:
复制 MD 格式

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:

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.

Important

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

  1. Connect to your ECS instance. For more information, see Connect to an ECS instance.

  2. Download the Jindofs SDK (version 6.2.5).

  3. Configure your AccessKey pair and set the environment variable.

    1. Go to the bin directory of the extracted Jindofs SDK package. The following example uses jindofs-sdk-x.x.x-linux. Replace the package name with your actual version.

      cd jindofs-sdk-x.x.x-linux/bin/
    2. Create a configuration file named jindofs.cfg in the bin directory and add your AccessKey pair.

      [client]
      fs.oss.accessKeyId = <your-access-key-id>
      fs.oss.accessKeySecret = <your-access-key-secret>
    3. Set the JINDOSDK_CONF_DIR environment variable to the absolute path of jindofs.cfg.

      export JINDOSDK_CONF_DIR=<absolute-path-to-jindofs-cfg>
  4. Enable ArchiveDirectRead for the bucket. The following example enables ArchiveDirectRead for a bucket named examplebucket in 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=true
  5. Verify 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.enable

    The 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.