Coder Social home page Coder Social logo

Comments (24)

yangzhe1991 avatar yangzhe1991 commented on August 29, 2024

https://golang.org/dl/
直接下载安装即可

from redis-port.

tydldd avatar tydldd commented on August 29, 2024

我不是说go安装,是说redis-port

from redis-port.

yangzhe1991 avatar yangzhe1991 commented on August 29, 2024

不需要安装,编译完执行对应命令就行

2015年10月10日星期六,tydldd [email protected] 写道:

我不是说go安装,是说redis-port


Reply to this email directly or view it on GitHub
#9 (comment)
.

Thanks,
Phil Yang

from redis-port.

tydldd avatar tydldd commented on August 29, 2024

@yangzhe1991 ,我是用go get 把redis-port下载下来,自动放到了/usr/local/codis/src/github.com/wandoulabs/redis-port这个路径下。
然后我用进入目录下执行make就报错:
go build -o bin/redis-port ./cmd
pkg/rdb/decoder.go:9:2: cannot find package "github.com/cupcake/rdb" in any of:
/usr/local/go/src/github.com/cupcake/rdb (from $GOROOT)
/usr/local/codis/src/github.com/cupcake/rdb (from $GOPATH)
pkg/rdb/decoder.go:10:2: cannot find package "github.com/cupcake/rdb/nopdecoder" in any of:
/usr/local/go/src/github.com/cupcake/rdb/nopdecoder (from $GOROOT)
/usr/local/codis/src/github.com/cupcake/rdb/nopdecoder (from $GOPATH)
make: *** [build] Error 1

错误里说的cupcake/rdb这个目录是怎么产生?现在没有。

from redis-port.

yangzhe1991 avatar yangzhe1991 commented on August 29, 2024

缺少github.com/cupcake/rdb 这个库,用go get github.com/cupcake/rdb 来下载

2015-10-10 13:44 GMT+08:00 tydldd [email protected]:

@yangzhe1991 https://github.com/yangzhe1991 ,我是用go get
把redis-port下载下来,自动放到了/usr/local/codis/src/github.com/wandoulabs/redis-port
这个路径下。
然后我用进入目录下执行make就报错:
go build -o bin/redis-port ./cmd
pkg/rdb/decoder.go:9:2: cannot find package "github.com/cupcake/rdb" in
any of:
/usr/local/go/src/github.com/cupcake/rdb (from $GOROOT)
/usr/local/codis/src/github.com/cupcake/rdb (from $GOPATH)
pkg/rdb/decoder.go:10:2: cannot find package "
github.com/cupcake/rdb/nopdecoder" in any of:
/usr/local/go/src/github.com/cupcake/rdb/nopdecoder (from $GOROOT)
/usr/local/codis/src/github.com/cupcake/rdb/nopdecoder (from $GOPATH)
make: *** [build] Error 1

错误里说的cupcake/rdb这个目录是怎么产生?现在没有。


Reply to this email directly or view it on GitHub
#9 (comment)
.

Thanks,
Phil Yang

from redis-port.

tydldd avatar tydldd commented on August 29, 2024

还用安装https://github.com/sripathikrishnan/redis-rdb-tools这个吗,等都装完以后,用make gotest编译是吗

from redis-port.

yangzhe1991 avatar yangzhe1991 commented on August 29, 2024

就是缺啥都用go get下载依赖的库就行

from redis-port.

tydldd avatar tydldd commented on August 29, 2024

嗯,装好了,我试了一下。是不是必须指定--filterdb这个属性啊,指定的话,只能指定0吧,当时 原来的redis数据放在1里了。那样就不能同步了吧。
第二个问题:数据命名导完了。还在一直:
image
这是什么情况呢

from redis-port.

spinlock avatar spinlock commented on August 29, 2024
  1. filterdb 是指将 master 中的对应 db 下的数据同步到 slave 的 db,所以你这种情况,应该用 --filterdb=1,参见 #8
  2. 为什么不停止,可以看这个 CodisLabs/codis#318

from redis-port.

tydldd avatar tydldd commented on August 29, 2024

原生redis导入到codis
./redis-port sync --ncpu 2 --from=c-api.chinacloudapp.cn:6388 --password=Simple --filterdb=1 --target localhost:9000 --auth=Simple

提示:
2015/10/10 08:27:31 [INFO] rdb file = 274095
2015/10/10 08:27:31 [PANIC] select command error
[error]: ERR invalid DB index, only accept DB 0
[stack]:
1 /usr/local/codis/src/github.com/wandoulabs/redis-port/cmd/utils.go:187
main.selectDB
0 /usr/local/codis/src/github.com/wandoulabs/redis-port/cmd/sync.go:210
main.(*cmdSync).SyncRDBFile.func1.1
... ...

from redis-port.

spinlock avatar spinlock commented on August 29, 2024

@tydldd 对不起,我自己都给乱了。。我修改了刚刚的回答。很抱歉。

你可以修改 redis-port 代码,注释掉下面这行,就可以了。
https://github.com/wandoulabs/redis-port/blob/master/cmd/sync.go#L210

很抱歉。

from redis-port.

tydldd avatar tydldd commented on August 29, 2024

那其实从master的1同步到codis中的0是不能实现的是吗。codis只支持0

from redis-port.

spinlock avatar spinlock commented on August 29, 2024

是的,需要你注释掉 L210 那行,然后重新 make 生成可执行文件,原因在 #8 里面讲了。

from redis-port.

tydldd avatar tydldd commented on August 29, 2024

@spinlock 重新make后成功了。多谢

from redis-port.

heroliy avatar heroliy commented on August 29, 2024

有支持 redis cluster 迁移到codis的方法吗?貌似这个不支持

from redis-port.

heroliy avatar heroliy commented on August 29, 2024

@spinlock 有支持 redis cluster 迁移到codis的方法吗?貌似这个不支持, 好像可以修改redis port 连接方式,把redis 连接方式改成 redis cluster 就可以,但是我不熟悉go

from redis-port.

yangzhe1991 avatar yangzhe1991 commented on August 29, 2024

绕开cluster层,把里面的节点逐个执行迁移操作?

from redis-port.

yangzhe1991 avatar yangzhe1991 commented on August 29, 2024

另外,如果还有问题的话,建议开个新的issue,因为和本话题无关了

from redis-port.

heroliy avatar heroliy commented on August 29, 2024

我就是一个节点执行的,不OK

from redis-port.

yangzhe1991 avatar yangzhe1991 commented on August 29, 2024

#10 那讨论吧

from redis-port.

qinming23 avatar qinming23 commented on August 29, 2024

make报如下错误是什么原因?
make
go build -i -o bin/redis-port ./cmd

_/opt/src/redis-port/cmd

cmd/decode.go:30: cmd.rbytes.Get undefined (type "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2".Int64 has no field or method Get)
cmd/decode.go:31: cmd.wbytes.Get undefined (type "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2".Int64 has no field or method Get)
cmd/decode.go:32: cmd.nentry.Get undefined (type "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2".Int64 has no field or method Get)
cmd/dump.go:78: nread.Get undefined (type "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2".Int64 has no field or method Get)
cmd/dump.go:79: nread.Get undefined (type "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2".Int64 has no field or method Get)
cmd/dump.go:92: nread.Get undefined (type "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2".Int64 has no field or method Get)
cmd/dump.go:112: nread.Get undefined (type "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2".Int64 has no field or method Get)
cmd/restore.go:34: cmd.rbytes.Get undefined (type "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2".Int64 has no field or method Get)
cmd/restore.go:35: cmd.ebytes.Get undefined (type "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2".Int64 has no field or method Get)
cmd/restore.go:36: cmd.nentry.Get undefined (type "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2".Int64 has no field or method Get)
cmd/restore.go:36: too many errors
make: *** [redis-port] Error 2
我的系统是centos 7.2 ,go安装的是go version go1.8.1 linux/amd64
go get github.com/cupcake
go get github.com/CodisLabs
go get github.com/docopt/docopt-go
go get github.com/garyburd/redigo/redis
安装了以上这些依赖包,依赖包自动安装在root家目录下了。redis-port放在/usr/local/codis/src/github.com/wandoulabs/redis-port/

from redis-port.

BingerCoder avatar BingerCoder commented on August 29, 2024

楼上说的是什么问题

from redis-port.

snailshen2014 avatar snailshen2014 commented on August 29, 2024

pkg/rdb/cgo_redis.h:1:10: fatal error: 'redis/src/server.h' file not found
编译包这个错误,

from redis-port.

code-less-hub avatar code-less-hub commented on August 29, 2024

pkg/rdb/cgo_redis.h:1:10: fatal error: 'redis/src/server.h' file not found
编译包同样这个错误

from redis-port.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.