Apache Kafka - Docker를 통한 환경 셋팅
·
DataPipeline/Kafka
Kafka 운영시에는 AWS EC2에 설치하거나 온프로미스 서버에 환경셋팅 한다. 최근에는 쿠버네티스를 통해 운영하기도하는데, 로컬에서 테스트 및 이것저것 Toy Project하기에는 도커로 설치하는게 가장 심플하다. 도커 이미지는 bitnami image를 사용한다. confluentinc image도 있지만 bitnami가 pull 횟수가 가장 많다. kafka는 zookeeper 이미지도 설치해야한다. KRaft라고 zookeeper없이 설치하는 방법도 있지만 대부분의 문서가 kafka-zookeeper 한 set으로 설명하고 있고 HBase와 같이 zookeeper와 함께 사용하고 있는 프로그램들이 있기에 익숙해지는 것이 좋다. [ 프로젝트 설정 ] 일단 프로젝트를 만든다. 이 글에선 Pychar..
Prometheus - PromQL 예제 (Prometheus Query Language)
·
DataPipeline/Prometheus
[ Data Types ] String - 문자열 변수 Scalar - 숫자 변수 Instant vector - a set of time series containing a single sample for each time series, all sharing the same timestamp Range vector - a set of time series containing a range of data points over time for each time series [ String ] Example: "this is a string" 'these are unescaped: \n \\ \t' `these are not unescaped: \n ' " \t` [ Scalar ] Examples: 23 -..
Prometheus - 설치
·
DataPipeline/Prometheus
[ 아키텍처 ] 시계열 데이터를 스크래핑하고 저장하는 프로메테우스 메인 서버응용 프로그램 코드 계측을 위한 클라이언트 라이브러리Short-lived Job 지원을 위한 게이트웨이HAProxy, StatsD, Graphite 등과 같은 서비스를 Exporter.Alter Manager다양한 지원 도구   [ 설치 ]Download$ wget https://github.com/prometheus/prometheus/releases/download/v2.32.1/prometheus-2.32.1.linux-amd64.tar.gz$ tar -xvf prometheus-2.32.1.linux-amd64.tar.gz 설정파일 : prometheus.yml global: # 얼마나 자주 scrap할 건지 scrap..
Elasticsearch - index template
·
DataPipeline/Elasticsearch
[ Index template ] 보통 날짜별로 elasticsearch에 index를 생성하여 사용하는데 매번 데이터가 들어올 때 마다 mapping을 통해 field type을 지정하지 않기 위해 Index template를 사용한다. 생성 예시 * 일별로 log-20220101, log-20220101 형식으로 인덱스 생성된다. PUT _template/log_template { "order": 0, "index_patterns": [ "log-20*" ], "settings": { "index": { "number_of_shards": "1", "number_of_replicas": "1", } }, "mappings": { "properties": { "user_id": { "type": "lo..
Elasticsearch - Reindex
·
DataPipeline/Elasticsearch
1. Temp index 생성 PUT users_temp 2. Temp index에 타입 Mapping PUT users_temp/_mapping { "properties": { "location": { "type": "geo_point" } } } 3. Re-index를 Temp index에 실행 POST _reindex { "source": { "index": "users" }, "dest": { "index": "users_temp" } } 4. User index 삭제 DELETE /users 5. 다시 User index 생성 PUT users 6. User index mapping PUT users/_mapping { "properties": { "location": { "type": "geo..
Elasticsearch - Opendistro Kibana 유저 확인, 추가, 삭제
·
DataPipeline/Elasticsearch
kibana역시 다른 BI툴과 같이 해당 유저의 Id/Password, Role을 정의할 수 있다.path: /usr/share/elasticsearch/plugins/opendistro_security/securityconfig로그인 유저 설정파일 : internal_users.yml  역할 설정파일 : roles.yml역할 맵핑 설정파일 : roles_mapping.yml tenants관련 설정파일 : tenants.yml   [ user 추가 ] 유저확인1. curl명령어로 유저 확인$ curl -GET https://localhost:9200/_opendistro/_security/api/internalusers/ -u 'admin:admin' --insecure 2. 유저 정보가 저장되어있는 설..
Elasticsearch - Opendistro 와 Kibana 설치
·
DataPipeline/Elasticsearch
Elasticsearch의 무료버전인 Opendistro 설치과정 [ opendistro 설치 ] 가이드를 보고 설치한다. https://opendistro.github.io/for-elasticsearch-docs/docs/install/ single node 설정 elasticsearch.yml 수정 # 네크워크 접근 대역설정 network.host: 0.0.0.0 # 싱글노드 타입 discovery.type: single-node # 주석으로 막혀져 있어야한다 # cluster.initial_master_nodes: ["node-1", "node-2"] 추가 설정 (optional) 기본 config 파일은 etc/elasticsearch/elasticsearch.yml 파일이다. bootstrap..
Spark - Phoenix 연결 에러 ( NoSuchColumnFamilyException )
·
DataPipeline/Spark
[ 에러 ] org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException: Column family table does not exist in region hbase:meta [ 원인 ] 연결하려는 Hbase와 Spark의 Hbase jar 파일의 버전이 맞지 않아 생김 [ 해결 ] Spark에 설치된 Hbase와 Hbase관련 Jar파일, 연결하려는 Hbase와 관련 Jar파일의 버전을 맞춘다.
wave35
'DataPipeline' 카테고리의 글 목록 (6 Page)