aerospike工具集——Command-Line Utility (cli)


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等包括同样功能的操作,我觉得可以根据自己的喜欢选择一种熟练操作。




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值