安装

wget https://static.imply.io/release/imply-2.5.15.tar.gz
tar zxvf imply-2.5..tar.gz -C /usr/local/
cd imply-2.5.
nohup bin/supervise -c conf/supervise/quickstart.conf > quickstart.log &

查看启动日志

[root@localhost imply-2.5.]# tail -f quickstart.log
[Sat Jun :: ] Running command[zk], logging to[/usr/local/imply-2.5./var/sv/zk.log]: bin/run-zk conf-quickstart
[Sat Jun :: ] Running command[coordinator], logging to[/usr/local/imply-2.5./var/sv/coordinator.log]: bin/run-druid coordinator conf-quickstart
[Sat Jun :: ] Running command[broker], logging to[/usr/local/imply-2.5./var/sv/broker.log]: bin/run-druid broker conf-quickstart
[Sat Jun :: ] Running command[historical], logging to[/usr/local/imply-2.5./var/sv/historical.log]: bin/run-druid historical conf-quickstart
[Sat Jun :: ] Running command[overlord], logging to[/usr/local/imply-2.5./var/sv/overlord.log]: bin/run-druid overlord conf-quickstart
[Sat Jun :: ] Running command[middleManager], logging to[/usr/local/imply-2.5./var/sv/middleManager.log]: bin/run-druid middleManager conf-quickstart
[Sat Jun :: ] Running command[imply-ui], logging to[/usr/local/imply-2.5./var/sv/imply-ui.log]: bin/run-imply-ui-quickstart conf-quickstart

可见启动了如下服务

服务 简介 访问地址
zookeeper 分布式协调服务 ——
coordinator 协调节点,管理集群状态 http://localhost:8081/#/
broker 查询节点,处理查询请求 http://localhost:8082/druid/v2
historical 历史节点,管理历史数据 http://localhost:8083/druid/v2
overlord 统治节点,管理数据写入任务 http://localhost:8090/console.html
middleManager 中间管理者,负责写数据处理 ——
imply-ui 数据查询Web UI http://localhost:9095/datasets/

数据导入与查询

导入离线数据与查询

数据导入与查询

导入离线数据与查询

  • quickstart/wikipedia-2016-06-27-sampled.json文件包含了维基百科的一些日志数据(每行是一个JSON字符串)

  • quickstart/wikipedia-index.json文件为离线写入任务的描述文件,其用JSON格式描述了任务的数据源、时间信息、维度信息、指标信息等

将这些数据导入到Druid中

bin/post-index-task --file quickstart/wikipedia-index.json

可能会报“ImportError: No module named argparse”的错误,执行pip install argparse安装即可解决

bin/post-index-task --file quickstart/wikipedia-index.json
Beginning indexing data for wikipedia
Task started: index_wikipedia_2018--09T04::.580Z
Task log: http://localhost:8090/druid/indexer/v1/task/index_wikipedia_2018-06-09T04:03:26.580Z/log
Task status: http://localhost:8090/druid/indexer/v1/task/index_wikipedia_2018-06-09T04:03:26.580Z/status
Task index_wikipedia_2018--09T04::.580Z still running...
Task index_wikipedia_2018--09T04::.580Z still running...
Task finished with status: SUCCESS
Completed indexing data for wikipedia. Now loading indexed data onto the cluster...
wikipedia is 0.0% finished loading...
wikipedia loading complete! You may now query your data

查询数据

访问http://localhost:9095,可以查看当前数据集的概况和字段信息等

查询编辑次数TOP5的页面

方式一切到SQL标签,输入以下SQL

SELECT page, COUNT(*) AS Edits
FROM wikipedia
WHERE "__time" BETWEEN TIMESTAMP '2016-06-27 00:00:00' AND TIMESTAMP '2016-06-28 00:00:00'
GROUP BY page
ORDER BY Edits
DESC LIMIT 5

方式二直接通过CURL查询

quickstart/wikipedia-top-pages.json中定了查询的JSON文件

curl -X 'POST' -H 'Content-Type:application/json' -d @quickstart/wikipedia-top-pages.json http://localhost:8082/druid/v2?pretty

返回

[ {
"timestamp" : "2016-06-27T00:00:11.080Z",
"result" : [ {
"count" : 29,
"page" : "Copa América Centenario"
}, {
"count" : 16,
"page" : "User:Cyde/List of candidates for speedy deletion/Subpage"
}, {
"count" : 16,
"page" : "Wikipedia:Administrators' noticeboard/Incidents"
}, {
"count" : 15,
"page" : "2016 Wimbledon Championships – Men's Singles"
}, {
"count" : 15,
"page" : "Wikipedia:Administrator intervention against vandalism"
} ]
} ]

实时导入与查询

发送数据

bin/generate-example-metrics可以产生一些随机的样例metric,运行下面的语句

[root@localhost imply]# bin/generate-example-metrics | curl -XPOST -H'Content-Type: application/json' --data-binary @-
http://localhost:8200/v1/post/tutorial-tranquility-server

返回结果如下

{"result":{"received":,"sent":}}

Imply.io单机安装的更多相关文章

  1. redis 的单机安装

    redis 单机安装 参考文档地址:https://www.cnblogs.com/withfeel/p/10655994.html 1,下载redis,下载地址http://download.red ...

  2. (原) 1.1 Zookeeper单机安装

    本文为原创文章,转载请注明出处,谢谢 zookeeper 单机安装配置 1.安装前准备 linux系统(此文环境为Centos6.5) Zookeeper安装包,官网https://zookeeper ...

  3. Linux下Kafka单机安装配置方法(图文)

    Kafka是一个分布式的.可分区的.可复制的消息系统.它提供了普通消息系统的功能,但具有自己独特的设计.这个独特的设计是什么样的呢 介绍 Kafka是一个分布式的.可分区的.可复制的消息系统.它提供了 ...

  4. Ubuntu 下 Neo4j单机安装和集群环境安装

    1. Neo4j简介 Neo4j是一个用Java实现的.高性能的.NoSQL图形数据库.Neo4j 使用图(graph)相关的概念来描述数据模型,通过图中的节点和节点的关系来建模.Neo4j完全兼容A ...

  5. github.io hexo 安装

    /***************************************************************** * github.io hexo 安装 * 说明: * 本文记录h ...

  6. Hbase单机安装部署

    Hbase单机安装部署 http://blogxinxiucan.sh1.newtouch.com/2017/07/27/Hbase单机安装部署/ 下载Hbase Hbase官网下载地址 http:/ ...

  7. 单机安装Hadoop

    单机安装hadoop ------------------------------------------------------------------ 操作系统:centos7 64 位 hado ...

  8. cenots7单机安装Kubernetes

    关于什么是Kubernetes请看另一篇内容:http://www.cnblogs.com/boshen-hzb/p/6482734.html 一.环境搭建 master安装的组件有: docker ...

  9. Linux下Kafka单机安装配置方法

    Kafka是一个分布式的.可分区的.可复制的消息系统.它提供了普通消息系统的功能,但具有自己独特的设计.这个独特的设计是什么样的呢? 首先让我们看几个基本的消息系统术语: •Kafka将消息以topi ...

随机推荐

  1. 从头搭建一个React应用

    node,webpack这些就不一一介绍怎么安装了,默认大家都知道. 一.npm install -g create-react-app 首先全局安装react的脚手架工具 create-react- ...

  2. String,StringBuffer和StringBuilder比较

    String:查看源码得知,String类的声明是:public final,所以可以很清楚的知道,fianl的话是改变不了的,所以,如果我们用String来操作字符串的时候,一旦我们字符串的值改变, ...

  3. Gradle 1.12用户指南翻译——第六十五章. Maven 发布(新)

    其他章节的翻译请参见:http://blog.csdn.net/column/details/gradle-translation.html翻译项目请关注Github上的地址:https://gith ...

  4. Vue学习笔记 ——computed VS methods

    对于最终的结果,两种方式确实是相同的.然而,不同的是计算属性是基于它们的依赖进行缓存的.计算属性只有在它的相关依赖发生改变时才会重新求值.这就意味着只要 message 还没有发生改变,多次访问 re ...

  5. ubuntu 搜狗输入法成功安装

    第一次成功安装这个破玩意,心里万分高兴啊! 几个条件: 1 ubuntu14.04 2 对的教程 参考文献:http://jingyan.baidu.com/article/ad310e80ae6d9 ...

  6. times(NULL) Segmentation fault

    ****************************************************************************** * times(NULL) Segment ...

  7. LOJ2422 NOIP2015 斗地主 【搜索+贪心】*

    LOJ2422 NOIP2015 斗地主 LINK 题目大意很简单,就是问你斗地主的一分手牌最少多少次出完 然后我们发现对于一种手牌状态,不考虑顺子的情况是可以贪心做掉的 然后我们直接枚举一下顺子出牌 ...

  8. BZOJ2002 Hnoi2010 Bounce 弹飞绵羊 【LCT】【分块】

    BZOJ2002 Hnoi2010 Bounce 弹飞绵羊 Description 某天,Lostmonkey发明了一种超级弹力装置,为了在他的绵羊朋友面前显摆,他邀请小绵羊一起玩个游戏.游戏一开始, ...

  9. 使用 Task.Wait()?立刻死锁(deadlock)

    最近读到一篇异步转同步的文章,发现其中没有考虑到异步转同步过程中发生的死锁问题,所以特地在本文说说异步转同步过程中的死锁问题. 文章作者 林德熙 已经修复了描述: - win10 uwp 异步转同步 ...

  10. pat甲级 1152 Google Recruitment (20 分)

    In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the p ...