From 7ee4a54558a82868512385ef7c326921767dbba6 Mon Sep 17 00:00:00 2001 From: JimZhang Date: Thu, 8 Dec 2022 10:51:13 +0800 Subject: [PATCH] docs: linux, raft, flink --- content/posts/Raft-Consensus-Algorithm.md | 12 ++++++++++++ content/posts/flink-kubernetes-standalone.md | 14 ++++++++++++++ content/posts/linux-command.md | 10 ++++++++++ 3 files changed, 36 insertions(+) create mode 100644 content/posts/Raft-Consensus-Algorithm.md create mode 100644 content/posts/flink-kubernetes-standalone.md create mode 100644 content/posts/linux-command.md diff --git a/content/posts/Raft-Consensus-Algorithm.md b/content/posts/Raft-Consensus-Algorithm.md new file mode 100644 index 0000000..2486211 --- /dev/null +++ b/content/posts/Raft-Consensus-Algorithm.md @@ -0,0 +1,12 @@ ++++ +title = "Raft共识协议的一些细节" +date = 2022-10-13 +[taxonomies] +tags=["Raft","分布式"] ++++ +## Log compact机制 +snapshot中需要对log进行compact,防止log过多对服务造成大量压力。 +### compact策略 +- 执行snapshot时,删除上次snapshot之前的数据 +- 执行snapshot时,固定保留最后n条entry +- leader计算近期(分钟级别)心跳中所有follower的next_index最小值,再保留前n条entry \ No newline at end of file diff --git a/content/posts/flink-kubernetes-standalone.md b/content/posts/flink-kubernetes-standalone.md new file mode 100644 index 0000000..03ab90b --- /dev/null +++ b/content/posts/flink-kubernetes-standalone.md @@ -0,0 +1,14 @@ ++++ +title = "Flink standalone on kubernetes" +date = 2022-09-08 +draft = true +[taxonomies] +tags=["flink","document"] ++++ + +## start job +### start job from savepoint on flink webui +- select job jar +- input job class refrence path +- configuration global `parallelism`, `args`, `savepoint path` +> eg: use s3 savepoint dir `s3://flink/savepoint/savepoint-ee796f-2850304e783a` diff --git a/content/posts/linux-command.md b/content/posts/linux-command.md new file mode 100644 index 0000000..dbdb256 --- /dev/null +++ b/content/posts/linux-command.md @@ -0,0 +1,10 @@ ++++ +title = "一些linux命令" +date = 2022-09-15 +[taxonomies] +tags=["linux"] ++++ +### 带进度的wc +```bash +awk 'BEGIN {T=0} (T!=systime()) { printf "%s %s\n",NR,$0 ; T=systime()} END { print NR}' +``` \ No newline at end of file