|NO.Z.00025|——————————|BigDataEnd|——|Hadoop&实时数仓.V05|——|项目.v05|ODS层处理|将kafka中的维表写入DIM层.V2|

一、启动相关服务
### --- 启动相关服务

~~~     # 启动zookeeper服务
[root@hadoop01 ~]# ./zk.sh start
~~~     # 启动kafka服务:所有节点
[root@hadoop01 ~]# kafka-server-start.sh -daemon /opt/yanqi/servers/kafka_2.12/config/server.properties
~~~     # 启动hdfs服务
[root@hadoop01 ~]# start-dfs.sh
 
~~~     # 启动yarn服务:可以不启动
[root@hadoop03 ~]# start-yarn.sh
~~~     # 启动mysql服务

[root@hadoop03 ~]# systemctl start mysqld
~~~     # 启动canal服务

[root@hadoop02 ~]# sh /opt/yanqi/servers/canal/bin/startup.sh
~~~     # 启动hbash服务

[root@hadoop02 ~]# start-hbase.sh
二、在hbash中创建表
~~~     # 在hbash中创建yanqi_trade_orders,yanqi_area表

[root@hadoop02 ~]# /opt/yanqi/servers/hbase-1.3.1/bin/hbase shell
hbase(main):056:0> create 'yanqi_trade_orders' , 'f1'
hbase(main):056:0> create 'yanqi_area' , 'f1'
~~~     # 查看orders表中的数据

hbase(main):004:0> scan 'yanqi_area'
ROW                                         COLUMN+CELL 
hbase(main):001:0> scan  'yanqi_trade_orders'
ROW                                         COLUMN+CELL
~~~当前没有数据
三、启动kafka生产者消费者
~~~     # 启动kafka生产者

[root@hadoop02 ~]# kafka-console-producer.sh --broker-list hadoop02:9092 --topic canal
~~~     # 启动kafka消费者

[root@hadoop02 ~]# kafka-console-consumer.sh --zookeeper hadoop02:2181/myKafka --topic canal --from-beginning
~~~等待消费数据

 
 
 
 
 
 
 
 
 

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

 

 

posted on   yanqi_vip  阅读(7)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示