实时数仓flick+clickhouse启动命令

发布于:2025-05-28 ⋅ 阅读:(17) ⋅ 点赞:(0)

FlinkCDC环境部署

启动flink-yarn模式

1、启动zookeeper
zk.sh start

2、启动DFS,Hadoop集群
start-dfs.sh

3、启动yarn
start-yarn.sh

4、启动kafka(如果需要在启用)
启动Kafka集群
bin/kafka-server-start.sh -daemon config/server.properties

查看Kafka topic 列表
bin/kafka-topics.sh --bootstrap-server localhost:9092 --list

创建Kafka ods层topic 副本
bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic ods_cars_log --replication-factor 1 --partitions 1
bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic ods_entrance_guard_log --replication-factor 1 --partitions 1

删除Kafka ods层topic
bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic ods_cars_log
bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic ods_entrance_guard_lo

5、启动Flink SQL-client服务
(1)#启动flink yarn-session
bin/yarn-session.sh -s 1 -jm 1024 -tm 1024
#关闭yarn-session命令
bin/yarn application -kill application_1659752641091_0003

(2)#启动flink sql
bin/sql-client.sh -s yarn-session

(3)#设置checkpoint配置
SET ‘execution.checkpointing.interval’ = ‘10s’;
SET ‘parallelism.default’ = ‘3’;

启动Standalone模式flink

flink启动之前需要:
#启动HDFS
start-dfs.sh
#启动集群
start-cluster.sh
#启动历史服务器
historyserver.sh start
启动sql-client:bin/sql-client.sh embedded

CH的命令

1、基于默认配置启动ClickHouse
service clickhouse-server start

2、查看ClickHouse启动进程
ps -ef | grep clickhouse

3、重新启动
systemctl restart clickhouse-server

4、#客户端连接ClickHouse
clickhouse-client

5、#查询数据库
show databases;

用户名:default
密码:123456

在这里插入图片描述


网站公告

今日签到

点亮在社区的每一天
去签到