griddb 4.5 体验
以下是griddb 4.5 的体验(基于虚拟机部署)
安装包
https://github.com/griddb/griddb/releases/download/v4.5.2/griddb-4.5.2-linux.x86_64.rpm
安装
yum install -y griddb-4.5.2-linux.x86_64.rpm
配置
默认在/var/lib/gridstore
- home
export GS_HOME=$PWD
export GS_LOG=$PWD/log
- 修改密码
gs_passwd admin
- 集群配置(固定ip)
注意修改为自己的ip
{
"dataStore":{
"partitionNum":128,
"storeBlockSize":"64KB"
},
"cluster":{
"clusterName":"defaultCluster",
"replicationNum":2,
"notificationInterval":"5s",
"heartbeatInterval":"5s",
"loadbalanceCheckInterval":"180s",
"notificationMember": [
{
"cluster": {"address":"xxxx", "port":10010},
"sync": {"address":"xxxx", "port":10020},
"system": {"address":"xxxxx", "port":10040},
"transaction": {"address":"xxxxx", "port":10001},
"sql": {"address":"xxxxx", "port":20001}
}
]
},
"sync":{
"timeoutInterval":"30s"
}
}
启动
需要切换用户gsadm
su gsadm
gs_startnode -u admin/admin -w
加入集群
gs_joincluster -u admin/admin –w -c defaultCluster
查看状态
gs_stat -u admin/admin | grep Status
如果看到以下信息就是成功的
"clusterStatus": "MASTER",
"nodeStatus": "ACTIVE",
"partitionStatus": "NORMAL"
jdbc 链接
- 驱动下载
https://search.maven.org/artifact/com.github.griddb/gridstore-jdbc/4.5.0.1/jar
- 配置
使用dbeaver
- 创建表
CREATE TABLE users (
username STRING(131072),
userage INTEGER
);
- 插入数据
INSERT INTO users
(username, userage)
VALUES('dalong', 1111);
- 查询
SELECT * from users
说明
关于griddb sql 驱动链接的说明,可以参考源码的demo,或者官方文档
参考资料
https://griddb.org/docs-en/manuals/GridDB_QuickStartGuide.html#Introduction
https://griddb.org/docs-en/manuals/GridDB_SQL_Reference.html
https://griddb.org/docs-en/manuals/GridDB_FeaturesReference.html
https://github.com/griddb/jdbc
https://griddb.org/docs-en/manuals/GridDB_JDBC_Driver_UserGuide.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
2019-12-02 testcontainers 基本使用
2019-12-02 sqler 2.2 发布了,支持定时任务以及触发器
2018-12-02 PostgreSQL Q&A: Building an Enterprise-Grade PostgreSQL Setup Using Open Source Tools