一、Imply

    Druid 原生的配置较麻烦,在上一篇单机版安装中有所涉及
   Imply 基于Druid 进行了一些组件的开发,提供开源社区版本和商业版,简化了部署,开发了一些应用.https://imply.io/product

二、

安装

  1. 下载nodejs 安装(http://jingyan.baidu.com/article/dca1fa6f48f478f1a5405272.html)
  2. .安装imply
    1. 下载最新版本 imply-1.3.1.tar  https://imply.io/download
    2. tar -xzf imply-1.3.1.tar
  3. 启动
     1[root@Druid imply-1.3.1]# bin/supervise -c conf/supervise/quickstart.conf  -可以nohup 后台执行

三、Imply 数据的发送
        1.修改 tranquility 组件下server.josn 中的数据相关信息 --表名称、维度列、指标列
         修改后的数据结构如下
         

{
    "dataSources": {
        "pageviews": {
            "spec": {
                "dataSchema": {
                    "dataSource": "pageviews",
                    "parser": {
                        "type": "string",
                        "parseSpec": {
                            "timestampSpec": {
                                "format": "auto",
                                "column": "time"
                            },
                            "dimensionsSpec": {
                                "dimensions": [
                                    "url",
                                    "user"
                                ]
                            },
                            "format": "json"
                        }
                    },
                    "granularitySpec": {
                        "type": "uniform",
                        "segmentGranularity": "hour",
                        "queryGranularity": "none"
                    },
                    "metricsSpec": [
                        {
                            "name": "views",
                            "type": "count"
                        },
                        {
                            "name": "latencyMs",
                            "type": "doubleSum",
                            "fieldName": "latencyMs"
                        }
                    ]
                },
                "ioConfig": {
                    "type": "realtime"
                },
                "tuningConfig": {
                    "type": "realtime",
                    "maxRowsInMemory": "100000",
                    "intermediatePersistPeriod": "PT10M",
                    "windowPeriod": "PT10M"
                }
            },
            "properties": {
                "task.partitions": "1",
                "task.replicants": "1"
            }
        }
    },
    "properties": {
        "zookeeper.connect": "localhost",
        "druid.discovery.curator.path": "/druid/discovery",
        "druid.selectors.indexing.serviceName": "druid/overlord",
        "http.port": "8200",
        "http.threads": "8"
    }
View Code

相关文章: