본문 바로가기

ALL162

[Ranger] REST API Query History (hiveServer2, impala) 🌠 REST API URL http://localhost:6080/service/assets/accessAudit?page=0&pageSize=25&total_pages=55&totalCount=1363&startIndex=0&sortBy=eventTime&excludeServiceUser=true&startDate=03%2F30%2F2021 [파라미터 설명] > startDate=03%2F30%2F2021 (03/30/2021) > 조회 결과 agentID에 hiveServer2, impala로 쿼리 구분 가능 2021. 4. 8.
[리눅스] 여러 서버 원격 작업 (parallel-ssh, ssh remote shell) 리눅스에서 여러 서버들 동시에 작업할 때 유용한 2가지 방법입니다. (parallel-ssh를 추천) ◾ parallel-ssh 설치 및 사용 1. 다운 및 설치 pssh-2.3.1.tar.gz 다운 (https://code.google.com/archive/p/parallel-ssh/downloads/) tar xvzf pssh-2.3.1.tar.gz cd pssh-2.3.1 python setup.py install 2. 작업 host 파일 작성 vi allnodes ------------------------------ cdpwork01 cdpwork02 cdpwork03 ------------------------------ 3. keygen 생성 및 배포 ssh-keygen chmod 700 ... 2021. 3. 4.
CDSW jobs api 호출 Python 코드 ◾ start import sys, requests if len(sys.argv) > 1: job_id = sys.argv[1] else : print ("Please Input Job ID") exit() url = "http://cdsw.local.com/api/v1/projects/admin/python-example/jobs/" + job_id + "/start" user = "ua64c7h1ghddrbyexf5rf9svbbwhnsl1" password = "" headers = {'Content-Type': 'application/json; charset=utf-8'} r = requests.post(url, auth=(user,password), headers=headers) if r.stat.. 2021. 2. 19.
Docker custom image 생성 방법 (with CDSW) 1. Dockerfile 생성 $ vi Dockerfile ------------------------------------------------------------------- # Dockerfile # Specify a Cloudera Data Science Workbench base image FROM docker.repository.cloudera.com/cdsw/engine:13 # Update packages on the base image and install beautifulsoup4 RUN pip3 install beautifulsoup4 ------------------------------------------------------------------- 2. Dockerfile b.. 2021. 1. 8.
kudu 명령어 정리 ◾ 테이블 생성 (as select) CREATE TABLE temp.kudu_cm_audits PRIMARY KEY (audit_id) STORED AS KUDU TBLPROPERTIES ('kudu.num_tablet_replicas' = '1') AS SELECT * FROM temp.cm_audits ; ◾ 테이블 생성 (range partition) CREATE TABLE IF NOT EXISTS temp.kudu_sample( gubun string, seq int, code string, description string, total_emp int, salary int, PRIMARY KEY(gubun,seq) ) PARTITION BY RANGE(gubun)( PARTITION VALUE .. 2020. 12. 23.
[NiFi] Impala JDBC DBCPConnectionPool 사용 예제 1. Impala JDBC Connector 다운로드 https://www.cloudera.com/downloads/connectors/impala/jdbc/2-6-17.html 2. NiFi DBCPConnectionPool 설정 Database Driver Location(s) 업로드한 파일 경로 입력 /opt/cloudera/parcels/CFM/NIFI/lib/ImpalaJDBC42.jar 경로를 지정하지 않을 경우 아래와 같은 에러가 발생함 Validation query 입력해주면 좋음 (select 1) Could not initialize class com.cloudera.impala.jdbc42.internal.apache.thrift.transport.TSocket 3. Impala SQ.. 2020. 10. 14.
쿠버네티스 명령어 (with CDSW) ◾ 쿠버네티스 pod 리스트 조회 kubectl get pods --all-namespaces -o wide ◾ pod 접속 kubectl exec -it 팟이름 -n 네임스페이스 /bin/bash ex) kubectl exec -it 5w1ixw5q39iqvcfi -n default-user-1 /bin/bash ◾ pod 로그 확인 방법 ## f 옵션은 실시간 확인 kubectl logs -f 5w1ixw5q39iqvcfi -n default-user-1 ## pod init 로그 확인 (Init:CrashLoopBackOff, Init:Error 발생할 때 확인) ## init-container name은 describe 명령어 실행으로 확인 가능 kubectl logs 5w1ixw5q39iqvcf.. 2020. 10. 13.
Cloudera Streams Messaging Manager Installation 🚫 ERROR org.flywaydb.core.api.FlywayException: Unable to instantiate JDBC driver class not found exception com.mysql.cj.jdbc.driver 💡 SOLVED https://docs.cloudera.com/cdp-private-cloud-base/latest/installation/topics/csp-configuring-schema-registry-metadata-stores-in-mysql.html 2020. 9. 17.