-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pmemkv] Add PmemKV client using pmemkv's Java API.
pmemkv is a local/embedded key-value datastore optimized for persistent memory (https://github.com/pmem/pmemkv-java).
- Loading branch information
1 parent
ce3eb9c
commit 391ba30
Showing
11 changed files
with
664 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<!-- | ||
Copyright (c) 2015 - 2021 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. | ||
--> | ||
|
||
# PmemKV Driver for YCSB | ||
This driver is a binding for the YCSB facilities to operate against a [PmemKV](https://github.com/pmem/pmemkv). | ||
It uses the PmemKV Java bindings. | ||
|
||
## Quick Start | ||
|
||
### 0. Install PmemKV Java Binding | ||
**Optionally** you can compile and install custom version of PmemKV Java binding. | ||
The min. supported version is `1.2.0`. | ||
|
||
>Note: If you want to use custom installation, you'll have to set additional | ||
>maven parameter for building/execution of **PmemKV module**: `-Dpmemkv.packageName=pmemkv`. | ||
Simple follow [PmemKV Java installation instruction](https://github.com/pmem/pmemkv-java#installation), | ||
including at least: | ||
|
||
export JAVA_HOME=#PATH_TO_YOUR_JAVA_HOME | ||
git clone https://github.com/pmem/pmemkv-java.git | ||
cd pmemkv-java | ||
mvn install | ||
|
||
### 1. Set Up YCSB | ||
You need to clone the repository and compile **PmemKV module**. | ||
|
||
git clone git://github.com/brianfrankcooper/YCSB.git | ||
cd YCSB | ||
mvn -pl site.ycsb:pmemkv-binding -am package | ||
|
||
Optionally, you can use specific pmemkv version, by adding extra maven parameter: `-Dpmemkv.packageVersion=X.Y.Z` | ||
|
||
### 2. Run the Workload | ||
Before you can actually run the workload, you need to "load" the data first. | ||
|
||
bin/ycsb.sh load pmemkv -P workloads/workloada -p pmemkv.engine=cmap -p pmemkv.dbpath=/path/to/pmem/pool -p pmemkv.dbsize=DB_SIZE | ||
|
||
Then, you can run the workload: | ||
|
||
bin/ycsb.sh run pmemkv -P workloads/workloada -p pmemkv.engine=cmap -p pmemkv.dbpath=/path/to/pmem/pool -p pmemkv.dbsize=DB_SIZE | ||
|
||
## Configuration Options | ||
Driver has several configuration options to parametrize engine, path, size and additional paramaters: | ||
|
||
| Parameter | Meaning | | ||
| --------------------- | -------------------------------------------------------------------------- | | ||
| pmemkv.engine | pmemkv's storage engine - name of one of the supported engines | | ||
| pmemkv.dbpath | Pool file path (to run workloads in) | | ||
| pmemkv.dbsize | Pool file size (required to create database file, if it doesn't exist yet) | | ||
| pmemkv.jsonconfigfile | Extra config parameters | | ||
|
||
The default engine used in YCSB (if not defined otherwise) is **cmap**. | ||
|
||
To check possible values for storage engine see | ||
[pmemkv's documentation](https://github.com/pmem/pmemkv#storage-engines). | ||
Note that each engine may require different path (a file or a directory) | ||
and support various min. size - it's described in the mentioned documentation. | ||
|
||
While most of engines require just path and size, it is possible to specify | ||
additional config parameters. You have to pass these extra config parameters | ||
within a file with a proper JSON Object. It is then passed to the PmemKV module | ||
as a path to this file (e.g. `pmemkv.jsonconfigfile=/path/to/json/file`). | ||
|
||
>Example of a proper JSON Object: `{"param1": "abc", "param2": 123}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2015-2021 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>site.ycsb</groupId> | ||
<artifactId>binding-parent</artifactId> | ||
<version>0.18.0-SNAPSHOT</version> | ||
<relativePath>../binding-parent</relativePath> | ||
</parent> | ||
|
||
<artifactId>pmemkv-binding</artifactId> | ||
<name>PmemKV Binding</name> | ||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<!-- extra parameters to allow easier building with pmemkv from sources --> | ||
<pmemkv.packageName>pmemkv-root</pmemkv.packageName> | ||
<pmemkv.packageVersion>1.2.0</pmemkv.packageVersion> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>site.ycsb</groupId> | ||
<artifactId>core</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.pmem</groupId> | ||
<artifactId>${pmemkv.packageName}</artifactId> | ||
<version>${pmemkv.packageVersion}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Oops, something went wrong.