Skip to content

Commit

Permalink
[arangodb3] added ArangoDB3 binding (ArangoDB 3.1, Java driver 4.1.7) (
Browse files Browse the repository at this point in the history
  • Loading branch information
mpv1989 authored and risdenk committed Feb 2, 2017
1 parent a564c4c commit 9336c2c
Show file tree
Hide file tree
Showing 10 changed files with 654 additions and 0 deletions.
Empty file added arangodb3/.gitignore
Empty file.
93 changes: 93 additions & 0 deletions arangodb3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<!--
Copyright (c) 2017 YCSB contributors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You
may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License. See accompanying
LICENSE file.
-->

## Quick Start

This section describes how to run YCSB on ArangoDB.

### 1. Start ArangoDB
See https://docs.arangodb.com/Installing/index.html

### 2. Install Java and Maven

Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html

and get the url to download the rpm into your server. For example:

wget http://download.oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.rpm?AuthParam=11232426132 -o jdk-7u40-linux-x64.rpm
rpm -Uvh jdk-7u40-linux-x64.rpm

Or install via yum/apt-get

sudo yum install java-devel

Download MVN from http://maven.apache.org/download.cgi

wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz
sudo tar xzf apache-maven-*-bin.tar.gz -C /usr/local
cd /usr/local
sudo ln -s apache-maven-* maven
sudo vi /etc/profile.d/maven.sh

Add the following to `maven.sh`

export M2_HOME=/usr/local/maven
export PATH=${M2_HOME}/bin:${PATH}

Reload bash and test mvn

bash
mvn -version

### 3. Set Up YCSB

Clone this YCSB source code:

git clone https://github.com/brianfrankcooper/YCSB.git

### 4. Run YCSB

Now you are ready to run! First, drop the existing collection: "usertable" under database "ycsb":

db._collection("usertable").drop()

Then, load the data:

./bin/ycsb load arangodb3 -s -P workloads/workloada -p arangodb.ip=xxx -p arangodb.port=xxx

Then, run the workload:

./bin/ycsb run arangodb3 -s -P workloads/workloada -p arangodb.ip=xxx -p arangodb.port=xxx

See the next section for the list of configuration parameters for ArangoDB.

## ArangoDB Configuration Parameters

- `arangodb.ip`
- Default value is `localhost`

- `arangodb.port`
- Default value is `8529`.

- `arangodb.waitForSync`
- Default value is `true`.

- `arangodb.transactionUpdate`
- Default value is `false`.

- `arangodb.dropDBBeforeRun`
- Default value is `false`.
31 changes: 31 additions & 0 deletions arangodb3/conf/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
Copyright (c) 2017 YCSB contributors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You
may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License. See accompanying
LICENSE file.
-->

<configuration>

<appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<root level="info">
<appender-ref ref="STDERR" />
</root>
</configuration>
73 changes: 73 additions & 0 deletions arangodb3/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2017 YCSB contributors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You
may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License. See accompanying
LICENSE file.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yahoo.ycsb</groupId>
<artifactId>binding-parent</artifactId>
<version>0.13.0-SNAPSHOT</version>
<relativePath>../binding-parent</relativePath>
</parent>

<artifactId>arangodb3-binding</artifactId>
<name>ArangoDB3 Binding</name>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>com.arangodb</groupId>
<artifactId>arangodb-java-driver</artifactId>
<version>${arangodb3.version}</version>
</dependency>
<dependency>
<groupId>com.yahoo.ycsb</groupId>
<artifactId>core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.13</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.3</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit 9336c2c

Please sign in to comment.