
Redis
江南烟雨゛断桥殇╮
这个作者很懒,什么都没留下…
展开
-
CentOS 安装redis(分布式)
一、安装实操Redis下载地址 http://learning.happymmall.com/%E4%BA%8C%E6%9C%9F%E9%9B%86%E7%BE%A4%E5%8F%8A%E7%BC%93%E5%AD%98%E5%88%86%E5%B8%83%E5%BC%8FJava%E7%AB%AF/redis-2.8.0-linux-mac.tar.gz 1、下载Redis...原创 2018-10-11 14:48:07 · 326 阅读 · 0 评论 -
Jedis配置优化
Commons-pool配置(1) ——资源数控制 Commons-pool配置(2) ——借还参数 适合的MaxTot...原创 2018-12-19 09:53:39 · 737 阅读 · 0 评论 -
Jedis基本使用
简单使用 Jedis两种连接方式1、Jedis直连(每次使用需要new jedis对象) 2、Jedis连接池(当我们需要对Redis操作时,只需要从Jedis连接池里去借用,不需要时还回来) 方案对比...原创 2018-12-18 17:06:02 · 223 阅读 · 0 评论 -
Redis知识点总结
数据结构和内部编码 单线程 1、一次只运行一条命令2、拒绝长(慢)命令 keys,flushall,flushdb,slow lua script,mutil/exec,operate big value(collection)3、其实不是单线程 fysnc file descriptor close file descript...原创 2018-12-18 10:53:10 · 187 阅读 · 0 评论 -
Redis瑞士军刀pipeline
pipeline(流水线功能) 一次网络命令通信模型 : 批量网络命令通信模型 : 什么是流水线: 将一批命令打包,在服务端进行一个批量的计算,然后按顺序将结果返回 流水线的作用两点注意: Redis的命令时间是微秒级别的 pipeline每次条数需要控制(网络) ...原创 2018-12-19 17:57:20 · 154 阅读 · 0 评论 -
Redis瑞士军刀发布订阅
发布订阅 角色:发布者(publisher) 订阅者(subscriber) 频道(channel) 模型 发布订阅:发布一条消息,所有的订阅者都可以收到消息 当然,每一个订阅者是可以订阅多个频道的(如下图),现在Redis里有两个频道,有的订阅者订阅了一个频道,有的订阅了两个频道。当消息发送的时候,就可以收到不同频道发送的消息。不关注的频...原创 2018-12-19 17:56:27 · 246 阅读 · 0 评论 -
Redis瑞士军刀BitMap(位图)
BitMap(位图) setbit key offset value 对key所储存的字符串值,设置或清除指定偏移量上的位。位的设置或清除取决于value参数,可以是0也可以是1。当key不存在时,自动生成一个新的字符串值。offset 参数必须大于或等于0,小于2^32gitbit key offset ...原创 2018-12-19 17:55:49 · 343 阅读 · 0 评论 -
Redis瑞士军刀HyperLogLog
HyperLogLog1、基于HyperLogLog的算法:极小空间完成独立数量统计2、本质还是字符串pfadd key element [element ...] 将任意数量的元素添加到指定的HyperLogLog里面,如果内部储存被修改了,返回1,否则返回0pfcount key [key ...] ...原创 2018-12-19 17:55:11 · 169 阅读 · 0 评论 -
Redis瑞士军刀GEO
GEO geoadd key longitude latitude member [longitude latitude member ...] 将给定的空间元素(纬度、经度、名字)添加到指定的键里面geopos key member [member ...] ...原创 2018-12-19 17:53:59 · 163 阅读 · 0 评论 -
远程连接Redis报错,(error) DENIED Redis is running in protected mode because protected mode is enabled, no
(error) DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are ...原创 2018-11-14 17:32:00 · 1075 阅读 · 0 评论 -
Redis命令总结
常用命令 keys * 查看所有的键get key 获取对应key的valueset key value 设置key、value./redi...原创 2018-11-14 15:20:24 · 153 阅读 · 0 评论 -
Redis启动警告解决
[gpp@goldpanpan src]$ 25342:C 14 Nov 11:08:48.118 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo25342:C 14 Nov 11:08:48.118 # Redis version=4.0.11, bits=64, commit=00000000, modified=0, pid=25342, ...原创 2018-11-14 11:33:21 · 4244 阅读 · 0 评论 -
CentOS 6.8下解决Redis make test错误:You need tcl 8.5 or newer in order to run the Redis test
hadoop@stormspark:~/workspace/redis2.6.13/src$ make testYou need tcl 8.5 or newer in order to run the Redis testmake: *** [test] Error 1wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar...原创 2018-11-14 11:07:18 · 707 阅读 · 0 评论 -
Redis瑞士军刀慢查询
慢查询 生命周期:两点说明:慢查询发生在第三阶段 客户端超时不一定慢查询,但慢查询是客户端超时的一个可能因素 两个配置-slowlog-max-len 1、先进先出队列(假如说一条命令在执行过程中,被列入慢查询的范围内他就会进入一个队列,这个队列是用Redis的列...原创 2018-12-19 11:33:24 · 214 阅读 · 0 评论