Skip to Content
Trino 权威指南:原书第2版
book

Trino 权威指南:原书第2版

by Matt Fuller, Manfred Moser, Martin Traverso
July 2023
Intermediate to advanced
278 pages
5h 40m
Chinese
China Machine Press
Content preview from Trino 权威指南:原书第2版
50
|
4
发现服务运行在
Trino
协调器中,它与
Trino
协调器共享一个
HTTP
服务端,使用同一
个端口。因此,工作节点配置的发现服务指向协调器的主机名和端口。
4.1.3
工作节点
工作节点是
Trino
集群中的一个服务端程序。它负责执行协调器分配的任务,包括从数
据源获取数据并处理数据。具体来说,工作节点使用连接器从数据源获取数据,工作节
点之间也会交换中间数据,然后它发送最终结果数据给协调器。由协调器负责收集来自
各个工作节点的结果并发送给客户端。
在安装集群时,工作节点需要知道集群的发现服务所在的主机名或
IP
地址。工作节点启
动时,会将自己注册到发现服务上,以便协调器可以向其分配任务来执行。
工作节点使用
HTTP
协议与其他工作节点和协调器通信。
4-4
展示了多个工作节点如何从数据源检索并协作处理数据,直到其中一个工作节点
可以向协调器提供结果。
工作节点
工作节点
工作节点
工作节点
4-4:集群中的工作节点相互协作来处理 SQL 语句和数据
4.2
基于连接器的架构
Trino
存储与计算分离的核心是基于连接器的架构。连接器为
Trino
提供了连接任意数据
源的接口。
每个连接器在底层数据源上提供了一个基于表的抽象。只要数据能用
Trino
支持的数据
类型表示成表、列和行,
Trino
就可以创建连接器并让查询引擎使用这些数据进行查询
处理。
Trino
提供了一类服务提供者接口(
Service Provider Interface
SPI
,该类接口定义了一个
连接器必须实现的特性。通过在连接器中实现
SPI
Trino ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

What Successful Brick-and-Mortar Retailers Get Right

What Successful Brick-and-Mortar Retailers Get Right

Rob Angell
Three Essentials for Agentic AI Security

Three Essentials for Agentic AI Security

Paolo Dal Cin, Daniel Kendzior, Yusof Seedat, Renato Marinho
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9787111731603