starburstdata 团队提供了一个docker 版本的presto,其中已经内置了几个connectors

  • tpch
  • tpcds
  • memory
  • backhole
  • jmx
  • system

pull docker images

镜像稍大,最好使用加速

docker pull starburstdata/presto

启动

docker run -d -p 8080:8080  --name demo starburstdata/presto

UI 效果

进入容器

docker exec -it demo presto-cli

查询node

select * from system.runtime.nodes;
               node_id | http_uri | node_version |
--------------------------------------+------------------------+--------------+-
 32329c8b-5918-488c-93ae-cb7a575f6ce3 | http://172.17.0.2:8080 | 312-e.1 |
(1 row)
Query 20190710_073434_00019_ucty8, FINISHED, 1 node
Splits: 17 total, 17 done (100.00%)
0:00 [1 rows, 72B] [2 rows/s, 146B/s]

简单查询

  • 查看catalogs
show catalogs
 blackhole
 jmx
 memory
 system
 tpcds
 tpch
 
 
  • 查询jmx catlog
SHOW TABLES FROM jmx.current;
com.sun.management:type=diagnosticcommand
 com.sun.management:type=hotspotdiagnostic
 io.airlift.discovery.client:name=announcer
 io.airlift.discovery.client:name=serviceinventory
 io.airlift.discovery.store:name=dynamic,type=distributedstore
 io.airlift.discovery.store:name=dynamic,type=httpremotestore
 io.airlift.discovery.store:name=dynamic,type=replicator
 io.airlift.event.client:name=eventclient
 io.airlift.http.client:name=fordiscoveryclient,type=httpclient
 io.airlift.http.client:name=fordynamicstore,type=httpclient
 io.airlift.http.client:name=foreventclient,type=httpclient
 io.airlift.http.client:name=forexchange,type=httpclient
 io.airlift.http.client:name=forfailuredetector,type=httpclient
 io.airlift.http.client:name=formemorymanager,type=httpclient
 io.airlift.http.client:name=fornodemanager,type=httpclient
 io.airlift.http.client:name=forscheduler,type=httpclient
 io.airlift.http.client:name=forworkerinfo,type=httpclient
 io.airlift.http.server:context=http/1.1|h2c@73d62b5,id=0,type=httpserverchannel
 io.airlift.http.server:id=0,type=classpathresourcehandler
 io.airlift.http.server:id=0,type=statsrecordinghandler
 io.airlift.http.server:id=1,type=classpathresourcehandler
 io.airlift.http.server:name=httpserver
 io.airlift.http.server:name=requeststats
 io.airlift.jmx:name=stacktracembean
 io.airlift.log:name=logging
 io.airlift.node:name=nodeinfo
 io.airlift.stats:name=pausemeter
 java.lang:na
  • 查询数据
SELECT node, vmname, vmversion
     -> FROM jmx.current."java.lang:type=runtime";

效果

          node | vmname | vmversion
--------------------------------------+--------------------------+------------
 32329c8b-5918-488c-93ae-cb7a575f6ce3 | OpenJDK 64-Bit Server VM | 25.212-b04
(1 row)
Query 20190710_072619_00016_ucty8, FINISHED, 1 node
Splits: 17 total, 17 done (100.00%)
0:00 [1 rows, 70B] [4 rows/s, 325B/s]

create table 操作

  • 简单create
CREATE TABLE memory.default.nation AS
     -> SELECT * from tpch.tiny.nation;
CREATE TABLE: 25 rows
Query 20190710_072840_00017_ucty8, FINISHED, 1 node
Splits: 38 total, 38 done (100.00%)
0:04 [25 rows, 0B] [6 rows/s, 0B/s]
  • insert 数据
INSERT INTO memory.default.nation
SELECT * FROM tpch.tiny.nation;
  • 查询
SELECT * FROM memory.default.nation;
 nationkey | name | regionkey |
-----------+----------------+-----------+---------------------------------------
         0 | ALGERIA | 0 | haggle. carefully final deposits dete
         1 | ARGENTINA | 1 | al foxes promise slyly according to th
         2 | BRAZIL | 1 | y alongside of the pending deposits. c
         3 | CANADA | 1 | eas hang ironic, silent packages. slyl
         4 | EGYPT | 4 | y above the carefully unusual theodoli
         5 | ETHIOPIA | 0 | ven packages wake quickly. regu
         6 | FRANCE | 3 | refully final requests. regular, ironi
         7 | GERMANY | 3 | l platelets. regular accounts x-ray: u
         8 | INDIA | 2 | ss excuses cajole slyly across the pac
         9 | INDONESIA | 2 | slyly express asymptotes. regular dep
        10 | IRAN | 4 | efully alongside of the slyly final de
        11 | IRAQ | 4 | nic deposits boost atop the quickly fi
        12 | JAPAN | 2 | ously. final, express gifts cajole a
        13 | JORDAN | 4 | ic deposits are blithely about the car
        14 | KENYA | 0 | pending excuses haggle furiously depo
        15 | MOROCCO | 0 | rns. blithely bold courts among the cl
        16 | MOZAMBIQUE | 0 | s. ironic, unusual asymptotes wake bli
        17 | PERU | 1 | platelets. blithely pending dependenci
        18 | CHINA | 2 | c dependencies. furiously express noto
        19 | ROMANIA | 3 | ular asymptotes are about the furious
        20 | SAUDI ARABIA | 4 | ts. silent requests haggle. closely ex
        21 | VIETNAM | 2 | hely enticingly express accounts. even
        22 | RUSSIA | 3 | requests against the platelets use ne
        23 | UNITED KINGDOM | 3 | eans boost carefully special requests.
        24 | UNITED STATES | 1 | y final packages. slow foxes cajole qu
(25 rows)
Query 20190710_072942_00018_ucty8, FINISHED, 1 node
Splits: 18 total, 18 done (100.00%)
0:00 [25 rows, 2.67KB] [92 rows/s, 9.89KB/s]

说明

官方文档提供了比较全的说明,而且对于不同的connector,也有详细的使用说明

参考资料

https://hub.docker.com/r/starburstdata/presto
https://prestodb.github.io/
https://prestodb.github.io/docs/current/

presto docker简单试用的更多相关文章

  1. Docker 简单入门

    Docker 简单入门 http://blog.csdn.net/samxx8/article/details/38946737

  2. Docker简单介绍

    Docker简单介绍 Docker是一个能够把开发的应用程序非常方便地部署到容器的开源引擎.由Docker公司团队编写,基于Apache 2.0开源授权协议发行.Docker的主要目的例如以下: 提供 ...

  3. apache airflow docker 运行简单试用

    airflow 是一个编排.调度和监控workflow的平台,由Airbnb开源,现在在Apache Software Foundation 孵化. airflow 将workflow编排为tasks ...

  4. podium micro-frontends 简单试用

    以下是一个简单的podium 试用,包含了layout 以及podlets,使用docker 运行 podium 主要包含了两大部分 podlets 片段服务 layouts 片段组合服务 环境准备 ...

  5. dotnetcore docker 简单运行

    今天试用了下mac 版本的dotnetcore sdk,发现还是很方便的,同时官方的容器运行方式,相对小了好多 同时使用多阶段构建的方式运行dotnetcore 安装sdk 下载地址: https:/ ...

  6. proxysql 学习一 proxysql docker 运行试用

    proxysql 是一个比较强大的mysql proxy 服务,支持动态mysql 实例调整,查询重写,查询cache,监控,数据镜像,读写分离 以及ha,最近已经发布了2.0 ,很值得试用下 环境准 ...

  7. jQuery无刷新上传之uploadify简单试用

    先简单的侃两句:貌似已经有两个月的时间没有写过文章了,不过仍会像以前那样每天至少有一至两个小时是泡在园子里看各位大神的文章.前些天在研究“ajax无刷新上传”方面的一些插件,用SWFUpload实现了 ...

  8. Ubuntu Docker 简单安装 GitLab

    相关博文: Ubuntu 简单安装 Docker Ubuntu 简单安装和配置 GitLab 服务器版本 Ubuntu 16.04 LTS. 1. 安装和配置 安装命令: sudo docker ru ...

  9. docker简单介绍----镜像和容器管理

    docker可以分为三部分:docker镜像   docker仓库  docker容器 docker镜像:一个image可以包含一个镜像,也可以理解为一个系统模板,里面安装了相关应用,也可以是纯净版的 ...

随机推荐

  1. coco2dx--Permission denied

    在终端输入./cocos.py....创建项目时,出现Permission denied,是权限问题,可以先使用chmod命令获得权限,输入chmod u+x ./cocos.py 回车,接着再使用c ...

  2. git 学习笔记---操作标签

    如果标签打错了,也可以删除: $ git tag -d v0.1 Deleted tag 'v0.1' (was f15b0dd) 因为创建的标签都只存储在本地,不会自动推送到远程.所以,打错的标签可 ...

  3. 【Maven基础入门】02 了解POM文件构建

    温故 上一节我们说过:Maven 是一个基于POM文件的构建工具,当然离不开POM文件 POM文件是一个XML标记语言表示的文件,文件就是:pom.xml 一个POM文件包含了项目的基本信息,用于描述 ...

  4. sqlserver安装教程

    1 安装步骤:http://jingyan.baidu.com/article/359911f573f71657fe030603.html 2 当提示装载第二张光盘时,在DAEMON Tools中把第 ...

  5. Parameter 0 of method sqlSessionTemplate in org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration required a single bean, but 2 were found:

    Parameter 0 of method orderSqlSessionFactory in com.config.MultipleDBConfig required a single bean, ...

  6. php精度比较函数bccomp

    bccomp (PHP 4, PHP 5, PHP 7) bccomp — 比较两个任意精度的数字 说明 int bccomp ( string $left_operand , string $rig ...

  7. SpringBoot启动原理详解

    SpringBoot和Spring相比,有着不少优势,比如自动配置,jar直接运行等等.那么SpringBoot到底是怎么启动的呢? 下面是SpringBoot启动的入口: @SpringBootAp ...

  8. 手写MQ框架(三)-客户端实现

    一.背景 书接手写MQ框架(二)-服务端实现  ,前面介绍了服务端的实现.但是具体使用框架过程中,用户肯定是以客户端的形式跟服务端打交道的.客户端的好坏直接影响了框架使用的便利性. 虽然框架目前是通过 ...

  9. Ubuntu 系统装机指南

    1.vim设置 2.git配置 3.系统性能监视器:Ubuntu安装系统监视器 4.编译环境安装:sudo apt-get install build-essential

  10. 【DATAGUARD】物理dg配置客户端无缝切换 (八.1)--Data Guard Broker 的配置

    [DATAGUARD]物理dg配置客户端无缝切换 (八.1)--Data Guard Broker 的配置 一.1  BLOG文档结构图       一.2  前言部分   一.2.1  导读 各位技 ...