数据库
首页 > 数据库> > |NO.Z.00019|——————————|Deployment|——|Hadoop&OLAP数据库管理系统.v19|---------------------------------|Kylin.

|NO.Z.00019|——————————|Deployment|——|Hadoop&OLAP数据库管理系统.v19|---------------------------------|Kylin.

作者:互联网



[BigDataHadoop:Hadoop&OLAP数据库管理系统.V19]                           [Deployment.OLAP数据库管理系统][|Kylin:Kylin构建Cube&实时OLAP.V2|]








一、OLAP环境准备
### --- OLAP环境准备

~~~     # 进入服务部署目录
[root@hadoop02 ~]# cd /opt/yanqi/servers/
~~~     # coordinator
[root@hadoop02 servers]# cp -r kylin-3.1.1/ kylin-3.1.1-master/
~~~     # receiver 
[root@hadoop02 servers]# cp -r kylin-3.1.1/ kylin-3.1.1-receiver/
### --- 开启Kylin进程:依赖服务需要提前启动完成:包括kafka

~~~     # 协调者:kylin进程将充当receiver cluster的coordinator。7070是coordinator的默认端口。
[root@hadoop02 ~]# cd /opt/yanqi/servers/kylin-3.1.1-master/bin/
[root@hadoop02 bin]# ./kylin.sh start
### --- 开启Receiver Process

~~~     # receiver process将作为receiver cluster的工作方。9090是receiver的默认端口。
[root@hadoop02 ~]# cd /opt/yanqi/servers/kylin-3.1.1-receiver/bin/
[root@hadoop02 bin]# ./kylin.sh streaming start
~~~输出参数
Retrieving hbase dependency...
~~~     # 查看进程

[root@hadoop02 bin]# jps
RunJar                          # 协调者
StreamingReceiver               # receiver
### --- 模拟流数据

~~~     # 使用工具,每秒会向以上topic每秒发送100条记录
[root@hadoop02 ~]# kylin.sh org.apache.kylin.source.kafka.util.KafkaSampleProducer \
--topic kylin_streaming_topic1 --broker hadoop01:9092,hadoop02:9092
~~~     # 查看通过kylin.sh加载的数据

~~~     # 提取到一条,是json格式的数据,已进行格式化了
{
    "country": "AUSTRALIA",
    "amount": 54.081247423872725,
    "qty": 9,
    "currency": "USD",
    "order_time": 1637319955203,
    "category": "CLOTH",
    "device": "iOS",
    "user": {
        "gender": "Male",
        "id": "5d1a9877-37e1-07e0-8103-8a2804f6fa6b",
        "first_name": "unknown",
        "age": 21
    }
}
二、创建replica set
三、定义cube流程
### --- 定义cube流程

~~~     步骤:定义数据源 => 定义Model => 定义Cube => Enable Cube => Kafka发送消息
~~~     Model、Cube与前面介绍的方式类似。








===============================END===============================


Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart                                                                                                                                                   ——W.S.Landor



来自为知笔记(Wiz)

标签:v19,kylin,hadoop02,3.1,OLAP,receiver,Kylin,root
来源: https://www.cnblogs.com/yanqivip/p/16159233.html