메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


hadoop hfs gateway를 설정하고 Client 파일 시스템에서 mount하여 사용하는 방법이 아래와 같이 Cloudera Page에 설명되어 있다. 

주의할것은 export point를 지정해야 default로 HDFS의 최상위(/)가 노출되지 않는다. 

(예를 들어 HDFS상에 /DATA/TEST/NFS를 지정하려면 아래와 같이 설정한다.

  1. HDFS폴더 생성(순서대로 한단계씩 생성할것)

      hdfs dfs -mkdir /DATA/TEST/NFS

  2. 폴더에 권한 부여(777을 부여하고 sticky bit를 설정해서 여러 사용자가 이곳을 사용할 수 있도록 한다)

       hdfs dfs -chmod 777 /DATA/TEST/NFS

       hdfs dfs -chmod +t /DATA/TEST/NFS

  3. export point 항목에 DATA/TEST/NFS를 등록하고 저장/Hadoop NFS gateway를 restart하여 반영해준다. 

)


클라이언트에서의 마운트 명령 예시(물론 /tmp/nfs는 OS상에 미리 mkdir /tmp/nfs로 만들어 두어야함)..  

  sudo mount -t nfs -o vers=3,proto=tcp,nolock xxx.xxx.xxx.xxx:/DATA/TEST/NFS /tmp/nfs


마운트된 HDFS폴더는 Client쪽에서 권한/소유자/그룹등을 변경할 수 없다.

그래서 필요시 hdfs dfs 명령으로 권한등의 속성을 바꿔 주면 /tm/nfs에 즉시 반영된다. 


 


* Adding and Configuring the NFS Gateway Role

1. Go to the HDFS service.

2. Click the Instances tab.

3. Click Add Role Instances.

4. Click the text box below the NFS Gateway field. The Select Hosts dialog box displays.

5. Select the host on which to run the role and click OK.

6. Click Continue.

7. Click the NFS Gateway role.

8. Click the Configuration tab.

9. Select Scope > NFS Gateway.

10. Select Category > Main.

11. Ensure that the requirements on the directory set in the Temporary Dump Directory property are met.

   To apply this configuration property to other role groups as needed, edit the value for the appropriate role group. See Modifying Configuration Properties Using Cloudera Manager.

12. Optionally edit Allowed Hosts and Privileges.

   To apply this configuration property to other role groups as needed, edit the value for the appropriate role group. See Modifying Configuration Properties Using Cloudera Manager.

13. Enter a Reason for change, and then click Save Changes to commit the changes.

14. Click the Instances tab.

15. Check the checkbox next to the NFS Gateway role and select Actions for Selected > Start.

번호 제목 날짜 조회 수
310 tablet별 disk사용량 확인하는 방법 2021.08.27 3754
309 Caused by: java.lang.ClassNotFoundException: org.apache.spark.Logging 발생시 조치사항 2017.04.19 3751
308 문자열을 숫자(integer)로 casting하기 2016.01.13 3751
307 mysql sqoop작업을 위해서 mysql-connector-java.jar을 추가하는 경우 확실하게 인식시키는 방법 2020.05.11 3747
306 update(update와 delete->insert)사용시 주의/참고사항 2016.01.06 3747
305 fuseki webUI를 통해서 전체 카운트를 하면 급격하게 메모리를 소모해 버리는 문제가 있음 file 2017.04.28 3742
304 small file 한개 파일로 만들기(text file 혹은 parquet file의 테이블) 2022.07.04 3740
303 impala테이블 쿼리시 max_row_size 관련 오류가 발생할때 조치사항 2020.02.12 3736
302 Hadoop의 Datanode를 Decommission하고 나서 HBase의 regionservers파일에 해당 노드명을 지웠는데 여전히 "Dead regionser"로 표시되는 경우 처리 2018.01.25 3734
301 특정 커밋 시점(commit id를 기준으로)으로 돌리기(reset) 2016.11.21 3732
300 root계정으로 MariaDB설치후 mysql -u root -p로 db에 접근하여 바로 해줘야 하는일..(케릭터셑은 utf8) 2015.10.02 3731
299 cassandra cluster 문제가 있는 node제거 하기(DN상태의 노드가 있으면 cassandra cluster 전체에 문제가 발생하므로 반드시 제거할것) 2017.06.21 3727
298 거침없이 배우는 Drools 책의 샘플소스 file 2016.07.22 3727
297 Hive JDBC Connection과 유형별 에러및 필요한 jar파일 2021.05.24 3724
296 cloudera의 hue에서 사용자가 사용한 쿼리 목록 2020.02.07 3720
295 kafka로 부터 메세지를 stream으로 받아 처리하는 spark샘플소스(spark의 producer와 consumer를 sbt로 컴파일 하고 서버에서 spark-submit하는 방법) 2016.07.13 3719
294 lagom에서 제공하는 초기 생성기능을 이용하여 생성한 프로젝트의 소스 파악 2018.01.16 3715
293 fuseki에 update하는 방법(java api이용)및 주의 사항 2015.12.30 3715
292 hadoop 어플리케이션을 사용하는 사용자 변경시 바꿔줘야 하는 부분 2016.09.23 3711
291 spark-submit 실행시 "java.lang.OutOfMemoryError: Java heap space"발생시 조치사항 2018.02.01 3710
위로