zoukankan      html  css  js  c++  java
  • AeroSpike 资料

    文档总览:http://www.aerospike.com/docs/

    JAVA AeroSpike知识总览:http://www.aerospike.com/docs/client/java/start/index.html

    工具总览:http://www.aerospike.com/docs/tools/

    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
     
    
    

  • 相关阅读:
    量子计算机算法与应用研究论文(转载务必注明出处)
    [置顶] html学习笔记,锚点,超链接,table布局,表头,h,sub,blockquote,ul,li,ol.dl,加入收藏,打印,弹出窗口
    [置顶] 第一天初试linux
    [置顶] Datalist嵌套datalist,页面传值,加密,数据绑定
    [置顶] asp.net(c#)中相对路径(虚拟路径)和物理磁盘路径的转换
    [置顶] c#对于文件的操作
    [置顶] 读取pdf并且在web页面中显示
    [置顶] gridview中嵌套gridview(并实现子gridview的数据绑定),页面传值,加密,数据绑定
    git的使用学习笔记--项目版本操作
    git的使用学习笔记---合并分支
  • 原文地址:https://www.cnblogs.com/thinkCoding/p/4387734.html
Copyright © 2011-2022 走看看