메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

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


1. cloudera에서 사용하는 db를 외부 db정보로 변경한다.

  cloudera MANAGER -> Clusters->Configuration->Database Settings에서 각각 변경시켜준다.

  (rm /etc/cloudera-scm-server/db.mgmt.properties를 실행시켜 주어야 db설정정보가 없어져서 다시 설정할 수 있게된다.)


2. 외부 db에 db밑 테이블 생성

가. Hue

  cloudera MANAGER -> Clusters -> Hue -> Actions -> Create Hue Database (db생성)

  cloudera MANAGER -> Clusters -> Hue -> Actions -> Synchronize database (테이블 생성)


나. Oozie

  cloudera MANAGER -> Clusters -> Hue -> Actions -> Create Oozie Server Database (db생성)

  cloudera MANAGER -> Clusters -> Hue -> Actions -> Create Oozie Database Tables (테이블 생성)


다. Navigator Audit Server


라 Hive

  cloudera MANAGER -> Clusters -> Hive-> Actions -> Create Hive Metastore Database (db생성)

  cloudera MANAGER -> Clusters -> Hive-> Actions -> Create Hive Metastore database tables (테이블 생성)


  // hive-site.xml에 설정되는 값을 기준으로 설정할때 사용됨

  cloudera MANAGER -> Clusters -> Hive-> Configuration-> Auto Create and Upgrade Hive Metastore Database Schema (db생성)


3. db를 직접생성하는 방법및 생성 대상(mysql에 접속하여 필요한 db및 사용자를 생성하고 변경사항을 반영한다.(flush privileges;)) -필요시 실행

create database amon DEFAULT CHARACTER SET utf8;
grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'amon_password';

create database rman DEFAULT CHARACTER SET utf8;
grant all on rman.* TO 'rman'@'%' IDENTIFIED BY 'rman_password';

create database metastore DEFAULT CHARACTER SET utf8;
grant all on metastore.* TO 'hive'@'%' IDENTIFIED BY 'hive_password';

create database sentry DEFAULT CHARACTER SET utf8;
grant all on sentry.* TO 'sentry'@'%' IDENTIFIED BY 'sentry_password';

create database nav DEFAULT CHARACTER SET utf8;
grant all on nav.* TO 'nav'@'%' IDENTIFIED BY 'nav_password';

create database navms DEFAULT CHARACTER SET utf8;
grant all on navms.* TO 'navms'@'%' IDENTIFIED BY 'navms_password';

create database hue DEFAULT CHARACTER SET utf8;
grant all on hue.* TO 'hue'@'%' IDENTIFIED BY 'hue_password';

create database oozie DEFAULT CHARACTER SET utf8;
grant all on oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie_password';

create database scm DEFAULT CHARACTER SET utf8;
grant all on scm.* TO 'scm'@'%' IDENTIFIED BY 'scm_password';

* SCM DB접속 정보는 아래 파일에 있음
sudo vi  /etc/cloudera-scm-server/db.properties

4. scm용 db생성(cloudera-scm-server가 설치된 곳에서 아래의 script를 실행시켜준다.)

*참고 : https://www.gooper.com/ss/bigdata/6524


sudo /usr/share/cmf/schema/scm_prepare_database.sh mysql -h gsda3 -P 3306 -utest -ptest --scm-host gsda1 scm scm scm_password

-->실행결과

JAVA_HOME=/usr/lib/jvm/java-7-oracle-cloudera

Verifying that we can write to /etc/cloudera-scm-server

Creating SCM configuration file in /etc/cloudera-scm-server

Executing:  /usr/lib/jvm/java-7-oracle-cloudera/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/cmf/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.

log4j:ERROR Could not find value for key log4j.appender.A

log4j:ERROR Could not instantiate appender named "A".

[2018-05-22 23:05:24,063] INFO     0[main] - com.cloudera.enterprise.dbutil.DbCommandExecutor.testDbConnection(DbCommandExecutor.java) - Successfully connected to database.

All done, your SCM database is configured correctly!



* 기타참고

https://community.cloudera.com/t5/Cloudera-Manager-Installation/scm-prepare-database-sh/td-p/23423


http://community.cloudera.com/t5/Cloudera-Manager-Installation/Configure-Cloudera-Manager-with-external-database-AWS-RDS-MySQL/m-p/52582#M9958


http://community.cloudera.com/t5/Cloudera-Manager-Installation/Foreign-Key-issue-creating-SCM-repository-in-MySQL-database/td-p/2523

번호 제목 날짜 조회 수
330 javax.net.ssl.SSLHanshakeException: SSLHandshakeException invoking https://mainCluster.gooper.com:7183/api/v1/users: sun.security.validator.ValidatorException: No trusted certificate found 2022.06.29 3867
329 우분투 16.04 설치후 APM (Apache2, PHP, MySQL) 설치 2017.01.29 3867
328 TransmitData() to failed: Network error: Recv() got EOF from remote (error 108) 오류 현상 2019.02.15 3865
327 [shell script] 파일을 한줄씩 읽어서 파일내용으로 명령문 만들고 실행하는 shell script예제 2017.02.21 3859
326 Cloudera Manager재설치하는 동안 "Host is in bad health"오류가 발생하는 경우 확인/조치 사항 2018.05.24 3858
325 impala테이블 쿼리시 max_row_size 관련 오류가 발생할때 조치사항 2020.02.12 3854
324 DeviceType이 o:motion-sensor_33 이거나 o:motion-sensor_32 경우의 sparql문장은 다음과 같다. 2017.08.16 3854
323 impala external 테이블 생성시 컬럼과 라인 구분자를 지정하여 테이블 생성하는 예시 2020.02.20 3851
322 streaming작업시 입력된 값에 대한 사본을 만들게 되는데 이것이 실패했을때 발생하는 경고메세지 2017.04.03 3841
321 Mountable HDFS on CentOS 6.x(hadoop 2.7.2의 nfs기능을 이용) 2016.11.24 3840
320 [oneM2M]Ontologies used for oneM2M 2017.08.02 3832
319 bash는 PS1 변수를 통해 프롬프트의 모양을 바꿀 수 있다. 2016.03.30 3825
318 update(update와 delete->insert)사용시 주의/참고사항 2016.01.06 3820
317 solr vs elasticsearch 비교2 2014.09.29 3817
316 Building a Cluster docs 2014.04.22 3816
315 Not enough replica available for query at consistency QUORUM가 발생하는 경우 2017.06.21 3814
314 Ubuntu 16.04 LTS에서 사이트에 무료인증서를 이용하여 SSL적용 file 2017.05.23 3813
313 SASL configuration failed: javax.security.auth.login.LoginException: java.lang.NullPointerException 오류 해결방법 2015.04.02 3813
312 [TLS]pkcs12형식의 인증서 생성및 jks형식 인증서 생성 커맨드 예시 2022.03.15 3811
311 kudu의 내부 table명 변경하는 방법 2022.11.10 3809
위로