1、架构设计

集群在单台主机上模拟搭建6个节点(3主3从的集群):

2、配置

创建与端口相同的文件夹存储Redis配置文件和持久化文件。

目录如下:

每个节点配置文件如下:

节点1:

bind 192.168.229.3
port 7000
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
daemonize yes

节点2:

bind 192.168.229.3
port 7001
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
daemonize yes

节点3:

bind 192.168.229.3
port 7002
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
daemonize yes

节点4:

bind 192.168.229.3
port 7003
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
daemonize yes

节点5:

bind 192.168.229.3
port 7004
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
daemonize yes

节点6:

bind 192.168.229.3
port 7006
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
daemonize yes

3、脚本

脚本名称:autostart.sh

#!/bin/bash
cd
../bin/redis-server ./redis.conf cd ../
../bin/redis-server ./redis.conf cd ../
../bin/redis-server ./redis.conf cd ../
../bin/redis-server ./redis.conf cd ../
../bin/redis-server ./redis.conf cd ../
../bin/redis-server ./redis.conf

启动每个节点:./autostart.sh

脚本名称:autostop.sh

#!/bin/bash
bin/redis-cli -c -h 192.168.229.3 -p shutdown
bin/redis-cli -c -h 192.168.229.3 -p shutdown
bin/redis-cli -c -h 192.168.229.3 -p shutdown
bin/redis-cli -c -h 192.168.229.3 -p shutdown
bin/redis-cli -c -h 192.168.229.3 -p shutdown

关闭每个节点:./autostop.sh

4、节点加入集群

./bin/redis-cli --cluster create \
192.168.229.3: \
192.168.229.3: \
192.168.229.3: \
192.168.229.3: \
192.168.229.3: \
192.168.229.3: \
--cluster-replicas

5、查看集群

[root@localhost redis-cluster-test]# bin/redis-cli -p  cluster nodes
Could not connect to Redis at 127.0.0.1:: Connection refused
[root@localhost redis-cluster-test]# bin/redis-cli -h 192.168.229.3 -p cluster nodes
e096ad21c0ebdf3b7d69027e913fa3c39efee567 192.168.229.3:@ slave c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae connected
977ed4958c35dcb2ac91b93ebb7a40dbdc1ad6ba 192.168.229.3:@ slave b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b connected
c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 192.168.229.3:@ master - connected -
b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:@ master - connected -
97a9f66809401267d342edf06ab28e7baaf88963 192.168.229.3:@ myself,master - connected -
5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:@ slave 97a9f66809401267d342edf06ab28e7baaf88963 connected

如上图所示:

端口:7000、7001、7003节点为主节点;7002、7004、7005节点为从节点;myself为连接查看信息节点。

6、登录指定节点

[root@localhost redis-cluster-test]# bin/redis-cli -h 192.168.229.3 -p 7000 #登录指定节点
192.168.229.3:7000>

[root@localhost redis-cluster-test]# bin/redis-cli -c -h 192.168.229.3 -p 7000 #集群方式登录指定节点

192.168.229.3:7000> cluster nodes  #查看集群信息
e096ad21c0ebdf3b7d69027e913fa3c39efee567 192.168.229.3:7002@17002 slave c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 0 1572114511000 7 connected
977ed4958c35dcb2ac91b93ebb7a40dbdc1ad6ba 192.168.229.3:7005@17005 slave b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 0 1572114512542 6 connected
c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 192.168.229.3:7003@17003 master - 0 1572114512643 7 connected 10923-16383
b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:7001@17001 master - 0 1572114512542 2 connected 5461-10922
97a9f66809401267d342edf06ab28e7baaf88963 192.168.229.3:7000@17000 myself,master - 0 1572114512000 1 connected 0-5460
5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:7004@17004 slave 97a9f66809401267d342edf06ab28e7baaf88963 0 1572114512000 5 connected
192.168.229.3:7000>

7、集群添加节点

启动创建7006节点,配置如下:

bind 192.168.229.3
port 7006
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
daemonize yes

启动:

../bin/redis-server ./redis.conf

①添加节点到集群并查看:

[root@localhost redis-cluster-test]# bin/redis-cli --cluster add-node 192.168.229.3:7006 192.168.229.3:7000
>>> Adding node 192.168.229.3: to cluster 192.168.229.3:
>>> Performing Cluster Check (using node 192.168.229.3:)
S: 97a9f66809401267d342edf06ab28e7baaf88963 192.168.229.3:
slots: ( slots) slave
replicates 5f4123f86387bd9252ade71940877a5224907fc6
M: 5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
M: c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
S: e096ad21c0ebdf3b7d69027e913fa3c39efee567 192.168.229.3:
slots: ( slots) slave
replicates c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae
S: 977ed4958c35dcb2ac91b93ebb7a40dbdc1ad6ba 192.168.229.3:
slots: ( slots) slave
replicates b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
M: b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All slots covered.
>>> Send CLUSTER MEET to node 192.168.229.3: to make it join the cluster.
[OK] New node added correctly.
[root@localhost redis-cluster-test]# bin/redis-cli -h 192.168.229.3 -p 7000 cluster nodes
e00cecbd042881c04167169f2f0f2df286146160
192.168.229.3:7006@17006 master - 0 1572115865563 0 connected
5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:@ master - connected -
c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 192.168.229.3:@ master - connected -
e096ad21c0ebdf3b7d69027e913fa3c39efee567 192.168.229.3:@ slave c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae connected
977ed4958c35dcb2ac91b93ebb7a40dbdc1ad6ba 192.168.229.3:@ slave b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b connected
b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:@ master - connected -
97a9f66809401267d342edf06ab28e7baaf88963 192.168.229.3:@ myself,slave 5f4123f86387bd9252ade71940877a5224907fc6 connected
[root@localhost redis-cluster-test]#

②删除7006节点,添加从节点:

删除7006文件已有的DB文件,否则在添加节点到集群的时候会报错:
[ERR] Node 192.168.229.3:7006 is not empty. Either the node already knows other nodes (check with CLUSTER NODES) or contains some key in database 0.

[root@localhost 7006]# ls
appendonly.aof nodes.conf redis.conf
[root@localhost 7006]# rm appendonly.aof nodes.conf

../bin/redis-server ./redis.conf  #启动7006节点

[root@localhost redis-cluster-test]# bin/redis-cli --cluster add-node 192.168.229.3:7006 192.168.229.3:7000 --cluster-slave
>>> Adding node 192.168.229.3:7006 to cluster 192.168.229.3:7000
>>> Performing Cluster Check (using node 192.168.229.3:7000)
S: 97a9f66809401267d342edf06ab28e7baaf88963 192.168.229.3:7000
slots: (0 slots) slave
replicates 5f4123f86387bd9252ade71940877a5224907fc6
M: 5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:7004
slots:[0-5460] (5461 slots) master
1 additional replica(s)
M: c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 192.168.229.3:7003
slots:[10923-16383] (5461 slots) master
1 additional replica(s)
S: e096ad21c0ebdf3b7d69027e913fa3c39efee567 192.168.229.3:7002
slots: (0 slots) slave
replicates c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae
S: 977ed4958c35dcb2ac91b93ebb7a40dbdc1ad6ba 192.168.229.3:7005
slots: (0 slots) slave
replicates b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
M: b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:7001
slots:[5461-10922] (5462 slots) master
1 additional replica(s)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
Automatically selected master 192.168.229.3:7004
>>> Send CLUSTER MEET to node 192.168.229.3:7006 to make it join the cluster.
Waiting for the cluster to join

>>> Configure node as replica of 192.168.229.3:7004.
[OK] New node added correctly.

[root@localhost redis-cluster-test]# bin/redis-cli -h 192.168.229.3 -p 7000 cluster nodes  #查看节点信息
5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:7004@17004 master - 0 1572116629602 8 connected 0-5460
c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 192.168.229.3:7003@17003 master - 0 1572116630000 7 connected 10923-16383
e096ad21c0ebdf3b7d69027e913fa3c39efee567 192.168.229.3:7002@17002 slave c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 0 1572116630942 7 connected
977ed4958c35dcb2ac91b93ebb7a40dbdc1ad6ba 192.168.229.3:7005@17005 slave b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 0 1572116629000 6 connected
b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:7001@17001 master - 0 1572116630532 2 connected 5461-10922
97a9f66809401267d342edf06ab28e7baaf88963 192.168.229.3:7000@17000 myself,slave 5f4123f86387bd9252ade71940877a5224907fc6 0 1572116630000 1 connected
407c8781fcfd4e84ebc0dda63c33ef978d826f66 192.168.229.3:7006@17006 slave 5f4123f86387bd9252ade71940877a5224907fc6 0 1572116629917 8 connected
[root@localhost redis-cluster-test]#

③删除7006节点,给指定主节点添加从节点:

bin/redis-cli --cluster add-node 192.168.229.3:7006 192.168.229.3:7000 --cluster-slave --cluster-master-id 3c3a0c74aae0b56170ccb03a76b60cfe7dc1912e

8、删除节点:

[root@localhost redis-cluster-test]# bin/redis-cli --cluster del-node 192.168.229.3:7006 e00cecbd042881c04167169f2f0f2df286146160
>>> Removing node e00cecbd042881c04167169f2f0f2df286146160 from cluster 192.168.229.3:
>>> Sending CLUSTER FORGET messages to the cluster...
>>> SHUTDOWN the node.
[root@localhost redis-cluster-test]# bin/redis-cli -h 192.168.229.3 -p cluster nodes
5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:@ master - connected -
c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 192.168.229.3:@ master - connected -
e096ad21c0ebdf3b7d69027e913fa3c39efee567 192.168.229.3:@ slave c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae connected
977ed4958c35dcb2ac91b93ebb7a40dbdc1ad6ba 192.168.229.3:@ slave b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b connected
b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:@ master - connected -
97a9f66809401267d342edf06ab28e7baaf88963 192.168.229.3:@ myself,slave 5f4123f86387bd9252ade71940877a5224907fc6 connected

9、从节点复制主节点数据

[root@localhost redis-cluster-test]# bin/redis-cli -h 192.168.229.3 -p  cluster nodes
5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:@ master - connected -
c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 192.168.229.3:@ master - connected -
e096ad21c0ebdf3b7d69027e913fa3c39efee567 192.168.229.3:@ slave c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae connected
977ed4958c35dcb2ac91b93ebb7a40dbdc1ad6ba 192.168.229.3:@ slave b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b connected
b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:@ master - connected -
97a9f66809401267d342edf06ab28e7baaf88963 192.168.229.3:@ myself,slave 5f4123f86387bd9252ade71940877a5224907fc6 connected
407c8781fcfd4e84ebc0dda63c33ef978d826f66 192.168.229.3:@ slave 5f4123f86387bd9252ade71940877a5224907fc6 connected
[root@localhost redis-cluster-test]# bin/redis-cli -c -h 192.168.229.3 -p 7006 #手动同步主节点数据
192.168.229.3:> cluster replicate 5f4123f86387bd9252ade71940877a5224907fc6
OK
192.168.229.3:>

从上图可以7006节点为7004节点的从节点,手动触发同步主节点数据。

10、数据分片

添加新节点分片时,需要手动触发。

方式1:引导式

从7001移动100个slots到7004。

[root@localhost redis-cluster-test]# bin/redis-cli --cluster reshard 192.168.229.3:
>>> Performing Cluster Check (using node 192.168.229.3:)
S: 97a9f66809401267d342edf06ab28e7baaf88963 192.168.229.3:
slots: ( slots) slave
replicates 5f4123f86387bd9252ade71940877a5224907fc6
M: 5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
M: c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
S: e096ad21c0ebdf3b7d69027e913fa3c39efee567 192.168.229.3:
slots: ( slots) slave
replicates c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae
S: 977ed4958c35dcb2ac91b93ebb7a40dbdc1ad6ba 192.168.229.3:
slots: ( slots) slave
replicates b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
M: b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
S: 407c8781fcfd4e84ebc0dda63c33ef978d826f66 192.168.229.3:
slots: ( slots) slave
replicates 5f4123f86387bd9252ade71940877a5224907fc6
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All slots covered.
How many slots do you want to move (from to )?
What is the receiving node ID? 5f4123f86387bd9252ade71940877a5224907fc6
Please enter all the source node IDs.
Type 'all' to use all the nodes as source nodes for the hash slots.
Type 'done' once you entered all the source nodes IDs.
Source node #: b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Source node #: done Ready to move slots.
Source nodes:
M: b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
Destination node:
M: 5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
Resharding plan:
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Do you want to proceed with the proposed reshard plan (yes/no)? yes
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
[root@localhost redis-cluster-test]#

方式2:命令式
从7001移动100个slots到7004。

[root@localhost redis-cluster-test]# bin/redis-cli --cluster reshard 192.168.229.3:7000 \
> --cluster-from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b \
> --cluster-to 5f4123f86387bd9252ade71940877a5224907fc6 \
> --cluster-slots 100 \
> --cluster-yes
>>> Performing Cluster Check (using node 192.168.229.3:)
S: 97a9f66809401267d342edf06ab28e7baaf88963 192.168.229.3:
slots: ( slots) slave
replicates 5f4123f86387bd9252ade71940877a5224907fc6
M: 5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
M: c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
S: e096ad21c0ebdf3b7d69027e913fa3c39efee567 192.168.229.3:
slots: ( slots) slave
replicates c7a0a4d6c2df0c1ef4fa64547208ea344c8bdcae
S: 977ed4958c35dcb2ac91b93ebb7a40dbdc1ad6ba 192.168.229.3:
slots: ( slots) slave
replicates b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
M: b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
S: 407c8781fcfd4e84ebc0dda63c33ef978d826f66 192.168.229.3:
slots: ( slots) slave
replicates 5f4123f86387bd9252ade71940877a5224907fc6
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All slots covered. Ready to move slots.
Source nodes:
M: b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
Destination node:
M: 5f4123f86387bd9252ade71940877a5224907fc6 192.168.229.3:
slots:[-] ( slots) master
additional replica(s)
Resharding plan:
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from b0eaa0f5f64afcd24d8ccf881ae5008b932f5e9b
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3:: .
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::
Moving slot from 192.168.229.3: to 192.168.229.3::

Redis集群-主从模式的更多相关文章

  1. (转)基于Redis Sentinel的Redis集群(主从&Sharding)高可用方案

    转载自:http://warm-breeze.iteye.com/blog/2020413 本文主要介绍一种通过Jedis&Sentinel实现Redis集群高可用方案,该方案需要使用Jedi ...

  2. 基于Redis Sentinel的Redis集群(主从Sharding)高可用方案(转)

    本文主要介绍一种通过Jedis&Sentinel实现Redis集群高可用方案,该方案需要使用Jedis2.2.2及以上版本(强制),Redis2.8及以上版本(可选,Sentinel最早出现在 ...

  3. redis集群cluster模式搭建

    实验服务器 :192.168.44.139    192.168.44.138  192.168.44.144 在 192.168.44.139上操作: 将redis的包上传的新建的目录newtouc ...

  4. 基于Redis Sentinel的Redis集群(主从&Sharding)高可用方案

    本文主要介绍一种通过Jedis&Sentinel实现Redis集群高可用方案,该方案需要使用Jedis2.2.2及以上版本(强制),Redis2.8及以上版本(可选,Sentinel最早出现在 ...

  5. php操作redis集群哨兵模式

    前段时间项目里正好用到了redis的集群哨兵部署,因为此前并无了解过,所以一脸懵逼啊,查阅了几篇资料,特此综合总结一下,作为记录. 写在前沿:随着项目的扩张,对redis的依赖也越来越大,为了增强re ...

  6. 查看Redis集群主从对应关系工具

    工具的作用: 1)比"cluster nodes"更为直观的显示结果 2)指出落在同一个IP上的master 3)指出落在同一个IP上的master和slave对 运行效果图: 源 ...

  7. redis集群主从集群搭建、sentinel(哨兵集群)配置以及Jedis 哨兵模式简要配置

    前端时间项目上为了提高平台性能,为应用添加了redis缓存,为了提高服务的可靠性,redis部署了高可用的主从缓存,主从切换使用的redis自带的sentinel集群.现在权作记录.

  8. Redis Sentinel的Redis集群(主从&Sharding)高可用方案

    在不使用redis3.0之后版本的情况下,对于redis服务端一般是采用Sentinel哨兵模式,也就是一主多备的方式. 这里,先抛出三个问题, 问题1:单节点宕机数据丢失?问题2:多节点(节点间没有 ...

  9. Redis集群-Cluster模式

    我理解的此模式与哨兵模式根本区别: 哨兵模式采用主从复制模式,主和从数据都是一致的.全量数据: Cluster模式采用数据分片存储,对每个 key 计算 CRC16 值,然后对 16384 取模,可以 ...

随机推荐

  1. 【前端背景UI】鼠标磁性动态蜘蛛网背景源码

    <div style="float:right;" id="hub_iframe"></div> <script type=&qu ...

  2. 「雕爷学编程」Arduino动手做(14)——倾斜角度模块

    37款传感器和模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是不止37种的.鉴于本人手头积累了一些传感器与模块,依照实践出真知(动手试试)的理念,以学习和交流为目的,这里准备 ...

  3. 6.1Go方法

    第六章 Go方法 在第三章中讲解了struct,面向对象编程OOP已经是一个编程范式了,Go语言同样支持OOP开发. 一个对象就是一个变量,在这个对象中包含了一些方法,一个方法是一个和特殊类型关联的函 ...

  4. MyCat垂直分库

    一.什么是垂直分库 将一类功能的表从一个实例切分到另一个实例,横向扩展实例,增加写负载 目标:将1个实例的4类表拆分多4个实例中 二.垂直切分步骤 2.1收集分析业务模块间的关系,能分几个库 2.2全 ...

  5. oracle的操作-表空间

    查询以创建的表空间 select dbms_metadata.get_ddl('TABLESPACE','你的表空间名称') from dual; --查询空间创建的位置 select t1.name ...

  6. 对比Memcached和Redis,谁才是适合你的缓存?

    Memcached vs Redis 近期公司采购软件,评估时,某软件谈到使用了 Memcached 和 Redis 缓存.在本文中,将研究这两个流行的缓存的异同,方便理解和记忆. 1. Memcac ...

  7. 微信小程序制作个人简历

    使用微信小程序云开发制作自己的个人简历,简单高效. 首先需要了解小程序的基本结构以及云开发模式,及一些css样式基础. 使用小程序云数据库.vant组件库实现简历内容. 最终效果如下: 首先申请个人微 ...

  8. ORCLE 列转行

    字符串转多列 实际上就是拆分字符串的问题,可以使用 substr.instr.regexp_substr函数方式 字符串转多行 使用union all函数等方式 wm_concat函数 wm_conc ...

  9. SpringBoot外部化配置使用Plus版

    本文如有任何纰漏.错误,请不吝指正! PS: 之前写过一篇关于SpringBoo中使用配置文件的一些姿势,不过嘛,有句话(我)说的好:曾见小桥流水,未睹观音坐莲!所以再写一篇增强版,以便记录. 序言 ...

  10. 【转发】基本adbui命令使用 可做图像识别

    原文请参考,很详细:hao1032/adbui 非常详细,感谢整理!!首先了解下 adb命令大全,adb最全的命令