{"id":19476276,"url":"https://github.com/pgaref/acazoo","last_synced_at":"2025-10-29T09:54:26.879Z","repository":{"id":26440136,"uuid":"29890931","full_name":"pgaref/ACaZoo","owner":"pgaref","description":"A distributed key-value store based on replicated LSM-Trees ","archived":false,"fork":false,"pushed_at":"2017-05-18T10:26:24.000Z","size":102957,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T22:41:48.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgaref.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-27T01:15:45.000Z","updated_at":"2022-10-09T02:26:41.000Z","dependencies_parsed_at":"2022-08-29T15:50:11.331Z","dependency_job_id":null,"html_url":"https://github.com/pgaref/ACaZoo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaref%2FACaZoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaref%2FACaZoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaref%2FACaZoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaref%2FACaZoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgaref","download_url":"https://codeload.github.com/pgaref/ACaZoo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250834156,"owners_count":21494920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T19:38:17.217Z","updated_at":"2025-10-29T09:54:21.838Z","avatar_url":"https://github.com/pgaref.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"#ACaZoo is a distributed key-value Store\n\nIt's implementation is based on replicated LSM-Trees and it combines the names of the two systems it derives from: Apache\nCassandra and Apache ZooKeeper\n\nYou can read more about the system [here](http://www.doc.ic.ac.uk/~pg1712/papers/srds14.pdf)\n\n##To start ACaZoo System\n\n---------Java Enviroment Installation--------\n\n    #First download an oracle JDK \u003e=1.7, lets say 17u17\n    tar -xvf jdk-7u17-linux-x64.tar.gz\n    sudo mkdir /usr/lib/jvm \n    sudo mv jdk1.7.0_17/ /usr/lib/jvm/\n    sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_17/bin/java 1065 \n    sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_17/bin/javac 1065 \n    sudo update-alternatives --config java\n\n    JAVA_HOME=/usr/lib/jvm/java-7-oracle\n\n---------Java Dependencies--------\n\n    sudo apt-get install ant1.7\n    sudo apt-get install ant-optional\n    sudo apt-get install maven2\n\n---------Cassandra Environment Setup-------------------\n\n    sudo mkdir -p /var/log/cassandra \n    sudo chown -R `whoami` /var/log/cassandra \n    sudo mkdir -p /var/lib/cassandra \n    sudo chown -R `whoami` /var/lib/cassandra \n\n=====================Startup Scripts=================\n    \n    eclipse project ==\u003e ant build \n\n    sudo mkdir /var/lib/cassandra\n    sudo chown pgaref:pgaref /var/lib/cassandra/\n    sudo mkdir /var/log/cassandra/\n    sudo chown pgaref:pgaref /var/log/cassandra/\n    \n===================== Configuration =================\n\n###### Please note that each node is runnig a DB instance together with a Zookeeper instance. So for each node you have to keep *both* configuration updated. The DB configuration is located under /conf/cassandra.yaml and you have to change at least the IP, seed and listening port. For more information look [here](http://www.datastax.com/documentation/cassandra/2.0/cassandra/configuration/configCassandra_yaml_r.html). The Zookeeper configuration is located under conf/zooConf/zooQuorum.cfg and you have to add the the servers with their correct *IDs* and *IPs*, for more information look [here](http://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html).\n \n###### After creating the directories  you can run the *acazooScript.sh* in the root folder to clean the directories and build the project. Please change the echo \"1\" in the script to the appropriate Zookeeper server ID.\n\n    *cassandra.yaml* -\u003e In a 3 node cluster one node has to be the seeder. \n    The other two nodes connect to the seeder to retrieve the cluster information. \n    For the first node configure its own IP as seederIP while in the other two configuration files configure the seederIP the first node.\n    *zooQuorum.cfg* -\u003e In a 3 node cluster the seeder node we can set node \"1\" the seeder(remember to change the script too).\n    Then we have to decide which nodes will be number one and two. \n    When we finish we the zooQuorum.cfg we use the *SAME* file for the other two nodes!\n\n###### Now we are ready to go! In all cluster nodes run: \n    \n    ./bin/cassandra start -f\n    \n###### Please run the start command in all the nodes in about the same time or it will fail!\n\n##Benchmark ACaZoo System using [YCSB](https://github.com/brianfrankcooper/YCSB/)\n\n\n##Some useful Notes (extra)\n\n\n------------IPV4 FIX - if needed---------------------\n\n    /etc/gai.conf which is the configuration for getaddrinfo(). \n    There you have to uncomment line ~54 which reads: “precedence ::ffff:0:0/96  100″\n\n\n=====================Murmur Token generator=================\n\n    python -c 'print [((2**64 / X) * i) - 2**63 for i in range(X)]' \n\n=====================Enable remote JMX=================\n    \n    #pgaref was here\n    JVM_OPTS=\"$JVM_OPTS -Djava.rmi.server.hostname=109.231.124.27\"\n\n++++++++++++++++++++++++++++Cassandra CQL Client: \n\n    bin/cqlsh\n\n###Cassandra CLI commands for YCSB\n\n    #Disabling autocompaction in a keyspace\n    ./bin/nodetool disableautocompaction usertable data\n\n\n    #Create ycsb keyspace for testing!\n    CREATE KEYSPACE usertable\n        with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy'\n        and strategy_options = {replication_factor:3};\n\n    USE usertable;\n\n\n    CREATE COLUMN FAMILY data with column_type = 'Standard'    and comparator = 'UTF8Type'    and default_validation_class =\n    'UTF8Type'    and key_validation_class = 'UTF8Type'    and read_repair_chance = 0.1    and dclocal_read_repair_chance = 0.0\n    and caching = 'ALL';\n    \n    quit;\n    \n    CREATE COLUMN FAMILY data with column_type = 'Standard'    and comparator = 'UTF8Type'    and default_validation_class =\n    'UTF8Type'    and key_validation_class = 'UTF8Type'    and caching = 'ALL';\n\n\n    #Tested with Cassandra 2.0, CQL client for YCSB framework\n    #In CQLSH, create keyspace and table.  Something like:\n\n    create keyspace ycsb WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor': 5 };\n \n    use ycsb;\n\n     create table usertable (\n         y_id varchar primary key,\n         field0 varchar,\n         field1 varchar,\n         field2 varchar,\n         field3 varchar,\n         field4 varchar,\n         field5 varchar,\n         field6 varchar,\n         field7 varchar,\n         field8 varchar,\n         field9 varchar);\n    \n ----------------------------------   \n        INSERT INTO users (user_id,  fname, lname)\n        VALUES (1745, 'john', 'smith');\n\n        INSERT INTO users (user_id,  fname, lname)\n        VALUES (1744, 'john', 'doe');\n\n        INSERT INTO users (user_id,  fname, lname)\n        VALUES (1746, 'john', 'smith');\n  \n  \n  \n    #How to Load data in the database:\n    ./bin/ycsb load cassandra-10 -P workloads/workloada -p hosts=109.231.124.27 -threads 50 -s\n    \n    #How to RUN a workload:\n    ./bin/ycsb run cassandra-10 -P workloads/workloada -p hosts=acazoo1,acazoo2,acazoo3 -threads 256 -s\n\n    ./bin/ycsb run cassandra-10 -P workloads/workloadb -p hosts=acazoo1,acazoo2,acazoo3 -threads 256 -s \u003e WriteSerial1G-cassandra-256\n  \n++++++++++++++++++++++++++++++Zookeeper Client: \n\n    bin/zkCli.sh -server 127.0.0.1:2181\t\t      \n\n    ls /\n\n    create /zk_test my_data\n\n\n===================== CASSMAIL ===================================\n\n    create keyspace mail with placement_strategy = 'SimpleStrategy'\n        and strategy_options = {replication_factor:3};\n    \n    create column family mailboxes with comparator = 'TimeUUIDType';\n    create column family users with comparator = 'BytesType';\n\n    INSERT INTO Mailboxes (user, email, user_id)\n\tvalues ('jbellis', 'jbellis@datastax.com', 1)\n\tIF NOT EXISTS\n\t\n\t===\u003ePOSTAL\n\t\tpostal -M50 -m500 -t32 \"[acazoo1]8025\" users.txt\n\t\tpostal -M200 -m2000 -t32 \"[acazoo1]8025\" users.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgaref%2Facazoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgaref%2Facazoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgaref%2Facazoo/lists"}