跳转至

Redis Writer

Redis Writer 提供了还原 Redis dump 命令的能力,并写入到目标 Redis。支持 redis cluster 集群、proxy、以及单机

配置样例

{
  "job": {
    "content": {
      "reader": {
        "name": "redisreader",
        "parameter": {
          "connection": [
            {
              "uri": "tcp://127.0.0.1:7003"
            }
          ]
        }
      },
      "writer": {
        "name": "rediswriter",
        "parameter": {
          "connection": [
            {
              "uri": "tcp://127.0.0.1:6379",
              "auth": "123456"
            }
          ],
          "redisCluster": false,
          "flushDB": false
        }
      }
    },
    "setting": {
      "speed": {
        "channel": 1,
        "bytes": -1
      }
    }
  }
}

参数说明

配置项 是否必须 数据类型 默认值 描述
uri string redis链接
redisCluster boolean false 是否为redis cluster集群,如果是 proxy 或单机忽略该项
flushDB boolean false 迁移前是否清空目标 Redis
batchSize string 1000 每次批量处理数量。如果key过大/小,可以相应的调整
timeout string 60000 每次执行最大超时时间, 单位毫秒(ms)