Trino
5 min readDec 14, 2022
CNCF Study in NaverLabs
What
Trino는?
- SQL 쿼리 기반의 빅데이터 분석 도구
- 엄청나게 빠른 쿼리 엔진
- Presto -> PrestoSQL -> Trino로 발전
Features
- Elasticsearch, Hive, Kafka, MySQL, MongoDB, Redis 등 35개의 커넥터로 다양한 데이터 소스를 지원한다.
- 다양한 데이터 소스가 지원하는 기본 쿼리뿐만 아니라, Geospartial, Machine learning 등 특수 쿼리 함수들을 지원한다.
- 통계 기반 쿼리 최적화로 가장 적은 비용의 쿼리 플랜으로 실행할 수 있다.
- 쿼리 또는 쿼리의 일부를 연결된 데이터 소스로 내려서 처리한다.
- 인증, 보안, 모니터링 등 운영을 위한 기능들을 제공한다.
- HTTP event listener를 등록해서 쿼리 이벤트들을 스트리밍할 수 있다.
- connector, type, sql function, authenticator 등의 플러그인을 개발해서 넣을 수 있다.
Where
Press enter or click to view image in full size![]()
Why
- 빠른 쿼리 속도
- 엑사바이트 스케일의 대용량 데이터 쿼리
- 다양한 데이터 소스 지원
- 단일 쿼리로 여러 시스템의 데이터들을 연계(ex: join)
When
- SQL 또는 사용자 인터페이스로 데이터를 분석할때
- 대용량 데이터를 빠른 속도로 쿼리할때
- 다양한 시스템의 데이터를 한곳에 단일 쿼리로 조인할때
- ETL(extract, transform, load) 배치 프로세스를 구성할때
How
Installation
Configuration
Node 설정(etc/node.properties)
node.environment=production
node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
node.data-dir=/var/trino/dataJVM 설정(etc/jvm.config)
-server
-Xmx16G
-XX:InitialRAMPercentage=80
-XX:MaxRAMPercentage=80
-XX:G1HeapRegionSize=32M
-XX:+ExplicitGCInvokesConcurrent
-XX:+ExitOnOutOfMemoryError
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:ReservedCodeCacheSize=512M
-XX:PerMethodRecompilationCutoff=10000
-XX:PerBytecodeRecompilationCutoff=10000
-Djdk.attach.allowAttachSelf=true
-Djdk.nio.maxCachedBufferSize=2000000
-XX:+UnlockDiagnosticVMOptions
-XX:+UseAESCTRIntrinsicsConfig 설정(etc/config.properties)
Get 디지털 세상을 만드는 아날로거’s stories in your inbox
Join Medium for free to get updates from this writer.
coordinator 기본 설정
coordinator=true
node-scheduler.include-coordinator=false
http-server.http.port=8080
discovery.uri=http://example.net:8080workers 기본 설정
coordinator=false
http-server.http.port=8080
discovery.uri=http://example.net:8080Catalog 설정(etc/catalog)
etc/catalog/jmx.properties
connector.name=jmxExecution
bin/launcher start



