Before you enable the OSS-HDFS service, you need to understand the relationships between the OSS-HDFS service and features of Object Storage Service (OSS). This way, you can properly use the OSS-HDFS service and prevent data loss.

Warning After you enable the OSS-HDFS service for a bucket, the data that is written by using the service is stored in the .dlsdata/ directory in which OSS-HDFS data is stored. To ensure the availability of the OSS-HDFS service or prevent data loss, do not perform write operations on the .dlsdata/ directory or on objects in the directory by using methods that are not supported by the OSS-HDFS service. For example, do not perform the following write operations: rename the directory, delete the directory, and delete objects.

The following table describes the risks that you need to take note of before you enable the OSS-HDFS service and use OSS features to perform write operations on the .dlsdata/ directory.

OSS feature Risk Description References
Retention policy Data cannot be deleted.

We recommend that you do not enable the OSS-HDFS service and configure retention policies for a bucket at the same time.

If you enable the OSS-HDFS service and configure a retention policy for a bucket, and then delete data from the .dlsdata/ directory by using the methods that are supported by the OSS-HDFS service, a message that indicates that the data is successfully deleted is displayed. However, OSS still retains the deleted data in the retention period that is specified for the retention policy and OSS cannot recognize and delete the data after the retention period expires.

Retention policies
Lifecycle rule Data is lost.

To configure or modify a lifecycle rule to match all objects in a bucket for which the OSS-HDFS service is enabled, use the NOT element to exclude the objects that are stored in the .dlsdata/ directory. This helps prevent object deletion operations or storage class conversion operations that are triggered by the lifecycle rule from affecting data read and write operations on OSS-HDFS data.

lifecycle
Versioning Data cannot be automatically deleted.

We recommend that you do not enable the OSS-HDFS service and versioning for a bucket at the same time.

If you enable versioning for a bucket with the OSS-HDFS service enabled, data that is overwritten or deleted is saved as previous versions. When you overwrite or delete data in the .dlsdata/ directory by using the methods that are supported by the OSS-HDFS service, a message that indicates that the data is successfully overwritten or deleted is displayed. OSS retains the data that is overwritten or deleted as previous versions because versioning is enabled for the bucket.

In this case, you can specify version IDs to delete previous versions of objects from the .dlsdata/ directory.

Delete directories Data is lost.

To ensure the availability of the OSS-HDFS service or prevent data loss, do not delete the .dlsdata/ directory in which OSS-HDFS data is stored in a bucket for which the OSS-HDFS service is enabled.

Delete directories
Delete objects Data is lost.

To ensure the availability of the OSS-HDFS service or prevent data loss, do not delete objects from the .dlsdata/ directory in which OSS-HDFS data is stored in a bucket for which the OSS-HDFS service is enabled.

Delete objects
Rename directories Data is lost.

To ensure the availability of the OSS-HDFS service or prevent data loss, do not rename the .dlsdata/ directory in which OSS-HDFS data is stored in a bucket for which hierarchical namespace and the OSS-HDFS service are enabled.

Rename directories
Rename objects Data is lost.

To ensure the availability of the OSS-HDFS service or prevent data loss, do not rename objects in the .dlsdata/ directory in which OSS-HDFS data is stored in a bucket for which the OSS-HDFS service is enabled.

Rename objects
Upload objects Data is lost.

To ensure the availability of the OSS-HDFS service or prevent data loss, do not upload objects by using methods that are not supported by the OSS-HDFS service to the .dlsdata/ directory in which OSS-HDFS data is stored in a bucket for which the OSS-HDFS service is enabled.

Simple upload
Change the storage classes of objects Data cannot be accessed and billing rules change.

We recommend that you do not change the storage classes of objects in the .dlsdata/ directory in which OSS-HDFS data is stored in a bucket for which the OSS-HDFS service is enabled.

If you change the storage class of an object in the .dlsdata/ directory to Infrequent Access (IA), you can use the OSS-HDFS service to access the object. If you change the storage class of the object to Archive or Cold Archive, you cannot use the OSS-HDFS service to access the object. If you want to access the object, restore the Archive or Cold Archive object.

If you change the storage class of an object to IA, Archive, or Cold Archive, you are charged storage fees based on the object size and storage duration when you access the IA object, or storage fees based on the object size and storage duration and data retrieval fees when you access the Archive or Cold Archive object. If the object size is smaller than 64 KB and the object is stored for a period of time that is shorter than the minimum storage duration, the minimum billable size 64 KB and the minimum storage duration are used for billing.

Bucket policy Data cannot be accessed.

You can configure a bucket policy to authorize other users to access specified resources that are stored in a bucket for which the OSS-HDFS service is enabled.

When you configure a bucket policy that takes effect on the entire bucket, you cannot set Authorized Operation to None. This helps ensure that users who use the OSS-HDFS service can access the .dlsdata/ directory in which OSS-HDFS data is stored and the objects in the directory.

Overview
Resource Access Management (RAM) Data cannot be accessed.

When you enable the OSS-HDFS service for a bucket, the AliyunOSSDlsDefaultRole role is automatically created and the AliyunOSSDlsRolePolicy policy is attached to the role. To ensure that users who use the OSS-HDFS service can access the .dlsdata/ directory in which OSS-HDFS data is stored and the objects in the directory, do not delete the role or modify the policy that is attached to the role.

Enable OSS-HDFS and grant access permissions
Bucket inventory Data is contaminated.

To ensure the availability of the OSS-HDFS service or prevent data from being contaminated, do not set Inventory List Path to .dlsdata/ when you create an inventory for a bucket with the OSS-HDFS service enabled.

Bucket inventory
Logging Data is contaminated.

To ensure the availability of the OSS-HDFS service or prevent data from being contaminated, do not set Log Prefix to .dlsdata/ when you configure logging for a bucket with the OSS-HDFS service enabled.

Configure logging
ZIP package decompression Data is contaminated or lost.

To ensure the availability of the OSS-HDFS service or prevent data loss or data from being contaminated, do not set Destination Directory to .dlsdata/ when you configure ZIP package decompression rules for a bucket with the OSS-HDFS service enabled.

Configure decompression rules for ZIP packages