【大数据开发运维解决方案】hadoop+kylin安装及官方cube/steam cube案例文档

简介: 对于hadoop+kylin的安装过程在上一篇文章已经详细的写了,请读者先看完上一篇文章再看本本篇文章,本文主要大致介绍kylin官官方提供的常规批量cube创建和kafka+kylin流式构建cube(steam cube)的操作过程,具体详细过程请看官方文档。

对于hadoop+kylin的安装过程在上一篇文章已经详细的写了,
请读者先看完上一篇文章再看本本篇文章,本文主要大致介绍kylin官官方提供的常规批量cube创建和kafka+kylin流式构建cube(steam cube)的操作过程,具体详细过程请看官方文档。

1、常规cube创建案例

[root@hadoop ~]# cd /hadoop/kylin/bin/
[root@hadoop bin]# ./sample.sh 
。。。。。。。
2019-03-12 13:47:05,533 INFO  [close-hbase-conn] client.ConnectionManager$HConnectionImplementation:1774 : Closing zookeeper sessionid=0x1696ffeb12f0016
2019-03-12 13:47:05,536 INFO  [close-hbase-conn] zookeeper.ZooKeeper:684 : Session: 0x1696ffeb12f0016 closed
2019-03-12 13:47:05,536 INFO  [main-EventThread] zookeeper.ClientCnxn:519 : EventThread shut down for session: 0x1696ffeb12f0016
Sample cube is created successfully in project 'learn_kylin'.
Restart Kylin Server or click Web UI => System Tab => Reload Metadata to take effect

看到上面restart一行则说明案例创建完了,重启kylin或则去web页面system窗口点击reload metadatas刷新后界面如下:
image.png
发现左上角选择项目中有了学习项目,然后选择第二个kylin_sales_cube
image.png
选择bulid,随意选择一个12年以后的日期
image.png
然后切换到monitor界面:
image.png
等待cube创建完成。
image.png
做sql查询
image.png
正常创建cube没问题了。接下来看流式构建cube

2、流式构建cube

在流式构建cube之前,需要修改一下官方的案例shell脚本:

[root@hadoop bin]# pwd
/hadoop/kylin/bin
[root@hadoop bin]# vim sample
sample.sh            sample-streaming.sh  
[root@hadoop bin]# vim sample-streaming.sh
将localhost改成ip,因为我kafka配置监听是用的ip,不然会报连接问题
bin/kafka-topics.sh --create --zookeeper 192.168.1.66:2181 --replication-factor 1 --partitions 1 --topic kylin_streaming_topic

echo "Generate sample messages to topic: kylin_streaming_topic."
cd ${KYLIN_HOME}
${dir}/kylin.sh org.apache.kylin.source.kafka.util.KafkaSampleProducer --topic kylin_streaming_topic --broker 192.168.1.66:9092

然后再执行:

[root@hadoop bin]# ./sample-streaming.sh 
Retrieving kafka dependency...
WARNING: Due to limitations in metric names, topics with a period ('.') or underscore ('_') could collide. To avoid issues it is best to use either, but not both.
Created topic "kylin_streaming_topic".
Generate sample messages to topic: kylin_streaming_topic.
Retrieving hadoop conf dir...
KYLIN_HOME is set to /hadoop/kylin
Retrieving hive dependency...
Retrieving hbase dependency...
Retrieving hadoop conf dir...
Retrieving kafka dependency...
Retrieving Spark dependency...
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/hadoop/kylin/tool/kylin-tool-2.4.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/hadoop/hbase/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/hadoop/hive/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/hadoop/kylin/spark/jars/slf4j-log4j12-1.7.16.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
2019-03-12 16:08:56,015 INFO  [main] util.KafkaSampleProducer:58 : args: [--topic, kylin_streaming_topic, --broker, 192.168.1.66:9092]
2019-03-12 16:08:56,057 INFO  [main] util.KafkaSampleProducer:67 : options: ' topic=kylin_streaming_topic broker=192.168.1.66:9092'
2019-03-12 16:08:56,118 INFO  [main] producer.ProducerConfig:279 : ProducerConfig values: 
    acks = all
    batch.size = 16384
    bootstrap.servers = [192.168.1.66:9092]
    buffer.memory = 33554432
    client.id = 
    compression.type = none
    connections.max.idle.ms = 540000
    enable.idempotence = false
    interceptor.classes = []
    key.serializer = class org.apache.kafka.common.serialization.StringSerializer
    linger.ms = 1
    max.block.ms = 60000
    max.in.flight.requests.per.connection = 5
    max.request.size = 1048576
    metadata.max.age.ms = 300000
    metric.reporters = []
    metrics.num.samples = 2
    metrics.recording.level = INFO
    metrics.sample.window.ms = 30000
    partitioner.class = class org.apache.kafka.clients.producer.internals.DefaultPartitioner
    receive.buffer.bytes = 32768
    reconnect.backoff.max.ms = 1000
    reconnect.backoff.ms = 50
    request.timeout.ms = 30000
    retries = 0
    retry.backoff.ms = 100
    sasl.jaas.config = null
    sasl.kerberos.kinit.cmd = /usr/bin/kinit
    sasl.kerberos.min.time.before.relogin = 60000
    sasl.kerberos.service.name = null
    sasl.kerberos.ticket.renew.jitter = 0.05
    sasl.kerberos.ticket.renew.window.factor = 0.8
    sasl.mechanism = GSSAPI
    security.protocol = PLAINTEXT
    send.buffer.bytes = 131072
    ssl.cipher.suites = null
    ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
    ssl.endpoint.identification.algorithm = null
    ssl.key.password = null
    ssl.keymanager.algorithm = SunX509
    ssl.keystore.location = null
    ssl.keystore.password = null
    ssl.keystore.type = JKS
    ssl.protocol = TLS
    ssl.provider = null
    ssl.secure.random.implementation = null
    ssl.trustmanager.algorithm = PKIX
    ssl.truststore.location = null
    ssl.truststore.password = null
    ssl.truststore.type = JKS
    transaction.timeout.ms = 60000
    transactional.id = null
    value.serializer = class org.apache.kafka.common.serialization.StringSerializer

2019-03-12 16:08:56,336 INFO  [main] utils.AppInfoParser:109 : Kafka version : 1.1.1
2019-03-12 16:08:56,340 INFO  [main] utils.AppInfoParser:110 : Kafka commitId : 8e07427ffb493498
Sending 1 message: {"country":"AUSTRALIA","amount":89.73931475539533,"qty":6,"currency":"USD","order_time":1552378136345,"category":"ELECTRONIC","device":"iOS","user":{"gender":"Male","id":
"6a0b60b5-1775-4859-9de3-1474d3dfb3d8","first_name":"unknown","age":16}}2019-03-12 16:08:57,057 INFO  [kafka-producer-network-thread | producer-1] clients.Metadata:265 : Cluster ID: gw1oND0HR7aCl7QfbQnuKg
Sending 1 message: {"country":"US","amount":11.886638622312795,"qty":2,"currency":"USD","order_time":1552378137097,"category":"CLOTH","device":"iOS","user":{"gender":"Male","id":"e822dfba-9
543-4eaf-b59d-6ec76c8efabd","first_name":"unknown","age":15}}Sending 1 message: {"country":"Other","amount":13.719149755619153,"qty":6,"currency":"USD","order_time":1552378137115,"category":"CLOTH","device":"Windows","user":{"gender":"Female","id":"2
bf2a3c2-87a1-4afb-a80f-d3fe4b60cbd6","first_name":"unknown","age":18}}

kylin创建了一个topic,并且每秒轮询的往topic生产数据,我这里生产数据只生产了一部分就停了,然后去kylin的web界面修改他的案例表对应的kafka topic的连接配置:
点击edit
修改localhost为ip
保存退出,现在去build案例给的流式cube
现在就可以查询了。

相关实践学习
基于MaxCompute的热门话题分析
Apsara Clouder大数据专项技能认证配套课程:基于MaxCompute的热门话题分析
相关文章
|
9月前
|
运维 监控 网络协议
【运维干货】一次因 VPN 协议不一致导致的 CPE 速率异常案例
本文分享了一次企业 CPE 主备切换后速率异常的排障案例,重点分析了因主备设备 VPN 协议配置不一致(TCP vs UDP)导致的速率问题,并总结了配置一致性检查、临时改动闭环及协议选择等方面的运维经验。
|
9月前
|
机器学习/深度学习 人工智能 运维
运维告警别乱飞了!AI智能报警案例解析
运维告警别乱飞了!AI智能报警案例解析
818 0
|
11月前
|
运维 监控 关系型数据库
AI 时代的 MySQL 数据库运维解决方案
本文探讨了大模型与MySQL数据库运维结合所带来的变革,介绍了构建结构化运维知识库、选择合适的大模型、设计Prompt调用策略、开发MCP Server以及建立监控优化闭环等关键步骤。通过将自然语言处理能力与数据库运维相结合,实现了故障智能诊断、SQL自动优化等功能,显著提升了MySQL运维效率和准确性。
951 18
|
11月前
|
数据采集 人工智能 大数据
10倍处理效率提升!阿里云大数据AI平台发布智能驾驶数据预处理解决方案
阿里云大数据AI平台推出智能驾驶数据预处理解决方案,助力车企构建高效稳定的数据处理流程。相比自建方案,数据包处理效率提升10倍以上,推理任务提速超1倍,产能翻番,显著提高自动驾驶模型产出效率。该方案已服务80%以上中国车企,支持多模态数据处理与百万级任务调度,全面赋能智驾技术落地。
1400 0
|
11月前
|
SQL 运维 自然语言处理
Dataphin智能化重磅升级!编码难题一扫光,开发运维更高效!
Dataphin重磅推出三大核心智能化能力:智能代码助手提升SQL开发效率;智能运维助手实现移动化任务管理;智能分析通过自然语言生成SQL,助力数据价值释放。未来将持续开放智能ETL、安全助手等能力,助力企业构建高效、稳定的数据资产体系。
746 0
|
10月前
|
人工智能 运维 监控
智能运维与数据治理:基于 Apache Doris 的 Data Agent 解决方案
本文基于 Apache Doris 数据运维治理 Agent 展开讨论,如何让 AI 成为 Doris 数据运维工程师和数据治理专家的智能助手,并在某些场景下实现对人工操作的全面替代。这种变革不仅仅是技术层面的进步,更是数据运维治理思维方式的根本性转变:从“被动响应”到“主动预防”,从“人工判断”到“智能决策”,从“孤立处理”到“协同治理”。
1512 11
智能运维与数据治理:基于 Apache Doris 的 Data Agent 解决方案
|
11月前
|
敏捷开发 运维 数据可视化
DevOps看板工具中的协作功能:如何打破开发、测试与运维之间的沟通壁垒
在DevOps实践中,看板工具通过可视化任务管理和自动化流程,提升开发与运维团队的协作效率。它支持敏捷开发、持续交付,助力团队高效应对需求变化,实现跨职能协作与流程优化。
|
11月前
|
人工智能 运维 自然语言处理
首个智能体模型实测:产品、开发、运维“全包了”
2025年,AI进入“动手”时代。智谱发布新一代大模型GLM-4.5,全球排名第三、国产第一,专为智能体设计,融合推理、编码与智能体能力,实现自主规划与执行任务。通过8个Demo展示其强大能力,涵盖网页设计、课件制作、小游戏开发等,展现其“带手的脑”特性,推动AI从实验室走向真实场景。
541 0
|
11月前
|
存储 SQL 分布式计算
MaxCompute x 聚水潭:基于近实时数仓解决方案构建统一增全量一体化数据链路
聚水潭作为中国领先的电商SaaS ERP服务商,致力于为88,400+客户提供全链路数字化解决方案。其核心ERP产品助力企业实现数据驱动的智能决策。为应对业务扩展带来的数据处理挑战,聚水潭采用MaxCompute近实时数仓Delta Table方案,有效提升数据新鲜度和计算效率,提效比例超200%,资源消耗显著降低。未来,聚水潭将进一步优化数据链路,结合MaxQA实现实时分析,赋能商家快速响应市场变化。
454 0
|
9月前
|
机器学习/深度学习 传感器 分布式计算
数据才是真救命的:聊聊如何用大数据提升灾难预警的精准度
数据才是真救命的:聊聊如何用大数据提升灾难预警的精准度
598 14