绑定完请刷新页面
取消
刷新

分享好友

×
取消 复制
AeroSpike 资料
2022-04-14 10:13:23

1、AeroSpike 下载安装 :

http://www.aerospike.com/docs/operations/install/linux/el6/

依赖:

yum install gcc
yum install autoconf libtool
yum install openssl-devel openssl-static
yum install lua-devel lua-static lua

下载安装:

复制代码
wget -O aerospike.tgz 'http://aerospike.com/download/server/latest/artifact/el6'
tar -xvf aerospike.tgz
cd aerospike-server-community-*-el6
sudo ./asinstall # will install the .rpm packages
sudo service aerospike start && \
sudo tail -f /var/log/aerospike/aerospike.log | grep cake
# wait for it. "service ready: soon there will be cake!"
复制代码

 

安装后的文件:

复制代码
/etc/aerospike/                 - configuration files for Aerospike
/etc/aerospike/aerospike.conf   — default configuration for Aerospike
/etc/init.d/aerospike           — init script for Aerospike
/etc/logrotate.d/aerospike      — logrotate configuration for Aerospike
/opt/aerospike/bin/             — binaries including Aerospike server and tools
/opt/aerospike/doc/             — documents, including licenses
/opt/aerospike/sys/             — system data files, maintained by Aerospike
/opt/aerospike/usr/             — user data files
/var/log/aerospike/             — log files emitted by Aerospike
/usr/bin/asd                    — Aerospike Server daemon
复制代码

 

命令行验证:

复制代码
cli -h 127.0.0.1 -n test -o set -k Aerospike -b name -v "Aerospike, Inc."
# succeeded: key= Aerospike  set=   bin= name  value= Aerospike, Inc.
cli -h 127.0.0.1 -n test -o set -k Aerospike -b address -v "Mountain View, CA 94043"
# succeeded: key= Aerospike  set=   bin= address  value= Mountain View, CA 94043
cli -h 127.0.0.1 -n test -o set -k Aerospike -b email -v "info@aerospike.com"
# succeeded: key= Aerospike  set=   bin= email  value= info@aerospike.com


cli -h 127.0.0.1 -n test -o get -k Aerospike
# {'email': 'info@aerospike.com', 'name': 'Aerospike, Inc.', 'address': 'Mountain View, CA 94043'}
复制代码

 

aerospike管理控制台安装:http://www.aerospike.com/docs/amc/

 

2、Example

http://www.aerospike.com/docs/client/java/examples.html

http://www.aerospike.com/download/client/java/3.1.0/

 

POM依赖:

<dependency>
    <groupId>com.aerospike</groupId>
    <artifactId>aerospike-client</artifactId>
    <version>3.1.0</version>
</dependency>

代码:

复制代码
AerospikeClient client = new AerospikeClient("192.168.1.150", 3000);

Key key = new Key("test", "demo", "putgetkey");
Bin bin1 = new Bin("bin1", "value1");
Bin bin2 = new Bin("bin2", "value2");

// Write a record
client.put(null, key, bin1, bin2);

// Read a record
Record record = client.get(null, key);

client.close();
复制代码

3、性能测试

性能测试Page

复制代码
wget https://codeload.github.com/aerospike/aerospike-client-java/zip/master
unzip master
mvn package

#使用帮助
#./run_benchmarks -u

#load数据:
./run_benchmarks
分享好友

分享这个小栈给你的朋友们,一起进步吧。

Aerospike
创建时间:2022-04-14 10:06:31
Aerospike
展开
订阅须知

• 所有用户可根据关注领域订阅专区或所有专区

• 付费订阅:虚拟交易,一经交易不退款;若特殊情况,可3日内客服咨询

• 专区发布评论属默认订阅所评论专区(除付费小栈外)

技术专家

查看更多
  • LCR_
    专家
戳我,来吐槽~