core-site.xml
file:Configuration Item | Value |
fs.cosn.impl | alluxio.hadoop.ShimFileSystem |
alluxio-site.properties
file:Configuration Item | Value |
alluxio.master.uri.translator.impl | alluxio.master.file.uritranslator.AutoMountUriTranslator |
alluxio.user.shimfs.bypass.ufs.impl.list | fs.cosn.impl:org.apache.hadoop.fs.cosnative.NativeCosFileSystem |
alluxio-site.properties
.fs.cosn.impl
configuration item in core-site.xml
.mount
command is one of Alluxio's most distinctive commands. It is similar to Linux's mount
command, through which users can load disks, SSDs and other storage devices to the local file system of Linux. In Alluxio, the concept of mounting is further extended to the distributed system level, that is, users can mount one or more other storage systems/cloud storage services (such as HDFS and COS) to the Alluxio distributed file system using the mount
command. So they can run distributed applications on Alluxio, such as Spark, Presto, and MapReduce, without any adaptation or even knowledge of the specific data access protocol and path. Users only need to know the path corresponding to the data in the Alluxio file system. It greatly facilitates application development and maintenance.
alluxio fs mount --option fs.cosn.userinfo.secretId=xx \\--option fs.cosn.userinfo.secretKey=xx \\--option fs.cosn.bucket.region=ap-xx \\--option fs.cosn.impl=org.apache.hadoop.fs.cosnative.NativeCosFileSystem \\--option fs.AbstractFileSystem.cosn.impl=org.apache.hadoop.fs.CosN \\--option fs.cosn.userinfo.appid=xx \\/cosn cosn://COS_BUCKET/path
--option
.Configuration Item | Description |
fs.cosn.userinfo.secretId | COS secret ID |
fs.cosn.userinfo.secretKey | COS secret key |
fs.cosn.impl | Fixed value: org.apache.hadoop.fs.CosFileSystem . |
fs.AbstractFileSystem.cosn.impl | Fixed value: org.apache.hadoop.fs.CosN . |
fs.cosn.bucket.region cos region | Region name such as ap-beijing |
fs.cosn.userinfo.appid | The AppID of root account |
COS_BUCKET COS BUCKET | Bucket name without the AppID suffix |