日常笔记

[root@cbp1 ~]# su - hdfs
[hdfs@cbp1 ~]$ hdfs dfsadmin -fetchImage ./
21/02/27 09:23:31 INFO namenode.TransferFsImage: Opening connection to http://cbp1.chinaoly.com:50070/imagetransfer?getimage=1&txid=latest
21/02/27 09:23:31 INFO namenode.TransferFsImage: Image Transfer timeout configured to 60000 milliseconds
21/02/27 09:23:31 INFO namenode.TransferFsImage: Transfer took 0.06s at 4033.33 KB/s
[hdfs@cbp1 ~]$ ll
total 244
-rw-rw-r--. 1 hdfs hdfs 248649 Feb 27 09:23 fsimage_0000000000002207008
[hdfs@cbp1 ~]$ mv fsimage_0000000000002207008 timestamp_`date +%s`
[hdfs@cbp1 ~]$ ll
total 244
-rw-rw-r--. 1 hdfs hdfs 248649 Feb 27 09:23 timestamp_1614389077
[hdfs@cbp1 ~]$ 
[hdfs@cbp1 ~]$ hdfs dfs -mkdir -p /user/cert/problem10
[hdfs@cbp1 ~]$ hdfs dfs -copyFromLocal timestamp_1614389077 /user/cert/problem10/
[hdfs@cbp1 ~]$ 
[hdfs@cbp1 ~]$ hdfs dfs -ls /user/cert/problem10
Found 1 items
-rw-r--r--   3 hdfs supergroup     248649 2021-02-27 09:27 /user/cert/problem10/timestamp_1614389077
[hdfs@cbp1 current]$ hdfs oev -i edits_0000000000002213341-0000000000002214074 -o ~/edit.xml
[hdfs@cbp1 current]$ vim ~/edit.xml 
[hdfs@cbp1 current]$ 

 hdfs:namenode内存+fsimage + editlog

HBase:memstore + hlog+hfile

mysql:binlog +dump备份

:50070查看datanode集群状态

DataNodes usages% (Min/Median/Max/stdDev):    11.96% / 44.69% / 59.21% / 12.03%(这个指标超过5%需要做balance)

搭建、监控、调优、排障、日常操作(开通或回收权限、申请数据导出)

namenode两个关系

第一个关系

第二个关系

Flink中如何保证Exactly Once

如果发生机器或软件故障,重新启动后,Flink应用程序将从最新的checkpoint点恢复处理;Flink会恢复应用程序状态,将输入流回滚到上次checkpoint。

利用checkpoint提供了Exactly Once。

source ----->>operator------->>sink------->>kafka 

kafka------>source ----->operator---->exactly-once

 

posted @ 2021-02-27 09:49  Simon92  阅读(73)  评论(0编辑  收藏  举报