安装

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. spring boot 教程(一) 构建我的第一个Spring boot

    Spring Boot特点 1. 创建独立的Spring应用程序 2. 嵌入的Tomcat,无需部署WAR文件 3. 简化Maven配置 4. 自动配置Spring 5. 提供生产就绪型功能,如指标, ...

  2. This is very likely to create a memory leak. Stack trace of thread

    1.错误描述 警告: The web application [cmp] appears to have started a thread named [Abandoned connection cl ...

  3. Emgu cv 学习笔记

    http://www.cnblogs.com/CoverCat/p/5003363.html emgu中imagebox与picturebox imagebox 是emgu   设置好厚,新出现的控件 ...

  4. HDU - 1142:A Walk Through the Forest (拓扑排序)

    Jimmy experiences a lot of stress at work these days, especially since his accident made working dif ...

  5. JSP、Java和Servlet获取当前工程的路径

    JSP.Java和Servlet获取当前工程的路径: 1.JSP中取得路径: 以工程名为TEST为例: (1)得到包含工程名的当前页面全路径:request.getRequestURI()结果:/TE ...

  6. vector 介绍

    介绍 这篇文章的目的是为了介绍std::vector,如何恰当地使用它们的成员函数等操作.本文中还讨论了条件函数和函数指针在迭代算法中使用,如在remove_if()和for_each()中的使用.通 ...

  7. pipeline的存储代码

    在spider中最后一个函数返回item时会scrapy会调用pipeline里面的 process_item(self, item, spider):函数并传入item,spider等参数在这里可以 ...

  8. CentOS常用基础命令汇总

    1.关机 (系统的关机.重启以及登出 ) 的命令 shutdown -h now 关闭系统(1) init 0 关闭系统(2) telinit 0 关闭系统(3) shutdown -h hours: ...

  9. python 之 list,tuple,dict,set

    基本类型,  其中set好像提到的很少 list : []  根据字面, 是一个列表,  所以有序, 可以通过序号方位 tuple: ()  是不变的list, 通过序号访问 dict: {},  字 ...

  10. 怎么安装Docker CE 17( Centos 7)

    Docker CE for Centos 7 yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manage ...