Druid-hdfs-extension.
After downloading the CHDFS JAR, copy chdfs_hadoop_plugin_network-1.7.jar to the Druid installation path extensions/druid-hdfs-storage and hadoop-dependencies/hadoop-client/2.x.x.conf/druid/_common/common.runtime.properties file at the Druid installation path, add the extension of HDFS to druid.extensions.loadList, specify HDFS as Druid's deep storage, and enter the path of the CHDFS instance:propertiesdruid.extensions.loadList=["druid-hdfs-storage"]druid.storage.type=hdfsdruid.storage.storageDirectory=ofs://<mountpoint>/<druid-path>
conf/druid/_common/ directory, create the HDFS configuration file hdfs-site.xml and enter the configuration information of the CHDFS instance:<?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><!--Temporary directory of the local cache. For data read/write, data will be written to the local disk when the memory cache is insufficient. This path will be created automatically if it does not exist--><property><name>fs.ofs.tmp.cache.dir</name><value>/data/chdfs_tmp_cache</value></property><!--You need to replace `appId` with your own `appid`, which can be obtained at https://console.tencentcloud.com/cam/capi--><property><name>fs.ofs.user.appid</name><value>125000001</value></property></configuration>
Feedback