Release Notes
Announcements

fs.ofs.tmp.cache.dir.find / -name "chdfs*"find / -name "temrfs_hadoop*"
temrfs_hadoop_plugin and chdfs_hadoop_plugin jar packages exist in the environment, and that the chdfs_hadoop_plugin version is 2.7 or higher.

chdfs_hadoop_plugin version, run the following actions.sh update_cos_jar.sh https://hadoop-jar-beijing-1259378398.cos.ap-beijing.myqcloud.com/hadoop_plugin_network/2.7
fs.cosn.bucket.region. fs.cosn.trsf.fs.ofs.bucket.region This parameter specifies the COS region where the bucket is located, for example: ap-shanghai.fs.cosn.bucket.region and fs.cosn.trsf.fs.ofs.bucket.region are mandatory configurations used to specify the COS region where the bucket is located, for example ap-shanghai. To obtain the region corresponding to the bucket, see COS Region Documentation.core-site.xml to all Hadoop nodes.hadoop fs -ls cosn://${bucketname-appid}/ (where bucketname-appid is the mount point, i.e., the bucket name). If the file list is displayed normally, it indicates that the COS bucket has been successfully mounted.
classpath path of each server in the Hadoop cluster./usr/local/service/hadoop/share/hadoop/common/lib/; should be placed according to actual conditions, as the location may vary across different components.hadoop-env.sh file. Go to the $HADOOP_HOME/etc/hadoop directory, edit the hadoop-env.sh file, and add the following content to include the COSN-related jar packages in the Hadoop environment variables.for f in $HADOOP_HOME/share/hadoop/tools/lib/*.jar; doif [ -n "$HADOOP_CLASSPATH" ]; thenHADOOP_CLASSPATH="$HADOOP_CLASSPATH:$f"elseHADOOP_CLASSPATH="$f"fidoneexport HADOOP_CLASSPATH
Configuration Item | Configuration Item Content | Description |
fs.AbstractFileSystem.ofs.impl | com.qcloud.chdfs.fs.CHDFSDelegateFSAdapter | Metadata bucket access implementation class |
fs.ofs.impl | com.qcloud.chdfs.fs.CHDFSHadoopFileSystemAdapter | Metadata bucket access implementation class |
fs.ofs.tmp.cache.dir | Format: /data/emr/hdfs/tmp/posix-cosn/ | Please set an actual existing local directory where temporary files generated during operation will be temporarily stored. It is also recommended to configure sufficient space and permissions for this directory on each node, for example: /data/emr/hdfs/tmp/posix-cosn/ |
fs.ofs.user.appid | Format: 12500000000 | Required. User appid |
fs.ofs.bucket.region | Format: ap-beijing | Required. The region corresponding to the user's bucket |
core-site.xml configuration reference example:<!--ofs implementation class--><property><name>fs.AbstractFileSystem.ofs.impl</name><value>com.qcloud.chdfs.fs.CHDFSDelegateFSAdapter</value></property><!--ofs implementation class--><property><name>fs.ofs.impl</name><value>com.qcloud.chdfs.fs.CHDFSHadoopFileSystemAdapter</value></property><!--Temporary directory for local cache. For read/write data, when the memory cache is insufficient, data will be written to the local disk. If this path does not exist, it will be created automatically--><property><name>fs.ofs.tmp.cache.dir</name><value>/data/chdfs_tmp_cache</value></property><!--User's appId, which can be viewed by logging in to the Tencent Cloud console (https://console.tencentcloud.com/developer)--><property><name>fs.ofs.user.appid</name><value>1250000000</value></property><!--Region information for the user's bucket, in a format such as ap-guangzhou--><property><name>fs.ofs.bucket.region</name><value>ap-guangzhou</value></property>
Configuration Item | Configuration Item Content | Description |
fs.cosn.userinfo.secretId/secretKey | format like ************************************ | Fill in your account's API key information. If needed, log in to the CAM console to view TencentCloud API keys. |
fs.cosn.impl | org.apache.hadoop.fs.CosFileSystem | The implementation class of cosn for FileSystem is fixed as org.apache.hadoop.fs.CosFileSystem. |
fs.AbstractFileSystem.cosn.impl | org.apache.hadoop.fs.CosN | The implementation class of cosn for AbstractFileSystem is fixed as org.apache.hadoop.fs.CosN. |
fs.cosn.bucket.region | format such as ap-beijing | Please fill in the region information for the bucket to be accessed. For values, see Regions and Access Domains for region abbreviations, such as ap-beijing, ap-guangzhou, etc. Compatible with the original configuration: fs.cosn.userinfo.region. |
fs.cosn.tmp.dir | Default/tmp/hadoop_cos | Please set an actual existing local directory where temporary files generated during operation will be temporarily stored. It is also recommended to configure sufficient space and permissions for this directory on each node. |
trsf.fs.ofs to COSN configuration items to implement configuration mapping. Required configuration items are as follows:Configuration Item | Configuration Item Content | Description |
fs.cosn.trsf.fs.AbstractFileSystem.ofs.impl | com.qcloud.chdfs.fs.CHDFSDelegateFSAdapter | Metadata bucket access implementation class |
fs.cosn.trsf.fs.ofs.impl | com.qcloud.chdfs.fs.CHDFSHadoopFileSystemAdapter | Metadata bucket access implementation class |
fs.cosn.trsf.fs.ofs.tmp.cache.dir | Format: /data/emr/hdfs/tmp/posix-cosn/ | Please set an actual existing local directory where temporary files generated during operation will be temporarily stored. It is also recommended to configure sufficient space and permissions for this directory on each node, for example: /data/emr/hdfs/tmp/posix-cosn/ |
fs.cosn.trsf.fs.ofs.user.appid | Format: 12500000000 | Required. User appid |
fs.cosn.trsf.fs.ofs.bucket.region | Format: ap-beijing | Required. The region corresponding to the user's bucket |
core-site.xml configuration reference example:<!--API key information for the account. You can log in to the [CAM console](https://console.tencentcloud.com/capi) to view TencentCloud API keys.--><!--It is recommended to use sub-account keys or temporary keys for configuration to enhance security. When granting permissions to sub-accounts, please follow the [Principle of Least Privilege](https://www.tencentcloud.com/document/product/436/32972).--><property><name>fs.cosn.userinfo.secretId/secretKey</name><value>************************************</value></property><!--cosn implementation class--><property><name>fs.AbstractFileSystem.cosn.impl</name><value>org.apache.hadoop.fs.CosN</value></property><!--cosn implementation class--><property><name>fs.cosn.impl</name><value>org.apache.hadoop.fs.CosFileSystem</value></property><!--Region information for the user's bucket, in a format such as ap-guangzhou--><property><name>fs.cosn.bucket.region</name><value>ap-guangzhou</value></property><!--Local temporary directory for storing temporary files generated during operation--><property><name>fs.cosn.tmp.dir</name><value>/tmp/hadoop_cos</value></property><!--ofs implementation class--><property><name>fs.cosn.trsf.fs.AbstractFileSystem.ofs.impl</name><value>com.qcloud.chdfs.fs.CHDFSDelegateFSAdapter</value></property><!--ofs implementation class--><property><name>fs.cosn.trsf.fs.ofs.impl</name><value>com.qcloud.chdfs.fs.CHDFSHadoopFileSystemAdapter</value></property><!--Temporary directory for local cache. For read/write data, when the memory cache is insufficient, data will be written to the local disk. If this path does not exist, it will be created automatically--><property><name>fs.cosn.trsf.fs.ofs.tmp.cache.dir</name><value>/data/chdfs_tmp_cache</value></property><!--User's appId, which can be viewed by logging in to the Tencent Cloud console (https://console.tencentcloud.com/developer)--><property><name>fs.cosn.trsf.fs.ofs.user.appid</name><value>1250000000</value></property><!--Region information for the user's bucket, in a format such as ap-guangzhou--><property><name>fs.cosn.trsf.fs.ofs.bucket.region</name><value>ap-guangzhou</value></property>
hadoop fs -ls cosn://${bucketname-appid}/ (where bucketname-appid is the mount point, i.e., the bucket name). If the file list is displayed normally, it indicates that the COS bucket has been successfully mounted.
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários