Skip to content
Snippets Groups Projects
Commit 71f06d92 authored by Sean Busbey's avatar Sean Busbey
Browse files

Merge pull request #620 from sbawaska/master

[geode] Add Geode driver
parents 9fc8b68d 48085653
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ DATABASES = {
"couchbase" : "com.yahoo.ycsb.db.CouchbaseClient",
"dynamodb" : "com.yahoo.ycsb.db.DynamoDBClient",
"elasticsearch": "com.yahoo.ycsb.db.ElasticSearchClient",
"gemfire" : "com.yahoo.ycsb.db.GemFireClient",
"geode" : "com.yahoo.ycsb.db.GeodeClient",
"googledatastore" : "com.yahoo.ycsb.db.GoogleDatastoreClient",
"hbase094" : "com.yahoo.ycsb.db.HBaseClient",
"hbase098" : "com.yahoo.ycsb.db.HBaseClient",
......
......@@ -71,7 +71,7 @@ LICENSE file.
</dependency>
<dependency>
<groupId>com.yahoo.ycsb</groupId>
<artifactId>gemfire-binding</artifactId>
<artifactId>geode-binding</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
......
<?xml version="1.0"?>
<!--
Copyright (c) 2012 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.
-->
<!DOCTYPE cache PUBLIC
"-//GemStone Systems, Inc.//GemFire Declarative Caching 6.5//EN"
"http://www.gemstone.com/dtd/cache6_5.dtd">
<cache>
<region name="usertable" refid="PARTITION"/>
</cache>
<!--
Copyright (c) 2014 - 2016 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 Apache Geode (incubating).
### Get Apache Geode
You can download Geode from http://geode.incubator.apache.org/releases/
#### Start Geode Cluster
Use the Geode shell (gfsh) to start the cluster. You will need to start
at-least one locator which is a member discovery service and one or more
Geode servers.
Launch gfsh:
```
$ cd $GEODE_HOME
$ ./bin/gfsh
```
Start a locator and two servers:
```
gfsh> start locator --name=locator1
gfsh> start server --name=server1 --server-port=40404
gfsh> start server --name=server2 --server-port=40405
```
Create the "usertable" region required by YCSB driver:
```
gfsh>create region --name=usertable --type=PARTITION
```
gfsh has tab autocompletion, so you can play around with various options.
### Start YCSB workload
From your YCSB directory, you can run the ycsb workload as follows
```
./bin/ycsb load geode -P workloads/workloada -p geode.locator=host[port]
```
(default port of locator is 10334).
In the default mode, ycsb geode driver will connect as a client to the geode
cluster. To make the ycsb driver a peer member of the distributed system
use the property
`-p geode.topology=p2p -p geode.locator=host[port]`
Note:
For update workloads, please use the property `-p writeallfields=true`
......@@ -25,8 +25,8 @@ LICENSE file.
<relativePath>../binding-parent</relativePath>
</parent>
<artifactId>gemfire-binding</artifactId>
<name>Gemfire DB Binding</name>
<artifactId>geode-binding</artifactId>
<name>Geode DB Binding</name>
<packaging>jar</packaging>
<properties>
......@@ -35,9 +35,9 @@ LICENSE file.
<dependencies>
<dependency>
<groupId>com.gemstone.gemfire</groupId>
<artifactId>gemfire</artifactId>
<version>${gemfire.version}</version>
<groupId>org.apache.geode</groupId>
<artifactId>gemfire-core</artifactId>
<version>${geode.version}</version>
</dependency>
<dependency>
<groupId>com.yahoo.ycsb</groupId>
......@@ -47,10 +47,4 @@ LICENSE file.
</dependency>
</dependencies>
<repositories>
<repository>
<id>gemstone</id>
<url>http://dist.gemstone.com.s3.amazonaws.com/maven/release</url>
</repository>
</repositories>
</project>
/**
* Copyright (c) 2013 - 2014 YCSB Contributors. All rights reserved.
* Copyright (c) 2013 - 2016 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
......@@ -42,17 +42,17 @@ import java.util.Set;
import java.util.Vector;
/**
* VMware vFabric GemFire client for the YCSB benchmark.<br />
* <p>By default acts as a GemFire client and tries to connect
* to GemFire cache server running on localhost with default
* cache server port. Hostname and port of a GemFire cacheServer
* can be provided using <code>gemfire.serverport=port</code> and <code>
* gemfire.serverhost=host</code> properties on YCSB command line.
* Apache Geode (incubating) client for the YCSB benchmark.<br />
* <p>By default acts as a Geode client and tries to connect
* to Geode cache server running on localhost with default
* cache server port. Hostname and port of a Geode cacheServer
* can be provided using <code>geode.serverport=port</code> and <code>
* geode.serverhost=host</code> properties on YCSB command line.
* A locator may also be used for discovering a cacheServer
* by using the property <code>gemfire.locator=host[port]</code></p>
* by using the property <code>geode.locator=host[port]</code></p>
*
* <p>To run this client in a peer-to-peer topology with other GemFire
* nodes, use the property <code>gemfire.topology=p2p</code>. Running
* <p>To run this client in a peer-to-peer topology with other Geode
* nodes, use the property <code>geode.topology=p2p</code>. Running
* in p2p mode will enable embedded caching in this client.</p>
*
* <p>YCSB by default does its operations against "usertable". When running
......@@ -61,26 +61,24 @@ import java.util.Vector;
* region. A cache.xml defining "usertable" region can be placed in the
* working directory to override these region definitions.</p>
*
* @author Swapnil Bawaskar (sbawaska at vmware)
*
*/
public class GemFireClient extends DB {
public class GeodeClient extends DB {
/** property name of the port where GemFire server is listening for connections */
private static final String SERVERPORT_PROPERTY_NAME = "gemfire.serverport";
/** property name of the port where Geode server is listening for connections */
private static final String SERVERPORT_PROPERTY_NAME = "geode.serverport";
/** property name of the host where GemFire server is running */
private static final String SERVERHOST_PROPERTY_NAME = "gemfire.serverhost";
/** property name of the host where Geode server is running */
private static final String SERVERHOST_PROPERTY_NAME = "geode.serverhost";
/** default value of {@link #SERVERHOST_PROPERTY_NAME} */
private static final String SERVERHOST_PROPERTY_DEFAULT = "localhost";
/** property name to specify a GemFire locator. This property can be used in both
/** property name to specify a Geode locator. This property can be used in both
* client server and p2p topology */
private static final String LOCATOR_PROPERTY_NAME = "gemfire.locator";
private static final String LOCATOR_PROPERTY_NAME = "geode.locator";
/** property name to specify GemFire topology */
private static final String TOPOLOGY_PROPERTY_NAME = "gemfire.topology";
/** property name to specify Geode topology */
private static final String TOPOLOGY_PROPERTY_NAME = "geode.topology";
/** value of {@value #TOPOLOGY_PROPERTY_NAME} when peer to peer topology should be used.
* (client-server topology is default) */
......@@ -90,16 +88,16 @@ public class GemFireClient extends DB {
/**
* true if ycsb client runs as a client to a
* GemFire cache server
* Geode cache server
*/
private boolean isClient;
@Override
public void init() throws DBException {
Properties props = getProperties();
// hostName where GemFire cacheServer is running
// hostName where Geode cacheServer is running
String serverHost = null;
// port of GemFire cacheServer
// port of Geode cacheServer
int serverPort = 0;
String locatorStr = null;
......@@ -159,7 +157,7 @@ public class GemFireClient extends DB {
@Override
public Status scan(String table, String startkey, int recordcount,
Set<String> fields, Vector<HashMap<String, ByteIterator>> result) {
// GemFire does not support scan
// Geode does not support scan
return Status.ERROR;
}
......
......@@ -75,7 +75,7 @@ LICENSE file.
<cassandra.version>1.2.9</cassandra.version>
<cassandra.cql.version>1.0.3</cassandra.cql.version>
<cassandra2.cql.version>2.1.8</cassandra2.cql.version>
<gemfire.version>8.1.0</gemfire.version>
<geode.version>1.0.0-incubating.M1</geode.version>
<infinispan.version>7.2.2.Final</infinispan.version>
<kudu.version>0.6.0</kudu.version>
<openjpa.jdbc.version>2.1.1</openjpa.jdbc.version>
......@@ -108,7 +108,7 @@ LICENSE file.
<module>distribution</module>
<module>dynamodb</module>
<module>elasticsearch</module>
<module>gemfire</module>
<module>geode</module>
<module>googledatastore</module>
<module>hbase094</module>
<module>hbase098</module>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment