diff --git a/bin/ycsb b/bin/ycsb index 90010a7d6118b5f914089dd5a6d0d8b7fed70ccc..b731a45fe1585b4e40ce2f73254d153cc2a09d05 100755 --- a/bin/ycsb +++ b/bin/ycsb @@ -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", diff --git a/distribution/pom.xml b/distribution/pom.xml index cd9d04e40c50c47aeaf614071727fcb9665cabbb..9f17c43ec211d41997c04f763bd2918647f00726 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -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> diff --git a/gemfire/src/main/conf/cache.xml b/gemfire/src/main/conf/cache.xml deleted file mode 100644 index 372e1c456b8c4a5e14f204d6983e93f44c6309eb..0000000000000000000000000000000000000000 --- a/gemfire/src/main/conf/cache.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?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> - diff --git a/geode/README.md b/geode/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9d4fe3a30405bee31e7c1214c79971ab9e0a0d87 --- /dev/null +++ b/geode/README.md @@ -0,0 +1,67 @@ +<!-- +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` diff --git a/gemfire/pom.xml b/geode/pom.xml similarity index 80% rename from gemfire/pom.xml rename to geode/pom.xml index 3aa417eed820b56f2cbe3f991d96984158ddcb0e..17e012e9a1b4c7ca9a856f4001706a67dfb1748c 100644 --- a/gemfire/pom.xml +++ b/geode/pom.xml @@ -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> diff --git a/gemfire/src/main/java/com/yahoo/ycsb/db/GemFireClient.java b/geode/src/main/java/com/yahoo/ycsb/db/GeodeClient.java similarity index 81% rename from gemfire/src/main/java/com/yahoo/ycsb/db/GemFireClient.java rename to geode/src/main/java/com/yahoo/ycsb/db/GeodeClient.java index 8cc7ea623305dc57321b942e2a4deb5a7ee31851..cdbfc96189ed635219e37bf28f2db960ef7eb43f 100644 --- a/gemfire/src/main/java/com/yahoo/ycsb/db/GemFireClient.java +++ b/geode/src/main/java/com/yahoo/ycsb/db/GeodeClient.java @@ -1,5 +1,5 @@ /** - * 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; } diff --git a/pom.xml b/pom.xml index acc35128b22b4e198dd70a80f012b30270164981..066ac0ed82638ca483e349e5c07953c70982393a 100644 --- a/pom.xml +++ b/pom.xml @@ -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>