Tencent COS

This guide describes how to configure Alluxio with Tencent COS (Cloud Object Storage) as the under storage system. Tencent Cloud Object Storage (COS) is a distributed storage service offered by Tencent Cloud for massive data and accessible via HTTP/HTTPS protocols. It can store massive amounts of data and features imperceptible bandwidth and capacity expansion, making it a perfect data pool for big data computation and analytics.

Prerequisites

Alluxio runs on multiple machines in cluster mode so its binary package needs to be deployed on the machines.

Before using COS with Alluxio, either create a new bucket or use an existing one. Additionally, identify the directory you wish to use within that bucket, whether by creating a new directory or selecting an existing one. For this guide, the COS bucket name is COS_BUCKET, the directory within the bucket is COS_DATA, and the bucket region is COS_REGION.

Basic Setup

For the general mount mechanism and UnderFileSystem CR field reference, see Underlying Storage.

An example ufs.yaml to create a COS mount point with the operator:

apiVersion: k8s-operator.alluxio.com/v1
kind: UnderFileSystem
metadata:
  name: alluxio-cos
  namespace: alx-ns
spec:
  alluxioCluster: alluxio-cluster
  path: cos://<COS_BUCKET>/<COS_DIRECTORY>
  mountPath: /cos
  mountOptions:
    fs.cos.access.key: <COS_ACCESS_KEY>
    fs.cos.secret.key: <COS_ACCESS_KEY_SECRET>
    fs.cos.region: <COS_REGION>
    fs.cos.app.id: <COS_APP_ID>

The full name of a COS bucket is <COS_BUCKET>-<COS_APP_ID>. The value of the path should only include the <COS_BUCKET> portion with the <COS_APP_ID> part omitted, resulting in cos://<COS_BUCKET>/<COS_DIRECTORY>. Make sure to set fs.cos.app.id to <COS_APP_ID>.

Advanced Setup

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

Enabling HTTPS

To enable the use of the HTTPS protocol for secure communication with COS with an additional layer of security for data transfers, configure the following setting in conf/alluxio-site.properties:

COS multipart upload

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.

There are other parameters you can specify in conf/alluxio-site.properties to potentially speed up the upload.

Disable COS multipart upload, the upload method uploads one file completely from start to end in one go. you need to modify conf/alluxio-site.properties to include:

Setting Request Retry Policy

For retry configuration that applies to all object store UFS types, see Request Retry Policy in the UFS overview.

Last updated