SlideShare a Scribd company logo
Anatomy of
유동민
Presto Anatomy
1. Who

2. What

3. Library

4. Code Generation

5. Plugin

6. Future
Who am I

Who uses Presto
Who am I
ZeroMQ Committer, Presto Contributor

Recommended for you

Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Building a Streaming Microservice Architecture: with Apache Spark Structured ...Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Building a Streaming Microservice Architecture: with Apache Spark Structured ...

As we continue to push the boundaries of what is possible with respect to pipeline throughput and data serving tiers, new methodologies and techniques continue to emerge to handle larger and larger workloads

spark + ai summit
2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...
2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...
2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...

DataFusion is an extensible and embeddable query engine, written in Rust used to create modern, fast and efficient data pipelines, ETL processes, and database systems. This presentation explains where it fits into the data eco system and how it helps implement your system in Rust

rustapache arrowparquet
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in Rust

The document discusses various techniques for profiling CPU and memory performance in Rust programs, including: - Using the flamegraph tool to profile CPU usage by sampling a running process and generating flame graphs. - Integrating pprof profiling into Rust programs to expose profiles over HTTP similar to how it works in Go. - Profiling heap usage by integrating jemalloc profiling and generating heap profiles on program exit. - Some challenges with profiling asynchronous Rust programs due to the lack of backtraces. The key takeaways are that there are crates like pprof-rs and techniques like jemalloc integration that allow collecting CPU and memory profiles from Rust programs, but profiling asynchronous programs

influxdbtime series databasetime series platform
Who am I
49 Contributors

7 Facebook Developer
Who uses Presto
Who uses Presto
http://www.slideshare.net/dain1/presto-meetup-2015

http://www.slideshare.net/NezihYigitbasi/prestoatnetflixhadoopsummit15
@ Facebook / daily
Scan PBs (ORC?)

Trillions Rows

30K Queries

1000s Users
@ Netflix / daily
Scan 15+ PBs (Parquet)

2.5K Queries

300 Users

1 coordinator / r3.4xlarge

220 workers / r3.4xlarge
@ TD / daily
Scan PBs (A Columnar)

Billions Rows

18K Queries

2 coordinators / r3.4xlarge

26 Workers / c3.8xlarge
Who uses Presto - Airbnb
Airpal - a web-based, query execution tool

Presto is amazing. It's an order of magnitude
faster than Hive in most our use cases. It reads
directly from HDFS, so unlike Redshift, there
isn't a lot of ETL before you can use it. It just
works.

- Christopher Gutierrez, Manager of Online Analytics, Airbnb

Recommended for you

A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...

This document discusses using ClickHouse to manage log data. It begins with an introduction to ClickHouse and its features. It then covers different ways to model log data in ClickHouse, including storing logs as JSON blobs or converting them to a tabular format. The document demonstrates using materialized views to ingest logs into ClickHouse tables in an efficient manner, extracting values from JSON and converting to columns. It shows how this approach allows flexible querying of log data while scaling to large volumes.

altinitydbclickhousedbaltinity webinar
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022

Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022 Apache Kafka without Zookeeper is now production ready! This talk is about how you can run without ZooKeeper, and why you should.

kraftzookeeperapache kafka
What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1

Oracle Database 19c, builds upon key architectural, distributed data and performance innovations established in earlier versions Oracle Database 12c and 18c releases. Oracle 19c has many new features, in this presentation we have covered below areas Automated Installation, Configuration and Patching AutoUpgrade and Database Utilities

oracle 19coracle 18coracle 21c
What is Presto
Presto - Command Line
Presto is
An open source distributed SQL query engine 

for running interactive analytic queries 

against data sources of all sizes 

ranging from gigabytes to petabytes.
http://prestodb.io
Presto is
•Fast !!! (10x faster than Hive)

•Even faster with new Presto ORC reader

•Written in Java with a pluggable backend

•Not SQL-like, but ANSI-SQL

•Code generation like LLVM

•Not only source is open, but open sourced (No private branch)

Recommended for you

Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1

The document provides an overview and agenda for a presentation on optimizing Oracle database performance through query tuning. It discusses identifying performance issues, collecting wait event information, reviewing execution plans, and understanding how the Oracle optimizer works using features like adaptive plans and statistics gathering. The goal is to show attendees how to quickly find and focus on the queries most in need of tuning.

oracletuningquery
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistent

This document discusses Kafka Streams state stores. It provides examples of using different types of windowing (tumbling, hopping, sliding, session) with state stores. It also covers configuring state store logging, caching, and retention policies. The document demonstrates how to define windowed state stores in Kafka Streams applications and discusses concepts like grace periods.

apache kafkakafka streamsevent streaming
A Deep Dive into Kafka Controller
A Deep Dive into Kafka ControllerA Deep Dive into Kafka Controller
A Deep Dive into Kafka Controller

Presentation at Strata Data Conference 2018, New York The controller is the brain of Apache Kafka. A big part of what the controller does is to maintain the consistency of the replicas and determine which replica can be used to serve the clients, especially during individual broker failure. Jun Rao outlines the main data flow in the controller—in particular, when a broker fails, how the controller automatically promotes another replica as the leader to serve the clients, and when a broker is started, how the controller resumes the replication pipeline in the restarted broker. Jun then describes recent improvements to the controller that allow it to handle certain edge cases correctly and increase its performance, which allows for more partitions in a Kafka cluster.

apache kafkajun raostrata
Presto is
HTTP
HTTP
Presto is
Presto is
CREATE TABLE mysql.hello.order_item AS

SELECT o.*, i.*

FROM hive.world.orders o —― TABLESAMPLE SYSTEM (10)

JOIN mongo.deview.lineitem i —― TABLESAMPLE BERNOULLI (40)

ON o.orderkey = i.orderkey

WHERE conditions..
Coordinator
Presto - Planner
Fragmenter
Worker
SQL Analyzer
Analysis
Logical
Plan
Optimizer
Plan
Plan

Fragment
Distributed
Query

Scheduler
Stage

Execution

Plan
Worker
Worker
Local

Execution

Planner
TASK
TASK

Recommended for you

Presto: Optimizing Performance of SQL-on-Anything Engine
Presto: Optimizing Performance of SQL-on-Anything EnginePresto: Optimizing Performance of SQL-on-Anything Engine
Presto: Optimizing Performance of SQL-on-Anything Engine

Presto, an open source distributed SQL engine, is widely recognized for its low-latency queries, high concurrency, and native ability to query multiple data sources. Proven at scale in a variety of use cases at Airbnb, Bloomberg, Comcast, Facebook, FINRA, LinkedIn, Lyft, Netflix, Twitter, and Uber, in the last few years Presto experienced an unprecedented growth in popularity in both on-premises and cloud deployments over Object Stores, HDFS, NoSQL and RDBMS data stores. With the ever-growing list of connectors to new data sources such as Azure Blob Storage, Elasticsearch, Netflix Iceberg, Apache Kudu, and Apache Pulsar, recently introduced Cost-Based Optimizer in Presto must account for heterogeneous inputs with differing and often incomplete data statistics. This talk will explore this topic in detail as well as discuss best use cases for Presto across several industries. In addition, we will present recent Presto advancements such as Geospatial analytics at scale and the project roadmap going forward.

dataworks summit 2019dws19dataworks summit washington dc
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21

Apache Calcite is a dynamic data management framework. Think of it as a toolkit for building databases: it has an industry-standard SQL parser, validator, highly customizable optimizer (with pluggable transformation rules and cost functions, relational algebra, and an extensive library of rules), but it has no preferred storage primitives. In this tutorial, the attendees will use Apache Calcite to build a fully fledged query processor from scratch with very few lines of code. This processor is a full implementation of SQL over an Apache Lucene storage engine. (Lucene does not support SQL queries and lacks a declarative language for performing complex operations such as joins or aggregations.) Attendees will also learn how to use Calcite as an effective tool for research.

apache calcitequery processingquery optimization
Write Faster SQL with Trino.pdf
Write Faster SQL with Trino.pdfWrite Faster SQL with Trino.pdf
Write Faster SQL with Trino.pdf

Presto is an open-source distributed SQL query engine for interactive analytics. It uses a connector architecture to query data across different data sources and formats in the same query. Presto's query planning and execution involves scanning data sources, optimizing query plans, distributing queries across workers, and aggregating results. Understanding Presto's query plans helps optimize queries and troubleshoot performance issues.

trinoprestobig data
Presto - Page
PAGE
- positionCount
VAR_WIDTH BLOCK
nulls

Offsets
Values
FIEXED_WIDTH BLOCK
nulls
Values
positionCount blockCount 11 F I X E D _ W I D T H po
sitionCount bit encoded nullFlags values length
values
14 V A R I A B L E _ W
I D T H positionCount offsets[0] offsets[1] offsets[2…]
offsets[pos-1] offsets[pos] bit encoded nullFlags
values
Page / Block serialization
Presto - Cluster Memory Manager
Coordinator
Worker
Worker
Worker
GET /v1/memory
@Config(“query.max-memory”) = 20G
@Config(“query.max-memory-per-node”) = 1G
@Config(“resources.reserved-system-memory”) = 40% of -Xmx
System

reserved-system-memory
Reserved

max-memory-per-node
General
Task
Block All tasks
Presto - IndexManager
•LRU worker memory Cache

•@Config(task.max-index-memory) = 64M

•Table (List<IndexColumn> columns)

•Good for Key / Constant tables
Presto - Prestogres
https://github.com/treasure-data/prestogres
•Clients to use PostgreSQL protocol
to run queries on Presto

•Modified pgpoll-ii

•No ODBC driver yet

•Supports Tableau, ChartIO and etc

Recommended for you

Elastic Stack Introduction
Elastic Stack IntroductionElastic Stack Introduction
Elastic Stack Introduction

Getting Started with Elastic Stack. Detailed blog for the same http://vikshinde.blogspot.co.uk/2017/08/elastic-stack-introduction.html

elasticsearchkibanaelastic stack
Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...

Apache Flink is a distributed stream processing framework that allows users to process and analyze data in real-time. At LinkedIn, we developed a fully managed stream processing platform on Flink running on K8s to power hundreds of stream processing pipelines in production. This platform is the backbone for other infra systems like Search, Espresso (internal document store) and feature management etc. We provide a rich authoring and testing environment which allows users to create, test, and deploy their streaming jobs in a self-serve fashion within minutes. Users can focus on their business logic, leaving the Flink platform to take care of management aspects such as split deployment, resource provisioning, auto-scaling, job monitoring, alerting, failure recovery and much more. In this talk, we will introduce the overall platform architecture, highlight the unique value propositions that it brings to stream processing at LinkedIn and share the experiences and lessons we have learned.

Understanding and Improving Code Generation
Understanding and Improving Code GenerationUnderstanding and Improving Code Generation
Understanding and Improving Code Generation

Code generation is integral to Spark’s physical execution engine. When implemented, the Spark engine creates optimized bytecode at runtime improving performance when compared to interpreted execution. Spark has taken the next step with whole-stage codegen which collapses an entire query into a single function.

spark + ai summit

 *
Presto - Security
•Authentication

•Single Sign On - Kerberos, SSL client cert

•Authorization

•Simple allow / deny
Presto - Misc.
• Presto Verifier

• Presto Benchmark Driver 

• Query Queue

• ${USER} and ${SOURCE} based maxConcurrent, maxQueued

• JDBC Driver

• Python / Ruby Presto Client (Treasure Data)

• Presto Metrics (Treasure Data)

• GET /v1/jmx/mbean/{mbean}, /v1/query/{query}, /v1/node/

• Presto Python/Java Event Collector (Treasure Data)

• QueryStart, SpitCompletion, QueryCompletion
23
Library

Recommended for you

InfluxDB IOx Tech Talks: The Impossible Dream: Easy-to-Use, Super Fast Softw...
InfluxDB IOx Tech Talks: The Impossible Dream:  Easy-to-Use, Super Fast Softw...InfluxDB IOx Tech Talks: The Impossible Dream:  Easy-to-Use, Super Fast Softw...
InfluxDB IOx Tech Talks: The Impossible Dream: Easy-to-Use, Super Fast Softw...

The document discusses how an easy-to-use and fast database can have a complicated implementation for developers. It outlines four key areas: 1) Flexible writing schema requires schema merging at read time. 2) Fast reads prune non-covered data chunks through predicate push-down. 3) Loading duplicated data necessitates data deduplication and compaction operations. 4) Quick data deletion still needs data elimination at read time or in the background. The document provides examples to illustrate the tradeoffs between user and developer requirements.

influxdb
Evening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in FlinkEvening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in Flink

Flink Forward San Francisco 2022. When running Flink jobs, skew is a common problem that results in wasted resources and limited scalability. In the past years, we have helped our customers and users solve various skew-related issues in their Flink jobs or clusters. In this talk, we will present the different types of skew that users often run into: data skew, key skew, event time skew, state skew, and scheduling skew, and discuss solutions for each of them. We hope this will serve as a guideline to help you reduce skew in your Flink environment. by Jun Qin & Karl Friedrich

apache flinkstream processing
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기

Presto generates Java bytecode at runtime to optimize query execution. Key query operations like filtering, projections, joins and aggregations are compiled into efficient Java methods using libraries like ASM and Fastutil. This bytecode generation improves performance by 30% through techniques like compiling row hashing for join lookups directly into machine instructions.

Slice - Efficient memory accessor
•https://github.com/airlift/slice

•ByteBuffer is slow

•Slices.allocate(size), Slices.allocateDirect(size)

•Slices.wrappedBuffer(byteBuffer)

•sun.misc.Unsafe

•Address

•((DirectBuffer) byteBuffer).getAddress()

•unsafe.ARRAY_BYTE_OFFSET + byteBuffer.arrayOffset()

•unsafe.getLong(address), unsafe.getInt(address),

•unsafe.copyMemory(src, address, dst, address)
Airlift - Distributed service framework
•https://github.com/airlift/airlift

•Core of Presto communication

•HTTP

•Bootstrap

•Node discovery

•RESTful API

•Dependency Injection

•Configuration

•Utilities
@Path("/v2/event")

public class EventResource {

@POST

public Response createQuery(EventRequests events) {

…

}

}

public class CollectorMainModule implements ConfigurationAwareModule { 

    @Override 

    public synchronized void configure(Binder binder) { 

        discoveryBinder(binder).bindHttpAnnouncement("collector"); 

        jsonCodecBinder(binder).bindJsonCodec(EventRequest.class); 

        jaxrsBinder(binder).bind(EventResource.class); 

    } 

public static void main(String[] args){

Bootstrap app = new Bootstrap(ImmutableList.of(

new NodeModule(),

new DiscoveryModule(),

new HttpServerModule(),

new JsonModule(), new JaxrsModule(true),

new EventModule(),

new CollectorMainModule()

));

Injector injector = app.strictConfig().initialize();

injector.getInstance(Announcer.class).start();

}

}
ex) https://github.com/miniway/presto-event-collector
Fastutil - Fast Java collection
•FastUtil 6.6.0 turned out to be consistently fast.

•Koloboke is getting second in many tests.

•GS implementation is good enough, but is slower than FastUtil and Koloboke.
http://java-performance.info/hashmap-overview-jdk-fastutil-goldman-sachs-hppc-koloboke-trove-january-2015/
ASM - Bytecode manipulation
package pkg;



public interface SumInterface {

long sum(long value);

}

public class MyClass implements SumInterface {

private long result = 0L;



public MyClass(long value) {

result = value;

}



@Override

public long sum(long value) {

result += value;

return result;

}

}

ClassWriter cw = new ClassWriter(0);

cw.visit(V1_7, ACC_PUBLIC, 

"pkg/MyClass", null, 

"java/lang/Object", 

new String[] { "pkg/SumInterface" });

cw.visitField(ACC_PRIVATE, 

"result", "J", null, new Long(0));



// constructor

MethodVisitor m = cw.visitMethod(ACC_PUBLIC, 

"<init>", "(J)V", null, null);

m.visitCode();



// call super()

m.visitVarInsn(ALOAD, 0); // this

m.visitMethodInsn(INVOKESPECIAL, 

"java/lang/Object", "<init>", “()V",

false);

Recommended for you

JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011

The document discusses the future of server-side JavaScript. It covers various Node.js frameworks and libraries that support both synchronous and asynchronous programming styles. CommonJS aims to provide interoperability across platforms by implementing synchronous proposals using fibers. Examples demonstrate how CommonJS allows for synchronous-like code while maintaining asynchronous behavior under the hood. Benchmarks show it has comparable performance to Node.js. The author advocates for toolkits over frameworks and continuing development of common standards and packages.

web developmentjavascriptringojs
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way

Node has captured the attention of early adopters by clearly differentiating itself as being asynchronous from the ground up while remaining accessible. Now that server side JavaScript is at the cutting edge of the asynchronous, real time web, it is in a much better position to establish itself as the go to language for also making synchronous, CRUD webapps and gain a stronger foothold on the server. This talk covers the current state of server side JavaScript beyond Node. It introduces Common Node, a synchronous CommonJS compatibility layer using node-fibers which bridges the gap between the different platforms. We look into Common Node's internals, compare its performance to that of other implementations such as RingoJS and go through some ideal use cases.

javascriptweb design and developmentservers
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...

The power of Gatling is the DSL it provides to allow writing meaningful and expressive tests. We provide an overview of the framework, a description of their development environment and goals, and present their test results. Source code available https://github.com/lawlessc/random-response-time

scala performance scalability gatling nodejs node
ASM - Bytecode manipulation (Cont.)
// this.result = value

m.visitVarInsn(ALOAD, 0); // this

m.visitVarInsn(LLOAD, 1 ); // value

m.visitFieldInsn(PUTFIELD, 

"pkg/MyClass", "result", "J");

m.visitInsn(RETURN);

m.visitMaxs(-1, -1).visitEnd();



// public long sum(long value)

m = cw.visitMethod(ACC_PUBLIC , "sum", "(J)J", 

null, null);

m.visitCode();



m.visitVarInsn(ALOAD, 0); // this

m.visitVarInsn(ALOAD, 0); // this

m.visitFieldInsn(GETFIELD,

"pkg/MyClass", "result", "J");

m.visitVarInsn(LLOAD, 1); // value

// this.result + value

m.visitInsn(LADD); 

m.visitFieldInsn(PUTFIELD, 

"pkg/MyClass", "result", "J");



m.visitVarInsn(ALOAD, 0); // this

m.visitFieldInsn(GETFIELD, 

"pkg/MyClass", "result", "J");

m.visitInsn(LRETURN);

m.visitMaxs(-1, -1).visitEnd();



cw.visitEnd();

byte[] bytes = cw.toByteArray();

ClassLoader.defindClass(bytes)
Library - Misc.
•JDK 8u40 +

•Guice - Lightweight dependency injection

•Guava - Replacing Java8 Stream, Optional and Lambda

•ANTLR4 - Parser generator, SQL parser

•Jetty - HTTP Server and Client

•Jackson - JSON

•Jersey - RESTful API
Byte Code Generation

Function Variable Binding
Code Generation
•ASM

•Runtime Java classes and methods generation base on SQL

•Where

•Filter and Projection

•Join Lookup source

•Join Probe

•Order By

•Aggregation

Recommended for you

Wprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopWprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache Hadoop

The document introduces concepts related to Big Data technology including volume, variety, and velocity of data. It discusses Hadoop architecture including HDFS, MapReduce, YARN, and the Hadoop ecosystem. Examples are provided of common Big Data problems and how they can be solved using Hadoop frameworks like Pig, Hive, and Ambari.

CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 Hour

This document provides an overview of CouchDB, a NoSQL database that uses JSON documents with a flexible schema. It demonstrates CouchDB's features like replication, MapReduce, and filtering. The presentation then shows how to build a mobile running app called Couch25K that tracks locations using CouchDB and syncs data between phones and a server. Code examples are provided in Objective-C, Java, and JavaScript for creating databases, saving documents, querying, and syncing.

ioscouchdbmapreduce
Leveraging Hadoop in your PostgreSQL Environment
Leveraging Hadoop in your PostgreSQL EnvironmentLeveraging Hadoop in your PostgreSQL Environment
Leveraging Hadoop in your PostgreSQL Environment

This talk will begin with a discussion of the strengths of PostgreSQL and Hadoop. We will then lead into a high level overview of Hadoop and its community of projects like Hive, Flume and Sqoop. Finally, we will dig down into various use cases detailing how you can leverage Hadoop technologies for your PostgreSQL databases today. The use cases will range from using HDFS for simple database backups to using PostgreSQL and Foreign Data Wrappers to do low latency analytics on your Big Data.

flumehadoophive
Code Generation - Filter
SELECT * FROM lineitem 

WHERE orderkey = 100 AND quantity = 200
AND
EQ

(#0,100)
EQ

(#1,200)
Logical Planner
class AndOperator extends Operator {

private Operator left = new EqualOperator(#1, 100);

private Operator right = new EqualOperator(#2, 200);

@Override

public boolean evaluate(Cursor cur)

{

if (!left.evaluate(cur)) {

return false;

}

return right.evaluate(cur);

}

}

class EqualOperator extends Operator {

@Override

public boolean evaluate(Cursor c)

{

return cur.getValue(position).equals(value);

}

}
Code Generation - Filter
// invoke MethodHandle( $operator$EQUAL(#0, 100) )

push cursor.getValue(#0)

push 100

$statck = invokeDynamic boostrap(0) $operator$EQUAL      

if (!$stack) { goto end; }

push cursor.getValue(#1)

push 200

$stack = invokeDynamic boostrap(0) $operator$EQUAL      

end:      

return $stack 

@ScalarOperator(EQUAL)

@SqlType(BOOLEAN)

public static boolean equal(@SqlType(BIGINT) long left,

@SqlType(BIGINT) long right){

    return left == right;

}

=> MethodHandle(“$operator$EQUAL(long, long): boolean”)
AND
$op$EQ

(#0,100)
$op$EQ

(#1,200)
Local Execution Planner
Code Generation - Join Lookup Source
SELECT col1, col2, col3 FROM tabA JOIN tabB 

ON tabA.col1 = tabB.colX /* BIGINT */ AND tabA.col2 = tabB.colY /* VARCHAR */
Page
Block(colY)
Block(colX)
PagesIndex
0,0 0,1 0,1023 2,100
Block(colX)
Block(colY)
B(X)
B(Y)
B(X) B(X)
B(Y) B(Y)
addresses
channels
Lookup

Source
JoinProbe
-1
-1
3000
-1
1023
100
-1
PagesHash
- hashRow
- equalsRow
ROW
hash
Found!
Code Generation - PageHash
class PagesHash { 

   List<Type> types = [BIGINT, VARCHAR] 

   List<Integer> hashChannels = [0,1] 

   List<List<Block>> channels = [ 

[BLOCK(colX), BLOCK(colX), ...] , 

              [BLOCK(colY), BLOCK(colY), ...] 

]  

} 

class (Compiled)PageHash { 

     Type type_colX = BIGINT 

     Type type_colY = VARCHAR 

     int hashChannel_colX = 0 

     int hashChannel_colY = 1 

     List<Block> channel_colX = 

[ BLOCK(colX), BLOCK(colX), … ] 

     List<Block> channel_colY = 

[ BLOCK(colY), BLOCK(colY), … ] 

}

Recommended for you

A Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQLA Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQL

Spark SQL enables Spark to perform efficient and fault-tolerant relational query processing with analytics database technologies. The relational queries are compiled to the executable physical plans consisting of transformations and actions on RDDs with the generated Java code. The code is compiled to Java bytecode, executed at runtime by JVM and optimized by JIT to native machine code at runtime. This talk will take a deep dive into Spark SQL execution engine. The talk includes pipelined execution, whole-stage code generation, UDF execution, memory management, vectorized readers, lineage based RDD transformation and action.

JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up

JavaScript is evolving with the addition of modules, platform consistency, and harmony features. Modules allow JavaScript code to be organized and avoid naming collisions. CommonJS and AMD module formats are used widely. Platform consistency is improved through polyfills that mimic future APIs for older browsers. Harmony brings language-level modules and features like destructuring assignment, default parameters, and promises to JavaScript. Traceur compiles Harmony code to existing JavaScript.

javascript
Best Practices in Handling Performance Issues
Best Practices in Handling Performance IssuesBest Practices in Handling Performance Issues
Best Practices in Handling Performance Issues

The document provides best practices for handling performance issues in an Odoo deployment. It recommends gathering deployment information, such as hardware specs, number of machines, and integration with web services. It also suggests monitoring tools to analyze system performance and important log details like CPU time, memory limits, and request processing times. The document further discusses optimizing PostgreSQL settings, using tools like pg_activity, pg_stat_statements, and pgbadger to analyze database queries and performance. It emphasizes reproducing issues, profiling code with tools like the Odoo profiler, and fixing problems in an iterative process.

 
by Odoo
odoo experience 2020odooperformance
Code Generation - PageHash (Cont.)
long hashRow (int position, 

Block[] blocks) { 

int result = 0; 

  for (int i = 0; i < hashChannels.size(); i++) {

int hashChannel = hashChannels.get(i); 

       Type type = types.get(hashChannel); 

            

result = result * 31 + 

type.hash(blocks[i], position); 

    } 

return result; 

} 

long (Compiled)hashRow (int position,

Block[] blocks) { 

        int result = 0; 

        result = result * 31 + 

type_colX.hash(block[0], position); 

        result = result * 31 + 

type_colY.hash(block[1], position); 

        return result; 

}
Code Generation - PageHash (Cont.)
boolean equalsRow (

int leftBlockIndex, int leftPosition, 

int rightPosition, Block[] rightBlocks) { 

    for (int i = 0; i < hashChannels.size(); i++) { 

    int hashChannel = hashChannels.get(i); 

       Type type = types.get(hashChannel); 

Block leftBlock = 

channels.get(hashChannel)

.get(leftBlockIndex); 

       if (!type.equalTo(leftBlock, leftPosition,

  rightBlocks[i], rightPosition)) { 

            return false; 

        } 

    } 

    return true; 

}

boolean (Compiled)equalsRow (

int leftBlockIndex, int leftPosition, 

int rightPosition, Block[] rightBlocks) { 

    Block leftBlock = 

channels_colX.get(leftBlockIndex); 

    if (!type.equalTo(leftBlock, leftPosition, 

rightBlocks[0], rightPosition)) { 

            return false; 

    } 

    leftBlock = 

channels_colY.get(leftBlockIndex); 

    if (!type.equalTo(leftBlock, leftPosition, 

rightBlocks[1], rightPosition)) { 

            return false; 

    } 

    return true; 

}
Method Variable Binding
1. regexp_like(string, pattern) → boolean

2. regexp_like(string, cast(pattern as RegexType))  // OperatorType.CAST 

3. regexp_like(string, new Regex(pattern))

4. MethodHandle handle = MethodHandles.insertArgument(1, new Regex(pattern))

5. handle.invoke (string)
@ScalarOperator(OperatorType.CAST)

@SqlType(“RegExp”)

public static Regex castToRegexp(@SqlType(VARCHAR) Slice pattern){ 

  return new Regex(pattern.getBytes(), 0, pattern.length()); 

} 

@ScalarFunction

@SqlType(BOOLEAN)

public static boolean regexpLike(@SqlType(VARCHAR) Slice source,

@SqlType(“RegExp”) Regex pattern){

    Matcher m = pattern.matcher(source.getBytes());

    int offset = m.search(0, source.length());

    return offset != -1;

}
Plugin - Connector

Recommended for you

Kotlin+MicroProfile: Ensinando 20 anos para uma linguagem nova
Kotlin+MicroProfile: Ensinando 20 anos para uma linguagem novaKotlin+MicroProfile: Ensinando 20 anos para uma linguagem nova
Kotlin+MicroProfile: Ensinando 20 anos para uma linguagem nova

Java EE, MicroProfile e Kotlin combinados para fazer microsserviços

java eekotlinmicroprofile
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications

This document provides an introduction and overview of a Node.js tutorial presented by Tom Hughes-Croucher. The tutorial covers topics such as building scalable server-side code with JavaScript using Node.js, debugging Node.js applications, using frameworks like Express.js, and best practices for deploying Node.js applications in production environments. The tutorial includes exercises for hands-on learning and demonstrates tools and techniques like Socket.io, clustering, error handling and using Redis with Node.js applications.

node.jsfluentconfjavascript
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHP

This talk was given at the Dutch PHP Conference 2011 and details the use of Comet (aka reverse ajax or ajax push) technologies and the importance of websockets and server-sent events. More information is available at http://joind.in/3237.

king foodpc11php
Plugin
•Hive

•Hadoop 1, Hadoop2, CDH4, CDH 5

•MySQL

•PostgreSQL

•Cassandra

•MongoDB

•Kafka

•Raptor
•Machine Learning

•BlackHole

•JMX

•TPC-H

•Example
Plugin - Raptor
•Storage data in flash on the Presto machines in ORC format

•Metadata is stored in MySQL (Extendable)

•Near real-time loads (5 - 10mins)

•3TB / day, 80B rows/day , 5 secs query

•CREATE VIEW myview AS SELECT …

•DELETE FROM tab WHERE conditions…

•UPDATE (Future)

•Coarse grained Index : min / max value of all columns

•Compaction

•Backup Store (Extendable)
No more ?!
Plugin - How to write
•https://prestodb.io/docs/current/develop/spi-overview.html

•ConnectorFactory

•ConnectorMetadata

•ConnectorSplitManager

•ConnectorHandleResolver

•ConnectorRecordSetProvider (PageSourceProvider)

•ConnectorRecordSinkProvider (PageSinkProvider)

•Add new Type

•Add new Function (A.K.A UDF)
Plugin - MongoDB
•https://github.com/facebook/presto/pull/3337

•5 Non-business days

•Predicate Pushdown

•Add a Type (ObjectId)

•Add UDFs (objectid(), objectid(string))
public class MongoPlugin implements Plugin { 

    @Override 

    public <T> List<T> getServices(Class<T> type) { 

        if (type == ConnectorFactory.class) { 

           return ImmutableList.of(

new MongoConnectorFactory(…)); 

        } else if (type == Type.class) { 

            return ImmutableList.of(OBJECT_ID); 

        } else if (type == FunctionFactory.class) { 

            return ImmutableList.of(

new MongoFunctionFactory(typeManager)); 

        } 

        return ImmutableList.of(); 

    } 

}

Recommended for you

RxJava applied [JavaDay Kyiv 2016]
RxJava applied [JavaDay Kyiv 2016]RxJava applied [JavaDay Kyiv 2016]
RxJava applied [JavaDay Kyiv 2016]

The document provides an overview of RxJava and its advantages over traditional Java streams and callbacks. It discusses key RxJava concepts like Observables, Observers, and Subscriptions. It demonstrates how to create Observables, subscribe to them, and compose operations like filter, map, and zip. It shows how to leverage schedulers to control threading. The document also provides examples of using RxJava with HTTP requests and the Twitter API to asynchronously retrieve user profiles and tweets. It highlights scenarios where RxJava is useful, like handling asynchronous operations, and discusses some pitfalls like its learning curve and need to understand backpressure.

reactive-streamjavadayjava
The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016

This document introduces Reactive Programming with RxJava and how it can be used to create non-blocking applications. It discusses the limitations of blocking code and how RxJava uses Observables and Subscribers to implement reactive and asynchronous operations. It provides examples of converting blocking servlets and HTTP calls to non-blocking using RxJava. While non-blocking code is not always faster, it allows asynchronous operations to utilize threads more efficiently.

legacyservletamsterdam
Fun Teaching MongoDB New Tricks
Fun Teaching MongoDB New TricksFun Teaching MongoDB New Tricks
Fun Teaching MongoDB New Tricks

MongoDB is the trusted document store we turn to when we have tough data store problems to solve. For this talk we are going to go a little bit off the path and explore what other roles we can fit MongoDB into. Others have discussed how to turn MongoDB’s capped collections into a publish/subscribe server. We stretch that a little further and turn MongoDB into a full fledged broker with both publish/subscribe and queue semantics, and a the ability to mix them. We will provide code and a running demo of the queue producers and consumers. Next we will turn to coordination services: We will explore the fundamental features and show how to implement them using MongoDB as the storage engine. Again we will show the code and demo the coordination of multiple applications.

Plugin - MongoDB
class MongoFactory implements ConnectorFactory {

@Override

public Connector create(String connectorId) {

Bootstrap app = new Bootstrap(new
MongoClientModule());

return app.initialize()

.getInstance(MongoConnector.class);

}

}

class MongoClientModule implements Module {

@Override

public void configure(Binder binder){

binder.bind(MongoConnector.class)

.in(SINGLETON);

…

configBinder(binder)

.bindConfig(MongoClientConfig.class);

}

}
class MongoConnector implements Connector {

@Inject

public MongoConnector(

MongoSession mongoSession,

MongoMetadata metadata,

MongoSplitManager splitManager,

MongoPageSourceProvider 

pageSourceProvider,

MongoPageSinkProvider 

pageSinkProvider,

MongoHandleResolver 

handleResolver) {

… 

}

}
Plugin - MongoDB UDF
public class MongoFunctionFactory 

        implements FunctionFactory { 

    @Override 

    public List<ParametricFunction> listFunctions() 

    { 

        return new FunctionListBuilder(typeManager) 

                .scalar(ObjectIdFunctions.class) 

                .getFunctions(); 

    } 

} 

public class ObjectIdType 

        extends AbstractVariableWidthType { 

    ObjectIdType OBJECT_ID = new ObjectIdType(); 

    @JsonCreator 

    public ObjectIdType() { 

        super(parseTypeSignature("ObjectId"), 

Slice.class); 

    } 

}
public class ObjectIdFunctions { 

    @ScalarFunction("objectid") 

    @SqlType("ObjectId") 

    public static Slice ObjectId() { 

        return Slices.wrappedBuffer(

new ObjectId().toByteArray()); 

    } 

    @ScalarFunction("objectid") 

    @SqlType("ObjectId") 

    p.s Slice ObjectId(@SqlType(VARCHAR) Slice value) { 

        return Slices.wrappedBuffer(

new ObjectId(value.toStringUtf8()).toByteArray())
    } 

    @ScalarOperator(EQUAL) 

    @SqlType(BOOLEAN) 

    p.s boolean equal(@SqlType("ObjectId") Slice left,

@SqlType("ObjectId") Slice right) { 

        return left.equals(right); 

    } 

}
Future
Presto - Future
•Cost based optimization

•Join Hint (Right table must be smaller)

•Huge Join / Aggregation

•Coordinator High Availability

•Task Recovery

•Work Stealing

•Full Pushdown

•Vectorization

• ODBC Driver (Early 2016, Teradata)

• More security (LDAP, Grant SQL)

Recommended for you

Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js

This 15 minute presentation discusses non-blocking I/O, event loops, and Node.js. It builds on previous work by Ryan Dahl, explaining how threads can be expensive due to context switching and memory usage, and how Node.js uses an event-driven, non-blocking model to avoid these costs. Code examples demonstrate getting and printing a policy object, handling HTTP requests asynchronously without blocking additional connections, and using callbacks to chain asynchronous actions together.

루비가 얼랭에 빠진 날
루비가 얼랭에 빠진 날루비가 얼랭에 빠진 날
루비가 얼랭에 빠진 날

The document discusses Concurrency-oriented Programming (COP) using Erlang. It explains how Erlang programs work using lightweight processes that communicate asynchronously via message passing. This allows for high performance, reliability, and scalability. It provides examples of stateless server processes and using CouchDB for schema-free document storage accessible via REST APIs. Ruby libraries for interacting with CouchDB are also mentioned.

ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale

This document summarizes ql.io, a domain specific language for consuming HTTP APIs. Ql.io allows API calls to be made with fewer lines of code and reduced data sizes compared to traditional HTTP requests. It handles parallelizing requests and joining responses implicitly. Ql.io also allows mapping HTTP resources to SQL-like queries, enabling sequential and parallel queries over multiple APIs with a simple syntax. It can be used as an HTTP gateway or from Node.js.

restaggregationorchestration
SELECT question FROM you
Thank You

More Related Content

What's hot

Apache Spark Streaming in K8s with ArgoCD & Spark Operator
Apache Spark Streaming in K8s with ArgoCD & Spark OperatorApache Spark Streaming in K8s with ArgoCD & Spark Operator
Apache Spark Streaming in K8s with ArgoCD & Spark Operator
Databricks
 
Presto query optimizer: pursuit of performance
Presto query optimizer: pursuit of performancePresto query optimizer: pursuit of performance
Presto query optimizer: pursuit of performance
DataWorks Summit
 
Presto
PrestoPresto
Presto
Knoldus Inc.
 
Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Building a Streaming Microservice Architecture: with Apache Spark Structured ...Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Databricks
 
2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...
2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...
2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...
Andrew Lamb
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in Rust
InfluxData
 
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
Altinity Ltd
 
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
HostedbyConfluent
 
What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1
Satishbabu Gunukula
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
SolarWinds
 
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistent
confluent
 
A Deep Dive into Kafka Controller
A Deep Dive into Kafka ControllerA Deep Dive into Kafka Controller
A Deep Dive into Kafka Controller
confluent
 
Presto: Optimizing Performance of SQL-on-Anything Engine
Presto: Optimizing Performance of SQL-on-Anything EnginePresto: Optimizing Performance of SQL-on-Anything Engine
Presto: Optimizing Performance of SQL-on-Anything Engine
DataWorks Summit
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21
Stamatis Zampetakis
 
Write Faster SQL with Trino.pdf
Write Faster SQL with Trino.pdfWrite Faster SQL with Trino.pdf
Write Faster SQL with Trino.pdf
Eric Xiao
 
Elastic Stack Introduction
Elastic Stack IntroductionElastic Stack Introduction
Elastic Stack Introduction
Vikram Shinde
 
Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...
Flink Forward
 
Understanding and Improving Code Generation
Understanding and Improving Code GenerationUnderstanding and Improving Code Generation
Understanding and Improving Code Generation
Databricks
 
InfluxDB IOx Tech Talks: The Impossible Dream: Easy-to-Use, Super Fast Softw...
InfluxDB IOx Tech Talks: The Impossible Dream:  Easy-to-Use, Super Fast Softw...InfluxDB IOx Tech Talks: The Impossible Dream:  Easy-to-Use, Super Fast Softw...
InfluxDB IOx Tech Talks: The Impossible Dream: Easy-to-Use, Super Fast Softw...
InfluxData
 
Evening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in FlinkEvening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in Flink
Flink Forward
 

What's hot (20)

Apache Spark Streaming in K8s with ArgoCD & Spark Operator
Apache Spark Streaming in K8s with ArgoCD & Spark OperatorApache Spark Streaming in K8s with ArgoCD & Spark Operator
Apache Spark Streaming in K8s with ArgoCD & Spark Operator
 
Presto query optimizer: pursuit of performance
Presto query optimizer: pursuit of performancePresto query optimizer: pursuit of performance
Presto query optimizer: pursuit of performance
 
Presto
PrestoPresto
Presto
 
Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Building a Streaming Microservice Architecture: with Apache Spark Structured ...Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Building a Streaming Microservice Architecture: with Apache Spark Structured ...
 
2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...
2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...
2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in Rust
 
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
 
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
 
What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
 
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistent
 
A Deep Dive into Kafka Controller
A Deep Dive into Kafka ControllerA Deep Dive into Kafka Controller
A Deep Dive into Kafka Controller
 
Presto: Optimizing Performance of SQL-on-Anything Engine
Presto: Optimizing Performance of SQL-on-Anything EnginePresto: Optimizing Performance of SQL-on-Anything Engine
Presto: Optimizing Performance of SQL-on-Anything Engine
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21
 
Write Faster SQL with Trino.pdf
Write Faster SQL with Trino.pdfWrite Faster SQL with Trino.pdf
Write Faster SQL with Trino.pdf
 
Elastic Stack Introduction
Elastic Stack IntroductionElastic Stack Introduction
Elastic Stack Introduction
 
Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...
 
Understanding and Improving Code Generation
Understanding and Improving Code GenerationUnderstanding and Improving Code Generation
Understanding and Improving Code Generation
 
InfluxDB IOx Tech Talks: The Impossible Dream: Easy-to-Use, Super Fast Softw...
InfluxDB IOx Tech Talks: The Impossible Dream:  Easy-to-Use, Super Fast Softw...InfluxDB IOx Tech Talks: The Impossible Dream:  Easy-to-Use, Super Fast Softw...
InfluxDB IOx Tech Talks: The Impossible Dream: Easy-to-Use, Super Fast Softw...
 
Evening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in FlinkEvening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in Flink
 

Similar to Presto anatomy

[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
NAVER D2
 
JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
Oleg Podsechin
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
Oleg Podsechin
 
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
Aman Kohli
 
Wprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopWprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache Hadoop
Sages
 
CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 Hour
Peter Friese
 
Leveraging Hadoop in your PostgreSQL Environment
Leveraging Hadoop in your PostgreSQL EnvironmentLeveraging Hadoop in your PostgreSQL Environment
Leveraging Hadoop in your PostgreSQL Environment
Jim Mlodgenski
 
A Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQLA Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQL
Databricks
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
David Padbury
 
Best Practices in Handling Performance Issues
Best Practices in Handling Performance IssuesBest Practices in Handling Performance Issues
Best Practices in Handling Performance Issues
Odoo
 
Kotlin+MicroProfile: Ensinando 20 anos para uma linguagem nova
Kotlin+MicroProfile: Ensinando 20 anos para uma linguagem novaKotlin+MicroProfile: Ensinando 20 anos para uma linguagem nova
Kotlin+MicroProfile: Ensinando 20 anos para uma linguagem nova
Víctor Leonel Orozco López
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
Tom Croucher
 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHP
King Foo
 
RxJava applied [JavaDay Kyiv 2016]
RxJava applied [JavaDay Kyiv 2016]RxJava applied [JavaDay Kyiv 2016]
RxJava applied [JavaDay Kyiv 2016]
Igor Lozynskyi
 
The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016
Frank Lyaruu
 
Fun Teaching MongoDB New Tricks
Fun Teaching MongoDB New TricksFun Teaching MongoDB New Tricks
Fun Teaching MongoDB New Tricks
MongoDB
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js
Marcus Frödin
 
루비가 얼랭에 빠진 날
루비가 얼랭에 빠진 날루비가 얼랭에 빠진 날
루비가 얼랭에 빠진 날
Sukjoon Kim
 
ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale
Subbu Allamaraju
 
How Secure Are Docker Containers?
How Secure Are Docker Containers?How Secure Are Docker Containers?
How Secure Are Docker Containers?
Ben Hall
 

Similar to Presto anatomy (20)

[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
 
JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
 
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
 
Wprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopWprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache Hadoop
 
CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 Hour
 
Leveraging Hadoop in your PostgreSQL Environment
Leveraging Hadoop in your PostgreSQL EnvironmentLeveraging Hadoop in your PostgreSQL Environment
Leveraging Hadoop in your PostgreSQL Environment
 
A Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQLA Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQL
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
 
Best Practices in Handling Performance Issues
Best Practices in Handling Performance IssuesBest Practices in Handling Performance Issues
Best Practices in Handling Performance Issues
 
Kotlin+MicroProfile: Ensinando 20 anos para uma linguagem nova
Kotlin+MicroProfile: Ensinando 20 anos para uma linguagem novaKotlin+MicroProfile: Ensinando 20 anos para uma linguagem nova
Kotlin+MicroProfile: Ensinando 20 anos para uma linguagem nova
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHP
 
RxJava applied [JavaDay Kyiv 2016]
RxJava applied [JavaDay Kyiv 2016]RxJava applied [JavaDay Kyiv 2016]
RxJava applied [JavaDay Kyiv 2016]
 
The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016
 
Fun Teaching MongoDB New Tricks
Fun Teaching MongoDB New TricksFun Teaching MongoDB New Tricks
Fun Teaching MongoDB New Tricks
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js
 
루비가 얼랭에 빠진 날
루비가 얼랭에 빠진 날루비가 얼랭에 빠진 날
루비가 얼랭에 빠진 날
 
ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale
 
How Secure Are Docker Containers?
How Secure Are Docker Containers?How Secure Are Docker Containers?
How Secure Are Docker Containers?
 

Recently uploaded

University of Toronto degree offer diploma Transcript
University of Toronto  degree offer diploma TranscriptUniversity of Toronto  degree offer diploma Transcript
University of Toronto degree offer diploma Transcript
taqyea
 
Mahipalpur @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Mahipalpur @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model SafeMahipalpur @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Mahipalpur @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
aashuverma204
 
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model SafeMalviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
butwhat24
 
From Clues to Connections: How Social Media Investigators Expose Hidden Networks
From Clues to Connections: How Social Media Investigators Expose Hidden NetworksFrom Clues to Connections: How Social Media Investigators Expose Hidden Networks
From Clues to Connections: How Social Media Investigators Expose Hidden Networks
Milind Agarwal
 
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
Amazon Web Services Korea
 
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model SafeSaket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
shruti singh$A17
 
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model SafeNehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
butwhat24
 
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model SafeSouth Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
simmi singh$A17
 
Rohini @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Megha Singla Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Megha Singla Top Model SafeRohini @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Megha Singla Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Megha Singla Top Model Safe
depikasharma
 
Australian Catholic University degree offer diploma Transcript
Australian Catholic University  degree offer diploma TranscriptAustralian Catholic University  degree offer diploma Transcript
Australian Catholic University degree offer diploma Transcript
taqyea
 
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
shoeb2926
 
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model SafePitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
vasudha malikmonii$A17
 
iot paper presentation FINAL EDIT by kiran.pptx
iot paper presentation FINAL EDIT by kiran.pptxiot paper presentation FINAL EDIT by kiran.pptx
iot paper presentation FINAL EDIT by kiran.pptx
KiranKumar139571
 
Victoria University degree offer diploma Transcript
Victoria University  degree offer diploma TranscriptVictoria University  degree offer diploma Transcript
Victoria University degree offer diploma Transcript
taqyea
 
EGU2020-10385_presentation LSTM algorithm
EGU2020-10385_presentation LSTM algorithmEGU2020-10385_presentation LSTM algorithm
EGU2020-10385_presentation LSTM algorithm
fatimaezzahraboumaiz2
 
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ginni Singh Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ginni Singh Top Model SafeLajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ginni Singh Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ginni Singh Top Model Safe
khansayyad1256
 
Laxmi Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Laxmi Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model SafeLaxmi Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Laxmi Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
yogita singh$A17
 
Simon Fraser University degree offer diploma Transcript
Simon Fraser University  degree offer diploma TranscriptSimon Fraser University  degree offer diploma Transcript
Simon Fraser University degree offer diploma Transcript
taqyea
 
Nehru Place @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model SafeNehru Place @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
bookmybebe1
 
Karol Bagh @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
Karol Bagh @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model SafeKarol Bagh @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
Karol Bagh @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
bookmybebe1
 

Recently uploaded (20)

University of Toronto degree offer diploma Transcript
University of Toronto  degree offer diploma TranscriptUniversity of Toronto  degree offer diploma Transcript
University of Toronto degree offer diploma Transcript
 
Mahipalpur @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Mahipalpur @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model SafeMahipalpur @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Mahipalpur @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
 
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model SafeMalviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
 
From Clues to Connections: How Social Media Investigators Expose Hidden Networks
From Clues to Connections: How Social Media Investigators Expose Hidden NetworksFrom Clues to Connections: How Social Media Investigators Expose Hidden Networks
From Clues to Connections: How Social Media Investigators Expose Hidden Networks
 
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
 
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model SafeSaket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
 
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model SafeNehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
 
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model SafeSouth Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
 
Rohini @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Megha Singla Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Megha Singla Top Model SafeRohini @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Megha Singla Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Megha Singla Top Model Safe
 
Australian Catholic University degree offer diploma Transcript
Australian Catholic University  degree offer diploma TranscriptAustralian Catholic University  degree offer diploma Transcript
Australian Catholic University degree offer diploma Transcript
 
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
 
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model SafePitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
 
iot paper presentation FINAL EDIT by kiran.pptx
iot paper presentation FINAL EDIT by kiran.pptxiot paper presentation FINAL EDIT by kiran.pptx
iot paper presentation FINAL EDIT by kiran.pptx
 
Victoria University degree offer diploma Transcript
Victoria University  degree offer diploma TranscriptVictoria University  degree offer diploma Transcript
Victoria University degree offer diploma Transcript
 
EGU2020-10385_presentation LSTM algorithm
EGU2020-10385_presentation LSTM algorithmEGU2020-10385_presentation LSTM algorithm
EGU2020-10385_presentation LSTM algorithm
 
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ginni Singh Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ginni Singh Top Model SafeLajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ginni Singh Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ginni Singh Top Model Safe
 
Laxmi Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Laxmi Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model SafeLaxmi Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Laxmi Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
 
Simon Fraser University degree offer diploma Transcript
Simon Fraser University  degree offer diploma TranscriptSimon Fraser University  degree offer diploma Transcript
Simon Fraser University degree offer diploma Transcript
 
Nehru Place @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model SafeNehru Place @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
 
Karol Bagh @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
Karol Bagh @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model SafeKarol Bagh @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
Karol Bagh @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Jya Khan Top Model Safe
 

Presto anatomy

  • 2. Presto Anatomy 1. Who 2. What 3. Library 4. Code Generation 5. Plugin 6. Future
  • 3. Who am I Who uses Presto
  • 4. Who am I ZeroMQ Committer, Presto Contributor
  • 5. Who am I 49 Contributors 7 Facebook Developer
  • 7. Who uses Presto http://www.slideshare.net/dain1/presto-meetup-2015 http://www.slideshare.net/NezihYigitbasi/prestoatnetflixhadoopsummit15 @ Facebook / daily Scan PBs (ORC?) Trillions Rows 30K Queries 1000s Users @ Netflix / daily Scan 15+ PBs (Parquet) 2.5K Queries 300 Users 1 coordinator / r3.4xlarge 220 workers / r3.4xlarge @ TD / daily Scan PBs (A Columnar) Billions Rows 18K Queries 2 coordinators / r3.4xlarge 26 Workers / c3.8xlarge
  • 8. Who uses Presto - Airbnb Airpal - a web-based, query execution tool Presto is amazing. It's an order of magnitude faster than Hive in most our use cases. It reads directly from HDFS, so unlike Redshift, there isn't a lot of ETL before you can use it. It just works. - Christopher Gutierrez, Manager of Online Analytics, Airbnb
  • 12. Presto is •Fast !!! (10x faster than Hive) •Even faster with new Presto ORC reader •Written in Java with a pluggable backend •Not SQL-like, but ANSI-SQL •Code generation like LLVM •Not only source is open, but open sourced (No private branch)
  • 15. Presto is CREATE TABLE mysql.hello.order_item AS SELECT o.*, i.* FROM hive.world.orders o —― TABLESAMPLE SYSTEM (10) JOIN mongo.deview.lineitem i —― TABLESAMPLE BERNOULLI (40) ON o.orderkey = i.orderkey WHERE conditions..
  • 16. Coordinator Presto - Planner Fragmenter Worker SQL Analyzer Analysis Logical Plan Optimizer Plan Plan Fragment Distributed Query Scheduler Stage Execution Plan Worker Worker Local Execution Planner TASK TASK
  • 17. Presto - Page PAGE - positionCount VAR_WIDTH BLOCK nulls Offsets Values FIEXED_WIDTH BLOCK nulls Values positionCount blockCount 11 F I X E D _ W I D T H po sitionCount bit encoded nullFlags values length values 14 V A R I A B L E _ W I D T H positionCount offsets[0] offsets[1] offsets[2…] offsets[pos-1] offsets[pos] bit encoded nullFlags values Page / Block serialization
  • 18. Presto - Cluster Memory Manager Coordinator Worker Worker Worker GET /v1/memory @Config(“query.max-memory”) = 20G @Config(“query.max-memory-per-node”) = 1G @Config(“resources.reserved-system-memory”) = 40% of -Xmx System reserved-system-memory Reserved max-memory-per-node General Task Block All tasks
  • 19. Presto - IndexManager •LRU worker memory Cache •@Config(task.max-index-memory) = 64M •Table (List<IndexColumn> columns) •Good for Key / Constant tables
  • 20. Presto - Prestogres https://github.com/treasure-data/prestogres •Clients to use PostgreSQL protocol to run queries on Presto •Modified pgpoll-ii •No ODBC driver yet •Supports Tableau, ChartIO and etc
  • 21. Presto - Security •Authentication •Single Sign On - Kerberos, SSL client cert •Authorization •Simple allow / deny
  • 22. Presto - Misc. • Presto Verifier • Presto Benchmark Driver • Query Queue • ${USER} and ${SOURCE} based maxConcurrent, maxQueued • JDBC Driver • Python / Ruby Presto Client (Treasure Data) • Presto Metrics (Treasure Data) • GET /v1/jmx/mbean/{mbean}, /v1/query/{query}, /v1/node/ • Presto Python/Java Event Collector (Treasure Data) • QueryStart, SpitCompletion, QueryCompletion
  • 23. 23
  • 25. Slice - Efficient memory accessor •https://github.com/airlift/slice •ByteBuffer is slow •Slices.allocate(size), Slices.allocateDirect(size) •Slices.wrappedBuffer(byteBuffer) •sun.misc.Unsafe •Address •((DirectBuffer) byteBuffer).getAddress() •unsafe.ARRAY_BYTE_OFFSET + byteBuffer.arrayOffset() •unsafe.getLong(address), unsafe.getInt(address), •unsafe.copyMemory(src, address, dst, address)
  • 26. Airlift - Distributed service framework •https://github.com/airlift/airlift •Core of Presto communication •HTTP •Bootstrap •Node discovery •RESTful API •Dependency Injection •Configuration •Utilities @Path("/v2/event") public class EventResource { @POST public Response createQuery(EventRequests events) { … } } public class CollectorMainModule implements ConfigurationAwareModule {     @Override     public synchronized void configure(Binder binder) {         discoveryBinder(binder).bindHttpAnnouncement("collector");         jsonCodecBinder(binder).bindJsonCodec(EventRequest.class);         jaxrsBinder(binder).bind(EventResource.class);     } public static void main(String[] args){ Bootstrap app = new Bootstrap(ImmutableList.of( new NodeModule(), new DiscoveryModule(), new HttpServerModule(), new JsonModule(), new JaxrsModule(true), new EventModule(), new CollectorMainModule() )); Injector injector = app.strictConfig().initialize(); injector.getInstance(Announcer.class).start(); } } ex) https://github.com/miniway/presto-event-collector
  • 27. Fastutil - Fast Java collection •FastUtil 6.6.0 turned out to be consistently fast. •Koloboke is getting second in many tests. •GS implementation is good enough, but is slower than FastUtil and Koloboke. http://java-performance.info/hashmap-overview-jdk-fastutil-goldman-sachs-hppc-koloboke-trove-january-2015/
  • 28. ASM - Bytecode manipulation package pkg;
 
 public interface SumInterface {
 long sum(long value);
 } public class MyClass implements SumInterface {
 private long result = 0L;
 
 public MyClass(long value) {
 result = value;
 }
 
 @Override
 public long sum(long value) {
 result += value;
 return result;
 }
 } ClassWriter cw = new ClassWriter(0);
 cw.visit(V1_7, ACC_PUBLIC, "pkg/MyClass", null, "java/lang/Object", new String[] { "pkg/SumInterface" });
 cw.visitField(ACC_PRIVATE, "result", "J", null, new Long(0));
 
 // constructor
 MethodVisitor m = cw.visitMethod(ACC_PUBLIC, "<init>", "(J)V", null, null);
 m.visitCode(); 
 // call super()
 m.visitVarInsn(ALOAD, 0); // this
 m.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", “()V", false);
  • 29. ASM - Bytecode manipulation (Cont.) // this.result = value
 m.visitVarInsn(ALOAD, 0); // this
 m.visitVarInsn(LLOAD, 1 ); // value
 m.visitFieldInsn(PUTFIELD, "pkg/MyClass", "result", "J");
 m.visitInsn(RETURN);
 m.visitMaxs(-1, -1).visitEnd();
 
 // public long sum(long value)
 m = cw.visitMethod(ACC_PUBLIC , "sum", "(J)J", null, null);
 m.visitCode(); 
 m.visitVarInsn(ALOAD, 0); // this
 m.visitVarInsn(ALOAD, 0); // this
 m.visitFieldInsn(GETFIELD, "pkg/MyClass", "result", "J");
 m.visitVarInsn(LLOAD, 1); // value
 // this.result + value
 m.visitInsn(LADD); 
 m.visitFieldInsn(PUTFIELD, "pkg/MyClass", "result", "J");
 
 m.visitVarInsn(ALOAD, 0); // this
 m.visitFieldInsn(GETFIELD, "pkg/MyClass", "result", "J");
 m.visitInsn(LRETURN);
 m.visitMaxs(-1, -1).visitEnd();
 
 cw.visitEnd();
 byte[] bytes = cw.toByteArray(); ClassLoader.defindClass(bytes)
  • 30. Library - Misc. •JDK 8u40 + •Guice - Lightweight dependency injection •Guava - Replacing Java8 Stream, Optional and Lambda •ANTLR4 - Parser generator, SQL parser •Jetty - HTTP Server and Client •Jackson - JSON •Jersey - RESTful API
  • 31. Byte Code Generation Function Variable Binding
  • 32. Code Generation •ASM •Runtime Java classes and methods generation base on SQL •Where •Filter and Projection •Join Lookup source •Join Probe •Order By •Aggregation
  • 33. Code Generation - Filter SELECT * FROM lineitem WHERE orderkey = 100 AND quantity = 200 AND EQ (#0,100) EQ (#1,200) Logical Planner class AndOperator extends Operator { private Operator left = new EqualOperator(#1, 100); private Operator right = new EqualOperator(#2, 200); @Override public boolean evaluate(Cursor cur) { if (!left.evaluate(cur)) { return false; } return right.evaluate(cur); } } class EqualOperator extends Operator { @Override public boolean evaluate(Cursor c) { return cur.getValue(position).equals(value); } }
  • 34. Code Generation - Filter // invoke MethodHandle( $operator$EQUAL(#0, 100) ) push cursor.getValue(#0) push 100 $statck = invokeDynamic boostrap(0) $operator$EQUAL      if (!$stack) { goto end; } push cursor.getValue(#1) push 200 $stack = invokeDynamic boostrap(0) $operator$EQUAL      end:       return $stack @ScalarOperator(EQUAL) @SqlType(BOOLEAN) public static boolean equal(@SqlType(BIGINT) long left, @SqlType(BIGINT) long right){     return left == right; } => MethodHandle(“$operator$EQUAL(long, long): boolean”) AND $op$EQ (#0,100) $op$EQ (#1,200) Local Execution Planner
  • 35. Code Generation - Join Lookup Source SELECT col1, col2, col3 FROM tabA JOIN tabB ON tabA.col1 = tabB.colX /* BIGINT */ AND tabA.col2 = tabB.colY /* VARCHAR */ Page Block(colY) Block(colX) PagesIndex 0,0 0,1 0,1023 2,100 Block(colX) Block(colY) B(X) B(Y) B(X) B(X) B(Y) B(Y) addresses channels Lookup Source JoinProbe -1 -1 3000 -1 1023 100 -1 PagesHash - hashRow - equalsRow ROW hash Found!
  • 36. Code Generation - PageHash class PagesHash {    List<Type> types = [BIGINT, VARCHAR]    List<Integer> hashChannels = [0,1]    List<List<Block>> channels = [ [BLOCK(colX), BLOCK(colX), ...] ,               [BLOCK(colY), BLOCK(colY), ...] ]  } class (Compiled)PageHash {      Type type_colX = BIGINT      Type type_colY = VARCHAR      int hashChannel_colX = 0      int hashChannel_colY = 1      List<Block> channel_colX = [ BLOCK(colX), BLOCK(colX), … ]      List<Block> channel_colY = [ BLOCK(colY), BLOCK(colY), … ] }
  • 37. Code Generation - PageHash (Cont.) long hashRow (int position, Block[] blocks) { int result = 0;   for (int i = 0; i < hashChannels.size(); i++) { int hashChannel = hashChannels.get(i);        Type type = types.get(hashChannel);             result = result * 31 +  type.hash(blocks[i], position);     } return result; } long (Compiled)hashRow (int position, Block[] blocks) {         int result = 0;         result = result * 31 + type_colX.hash(block[0], position);         result = result * 31 + type_colY.hash(block[1], position);         return result; }
  • 38. Code Generation - PageHash (Cont.) boolean equalsRow ( int leftBlockIndex, int leftPosition,  int rightPosition, Block[] rightBlocks) {     for (int i = 0; i < hashChannels.size(); i++) {     int hashChannel = hashChannels.get(i);        Type type = types.get(hashChannel); Block leftBlock =  channels.get(hashChannel) .get(leftBlockIndex);        if (!type.equalTo(leftBlock, leftPosition,   rightBlocks[i], rightPosition)) {             return false;         }     }     return true; } boolean (Compiled)equalsRow ( int leftBlockIndex, int leftPosition,  int rightPosition, Block[] rightBlocks) {     Block leftBlock =  channels_colX.get(leftBlockIndex);     if (!type.equalTo(leftBlock, leftPosition,  rightBlocks[0], rightPosition)) {             return false;     }     leftBlock =  channels_colY.get(leftBlockIndex);     if (!type.equalTo(leftBlock, leftPosition,  rightBlocks[1], rightPosition)) {             return false;     }     return true; }
  • 39. Method Variable Binding 1. regexp_like(string, pattern) → boolean 2. regexp_like(string, cast(pattern as RegexType))  // OperatorType.CAST  3. regexp_like(string, new Regex(pattern)) 4. MethodHandle handle = MethodHandles.insertArgument(1, new Regex(pattern)) 5. handle.invoke (string) @ScalarOperator(OperatorType.CAST) @SqlType(“RegExp”) public static Regex castToRegexp(@SqlType(VARCHAR) Slice pattern){   return new Regex(pattern.getBytes(), 0, pattern.length());  } @ScalarFunction @SqlType(BOOLEAN) public static boolean regexpLike(@SqlType(VARCHAR) Slice source, @SqlType(“RegExp”) Regex pattern){     Matcher m = pattern.matcher(source.getBytes());     int offset = m.search(0, source.length());     return offset != -1; }
  • 41. Plugin •Hive •Hadoop 1, Hadoop2, CDH4, CDH 5 •MySQL •PostgreSQL •Cassandra •MongoDB •Kafka •Raptor •Machine Learning •BlackHole •JMX •TPC-H •Example
  • 42. Plugin - Raptor •Storage data in flash on the Presto machines in ORC format •Metadata is stored in MySQL (Extendable) •Near real-time loads (5 - 10mins) •3TB / day, 80B rows/day , 5 secs query •CREATE VIEW myview AS SELECT … •DELETE FROM tab WHERE conditions… •UPDATE (Future) •Coarse grained Index : min / max value of all columns •Compaction •Backup Store (Extendable) No more ?!
  • 43. Plugin - How to write •https://prestodb.io/docs/current/develop/spi-overview.html •ConnectorFactory •ConnectorMetadata •ConnectorSplitManager •ConnectorHandleResolver •ConnectorRecordSetProvider (PageSourceProvider) •ConnectorRecordSinkProvider (PageSinkProvider) •Add new Type •Add new Function (A.K.A UDF)
  • 44. Plugin - MongoDB •https://github.com/facebook/presto/pull/3337 •5 Non-business days •Predicate Pushdown •Add a Type (ObjectId) •Add UDFs (objectid(), objectid(string)) public class MongoPlugin implements Plugin {     @Override     public <T> List<T> getServices(Class<T> type) {         if (type == ConnectorFactory.class) {            return ImmutableList.of( new MongoConnectorFactory(…));         } else if (type == Type.class) {             return ImmutableList.of(OBJECT_ID);         } else if (type == FunctionFactory.class) {             return ImmutableList.of( new MongoFunctionFactory(typeManager));         }         return ImmutableList.of();     } }
  • 45. Plugin - MongoDB class MongoFactory implements ConnectorFactory { @Override public Connector create(String connectorId) { Bootstrap app = new Bootstrap(new MongoClientModule()); return app.initialize() .getInstance(MongoConnector.class); } } class MongoClientModule implements Module { @Override public void configure(Binder binder){ binder.bind(MongoConnector.class) .in(SINGLETON); … configBinder(binder) .bindConfig(MongoClientConfig.class); } } class MongoConnector implements Connector { @Inject public MongoConnector( MongoSession mongoSession, MongoMetadata metadata, MongoSplitManager splitManager, MongoPageSourceProvider pageSourceProvider, MongoPageSinkProvider pageSinkProvider, MongoHandleResolver handleResolver) { … } }
  • 46. Plugin - MongoDB UDF public class MongoFunctionFactory         implements FunctionFactory {     @Override     public List<ParametricFunction> listFunctions()     {         return new FunctionListBuilder(typeManager)                 .scalar(ObjectIdFunctions.class)                 .getFunctions();     } } public class ObjectIdType         extends AbstractVariableWidthType {     ObjectIdType OBJECT_ID = new ObjectIdType();     @JsonCreator     public ObjectIdType() {         super(parseTypeSignature("ObjectId"),  Slice.class);     } } public class ObjectIdFunctions {     @ScalarFunction("objectid")     @SqlType("ObjectId")     public static Slice ObjectId() {         return Slices.wrappedBuffer( new ObjectId().toByteArray());     }     @ScalarFunction("objectid")     @SqlType("ObjectId")     p.s Slice ObjectId(@SqlType(VARCHAR) Slice value) {         return Slices.wrappedBuffer( new ObjectId(value.toStringUtf8()).toByteArray())     }     @ScalarOperator(EQUAL)     @SqlType(BOOLEAN)     p.s boolean equal(@SqlType("ObjectId") Slice left, @SqlType("ObjectId") Slice right) {         return left.equals(right);     } }
  • 48. Presto - Future •Cost based optimization •Join Hint (Right table must be smaller) •Huge Join / Aggregation •Coordinator High Availability •Task Recovery •Work Stealing •Full Pushdown •Vectorization • ODBC Driver (Early 2016, Teradata) • More security (LDAP, Grant SQL)