CHDFSの作成
権限グループの作成
権限ルールの作成
マウントポイントの作成
CHDFSのマウント
CAMを使用してアクセス権限を付与します
Javaコードを介してCHDFSにアクセスします
ファイルシステムの削除
chdfs_hadoop_plugin_network-1.7.jarをDruidインストールパスextensions/druid-hdfs-storageおよびhadoop-dependencies/hadoop-client/2.x.xにコピーします。conf/druid/_common/common.runtime.propertiesファイルを変更し、hdfsのextensionをdruid.extensions.loadListに追加すると同時に、hdfsをDruidのdeep storageとして指定します。そして、パスはCHDFSのパスとして入力します。propertiesdruid.extensions.loadList=["druid-hdfs-storage"]druid.storage.type=hdfsdruid.storage.storageDirectory=ofs://<mountpoint>/<druid-path>
conf/druid/_common/下に、hdfsの設定ファイルhdfs-site.xmlを新規作成し、CHDFSの設定情報などを入力します。<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!--Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License. See accompanying LICENSE file.--><!-- Put site-specific property overrides in this file. --><configuration><property><name>fs.AbstractFileSystem.ofs.impl</name><value>com.qcloud.chdfs.fs.CHDFSDelegateFSAdapter</value></property><property><name>fs.ofs.impl</name><value>com.qcloud.chdfs.fs.CHDFSHadoopFileSystemAdapter</value></property><!--ローカルcacheの一時ディレクトリ。データの読み取りと書き込みの場合、メモリcacheが不足すると、ローカルディスクに書き込まれます。このパスが存在しない場合は、自動的に作成されます--><property><name>fs.ofs.tmp.cache.dir</name><value>/data/chdfs_tmp_cache</value></property><!--appIdユーザーは、ご自身のappidに変更する必要があります。https://console.tencentcloud.com/cam/capiから取得できます--><property><name>fs.ofs.user.appid</name><value>125000001</value></property></configuration>
フィードバック