ITPub博客

首页 > 数据库 > > scylladb docker 运行试用

scylladb docker 运行试用

作者:gaokeke123 时间:2022-05-25 17:27:55 0 删除 编辑

scylladb 是兼容cassandra 的数据存储系统,从官方的性能报告,比原生的apache cassandra 有好多 
的提高

使用docker 运行,具体的也可以参考官方文档,后边会提供docker-compose 运行的脚本

步骤

  • seed 节点
docker run --name scylla -d scylladb/scylla
  • 添加其他节点
  1. docker run --name scylla-node2 -d scylladb/scylla --seeds="$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' scylla)"
  2. docker run --name scylla-node3 -d scylladb/scylla --seeds="$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' scylla)"
  • 查看状态
docker exec -it scylla nodetool status

数据访问

  • 数据操作,使用cqlsh工具
  1. docker exec -it scylla cqlsh
  2. CREATE KEYSPACE demoapp WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 1};
  3. CREATE TABLE demoapp.users (id int PRIMARY KEY ,name text);
  4. select * from demoapp.users;

效果


参考资料

https://www.scylladb.com/download/

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26692020/viewspace-3167765/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
大家好

注册时间:2013-08-14

  • 博文量
    1432
  • 访问量
    31602