aerospike工具集——Command-Line Utility (cli)
2015-12-11 13:23
411 查看
Command-Line Utility (cli)
Aerospike命令行工具(cli)允许在命令行执行简单的get,set和delet操作,来验证数据库的基本操作。命令行工具使用的信息如下:用法
对aerospike集群执行一个命令。
cli OPTIONS
Options
-t, --target <host:port>
查询一个集群节点(host:port)
默认: 127.0.0.1:3000
-h, --host <host>
主机集群节点的查询
默认: 127.0.0.1
-p, --port <port>
端口号
默认: 3000
-U, --user <user name>用户名
User name to access record, required when using the enterprise security feature.
-P, --password [password]密码
Password to access record, required when using the enterprise security feature.
-o, --operand <operand>
数据库操作, note that set and put are equivalent: get, set, put, delete
默认: get
-n --namespace <ns>
namespace (命名空间)
默认: test
-s --set <set>
the set the key belongs in
默认: ""
-k, --key
key - 必须要设置,没有默认值
--d64, --digest-base64
Interpret key as a base64 digest
--d16, --digest-base16, --digest-hex
Interpret key as a base16 (hex) digest
-i, --integer-key, --key-integer
True if key is a integer
-b, --bin
name of the bin
默认: ""
-e, --recordttl <ttl>
记录的过期时间
默认: None
-v, --value
value
--verbose
make the request verbose
例如
Set an object with a key string of "server01" and a value of "This is my hostname" in the namespace "users"server01为key,执行的操作为set,命名空间为users,值为 "This
is my hostname"
cli -o set -n users -k server01 -v "This is my hostname"
Get a records with a key of "server01" from the namespace "users"
根据key:server01和命名空间users ,get记录
cli -o get -n users -k server01
Note that this tool is meant to be used for basic validation only. Aerospike is not intended to be used through the command line tool. cli creates a new connection pool for every transaction which is very inefficient.
aerospike提供的cli工具除了cli之外还有ascli,aql等包括同样功能的操作,我觉得可以根据自己的喜欢选择一种熟练操作。
相关文章推荐
- ubuntu安装openssh-server报依赖错误
- zhphp framework (五) 框架加载类
- CCF真题之最大矩形
- photoview源码解析
- ORA-24324 ORA-01041
- Didn't find class "android.support.v7.widget.RecyclerView"
- samba搭建
- zhphp framework (四)动态加载应用程序产量,方便任何程序代码重构
- Netstat端口占用情况
- get方式带参数请求方法
- CCF考前注意几点
- 新手如何学习嵌入式开发板-迅为4412开发板
- Bonfire: Falsy Bouncer
- opencv 训练器的制作笔记
- 批处理合并SQL脚本
- GitHub实战系列汇总篇
- python读取excel中的数据
- iOS开发:Swift多线程NSThread的使用
- jsp与javabean的结合
- Oracle 数据泵