Aliyun OSS
Last updated
Last updated
This guide describes how to configure as Alluxio's under storage system.
Aliyun Object Storage Service (OSS) is a massive, secure and highly reliable cloud storage service provided by Alibaba Cloud. OSS provides multiple storage classes to help you manage and reduce storage costs.
For more information about Aliyun OSS, please read its
Before you get started, please ensure you have the required information listed below:
<OSS_BUCKET>
<OSS_DIRECTORY>
The directory you want to use in the bucket, either by creating a new directory or using an existing one
<OSS_ACCESS_KEY_ID>
<OSS_ACCESS_KEY_SECRET>
<OSS_ENDPOINT>
Use the to add a new mount point, specifying the Alluxio path to create the mount on and the OSS path as the UFS URI. Credentials and configuration options can also be specified as part of the mount command by specifying the --option
flag as described by .
An example command to mount oss://<OSS_BUCKET>/<OSS_DIRECTORY>
to /oss
:
Note that if you want to mount the root of the OSS bucket, add a trailing slash after the bucket name (e.g. oss://OSS_BUCKET/
).
Note that configuration options can be specified as mount options or as configuration properties in conf/alluxio-site.properties
. The following sections will describe how to set configurations as properties, but they can also be set as mount options via --option <key>=<value>
.
To enable the use of the HTTPS protocol for secure communication with OSS with an additional layer of security for data transfers, configure the following setting in conf/alluxio-site.properties:
The default upload method uploads one file completely from start to end in one go. We use multipart-upload method to upload one file by multiple parts, every part will be uploaded in one thread. It won't generate any temporary files while uploading.
To enable OSS multipart upload, you need to modify conf/alluxio-site.properties
to include:
There are other parameters you can specify in conf/alluxio-site.properties
to potentially speed up the upload.
Sometimes there may be an error in accessing UFS because the server is temporarily unable to respond. You can configure a retry policy for UFS requests.
Each I/O request sent to UnderFS like getObject, putObject, MultipartUpload, Alluxio will check the response. If the response is an error, and the error code suggests it may be retryable, the request will be resubmitted according to the retry policy in configuration. Alluxio will keep trying until the request is successful or reaches the maximum number of retries. The wait interval between successive retries will gradually increase from the configured base sleep time to the maximum sleep time.
The following error codes are categorized as retryable: 500 HTTP_INTERNAL_ERROR
, 502 HTTP_BAD_GATEWAY
, 503 HTTP_UNAVAILABLE
, 503 Slow Down
, and 504 HTTP_GATEWAY_TIMEOUT
.
Note:
4xx status code usually represents client errors, such as NOT_FOUND, PERMISSION_DENIED, UNAUTHENTICATED, etc. Such errors should never be retried since the issue is on the client side.
5xx status code usually represents server errors, but not all 5xx error should be retried. For example, 501 HTTP_NOT_IMPLEMENTED
should not be retried.
If you want to set the retry policy for the UFS accessing request, you need to modify conf/alluxio-site.properties
to include:
or use an existing bucket
ID used to identify a user. See
Secret used to verify the identity of the user. See
Endpoints are the domain names that other services can use to access OSS. See