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>
피드백