diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000000000000000000000000000000000..8e478f8c079f2f2b48bdc809c2b1497502337461 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# For more info, see: http://EditorConfig.org +root = true + +[*.java] +indent_style = space +indent_size = 2 + +[*.md] +indent_style = space +indent_size = 2 + +[*.xml] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore index ee88a7870b58ef6150e56b2f50e8244873e391d9..a107f43f9daf3a5e20979ab020326e9a20b8f610 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,20 @@ target # ignore output files from testing output* -# ignore standard eclipse +# ignore standard Eclipse files .project .classpath .settings .checkstyle +# ignore standard IntelliJ files +.idea/ +*.iml +*.iws + +# ignore standard Vim and Emacs temp files +*.swp +*~ + +# ignore standard Mac OS X files/dirs .DS_Store diff --git a/.travis.yml b/.travis.yml index a0dcb824026d2d282887b3115927cd084e506fa9..aef900b74f1bd2a2303ff913688dba8bb54243b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,19 @@ +# Copyright (c) 2010 Yahoo! Inc., 2012 - 2015 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. + # more info here about TravisCI and Java projects # http://docs.travis-ci.com/user/languages/java/ @@ -14,3 +30,7 @@ script: mvn test -q # Services to start for tests. services: - mongodb + + +# Use the Container based infrastructure. +sudo: false diff --git a/BUILD b/BUILD deleted file mode 100644 index e520c2d9ce6b4919d30cad8a35c7f61991b38833..0000000000000000000000000000000000000000 --- a/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Building YCSB - -To build YCSB, run: - - mvn clean package - -# Running YCSB - -Once `mvn clean package` succeeds, you can run `ycsb` command: - - ./bin/ycsb load basic workloads/workloada - ./bin/ycsb run basic workloads/workloada - -# Oracle NoSQL Database - -Oracle NoSQL Database binding doesn't get built by default because there is no -Maven repository for it. To build the binding: - -1. Download kv-ce-1.2.123.tar.gz from here: - - http://www.oracle.com/technetwork/database/nosqldb/downloads/index.html - -2. Untar kv-ce-1.2.123.tar.gz and install kvclient-1.2.123.jar in your local - maven repository: - - tar xfvz kv-ce-1.2.123.tar.gz - mvn install:install-file -Dfile=kv-1.2.123/lib/kvclient-1.2.123.jar \ - -DgroupId=com.oracle -DartifactId=kvclient -Dversion=1.2.123 - -Dpackaging=jar - -3. Uncomment `<module>nosqldb</module>` and run `mvn clean package`. diff --git a/NOTICE.txt b/NOTICE.txt index e516aff24f395969ae7e5bb4f0cba12e630f6120..cd1f104f541a88181cf99f8cd3f7f58d60316297 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -7,3 +7,7 @@ in this case for the YCSB project. This product includes software developed by Yahoo! Inc. (www.yahoo.com) Copyright (c) 2010 Yahoo! Inc. All rights reserved. + + This product includes software developed by + Google Inc. (www.google.com) + Copyright (c) 2015 Google Inc. All rights reserved. diff --git a/README.md b/README.md index 5b7ca3977391773169c2da1415cd7a064485e134..56b33e783aaca0316303e2044fe6f664a970cd90 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,12 @@ ycsb-users@yahoogroups.com Getting Started --------------- -1. Download the latest release of YCSB: +1. Download the [latest release of YCSB](https://github.com/brianfrankcooper/YCSB/releases/latest): ```sh - curl -O https://github.com/brianfrankcooper/YCSB/releases/download/0.3.0/ycsb-0.3.0.tar.gz - tar xfvz ycsb-0.3.0.tar.gz - cd ycsb-0.3.0 + curl -O --location https://github.com/brianfrankcooper/YCSB/releases/download/0.6.0/ycsb-0.6.0.tar.gz + tar xfvz ycsb-0.6.0.tar.gz + cd ycsb-0.6.0 ``` 2. Set up a database to benchmark. There is a README file under each binding @@ -58,6 +58,9 @@ Getting Started Building from source -------------------- +YCSB requires the use of Maven 3; if you use Maven 2, you may see [errors +such as these](https://github.com/brianfrankcooper/YCSB/issues/406). + To build the full distribution, with all database bindings: mvn clean package diff --git a/accumulo/README.md b/accumulo/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fd9b4e8d7a3381c4e377669230022b022c4977a3 --- /dev/null +++ b/accumulo/README.md @@ -0,0 +1,83 @@ +<!-- +Copyright (c) 2015 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 [Accumulo](https://accumulo.apache.org/). + +### 1. Start Accumulo + +See the [Accumulo Documentation](https://accumulo.apache.org/1.7/accumulo_user_manual.html#_installation) +for details on installing and running Accumulo. + +Before running the YCSB test you must create the Accumulo table. Again see the +[Accumulo Documentation](https://accumulo.apache.org/1.7/accumulo_user_manual.html#_basic_administration) +for details. The default table name is `ycsb`. + +### 2. Set Up YCSB + +Git clone YCSB and compile: + + git clone http://github.com/brianfrankcooper/YCSB.git + cd YCSB + mvn -pl com.yahoo.ycsb:aerospike-binding -am clean package + +### 3. Load Data and Run Tests + +Load the data: + + ./bin/ycsb load accumulo -s -P workloads/workloada \ + -p accumulo.zooKeepers=localhost \ + -p accumulo.columnFamily=ycsb \ + -p accumulo.instanceName=ycsb \ + -p accumulo.username=user \ + -p accumulo.password=supersecret \ + > outputLoad.txt + +Run the workload test: + + ./bin/ycsb run accumulo -s -P workloads/workloada \ + -p accumulo.zooKeepers=localhost \ + -p accumulo.columnFamily=ycsb \ + -p accumulo.instanceName=ycsb \ + -p accumulo.username=user \ + -p accumulo.password=supersecret \ + > outputLoad.txt + +## Accumulo Configuration Parameters + +- `accumulo.zooKeepers` + - The Accumulo cluster's [zookeeper servers](https://accumulo.apache.org/1.7/accumulo_user_manual.html#_connecting). + - Should contain a comma separated list of of hostname or hostname:port values. + - No default value. + +- `accumulo.columnFamily` + - The name of the column family to use to store the data within the table. + - No default value. + +- `accumulo.instanceName` + - Name of the Accumulo [instance](https://accumulo.apache.org/1.7/accumulo_user_manual.html#_connecting). + - No default value. + +- `accumulo.username` + - The username to use when connecting to Accumulo. + - No default value. + +- `accumulo.password` + - The password for the user connecting to Accumulo. + - No default value. + diff --git a/accumulo/pom.xml b/accumulo/pom.xml index a087dd97599fc7ca97c91f2d2aed8900778efc93..93faf584ce2f2f80be04bf603f1515268c4c4696 100644 --- a/accumulo/pom.xml +++ b/accumulo/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2011 YCSB++ project, 2014 - 2015 YCSB contributors. +Copyright (c) 2011 YCSB++ project, 2014 - 2016 YCSB contributors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you @@ -22,40 +22,26 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> <artifactId>accumulo-binding</artifactId> <name>Accumulo DB Binding</name> + <properties> + <!-- This should match up to the one from your Accumulo version --> + <hadoop.version>2.2.0</hadoop.version> + </properties> <dependencies> <dependency> <groupId>org.apache.accumulo</groupId> <artifactId>accumulo-core</artifactId> <version>${accumulo.version}</version> - <exclusions> - <exclusion> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-common</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.thrift</groupId> - <artifactId>thrift</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.zookeeper</groupId> - <artifactId>zookeeper</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.zookeeper</groupId> - <artifactId>zookeeper</artifactId> - <version>3.3.1</version> </dependency> + <!-- Needed for hadoop.io.Text :( --> <dependency> <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-core</artifactId> - <version>0.20.203.0</version> + <artifactId>hadoop-common</artifactId> + <version>${hadoop.version}</version> </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> @@ -63,5 +49,35 @@ LICENSE file. <version>${project.version}</version> <scope>provided</scope> </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.accumulo</groupId> + <artifactId>accumulo-minicluster</artifactId> + <version>${accumulo.version}</version> + <scope>test</scope> + </dependency> + <!-- needed directly only in test, but transitive + at runtime for accumulo, hadoop, and thrift. --> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.13</version> + </dependency> </dependencies> + <build> + <testResources> + <testResource> + <directory>../workloads</directory> + <targetPath>workloads</targetPath> + </testResource> + <testResource> + <directory>src/test/resources</directory> + </testResource> + </testResources> + </build> </project> diff --git a/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java b/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java deleted file mode 100644 index d661908e72c9c860095a6161f6a9903ed6e436bc..0000000000000000000000000000000000000000 --- a/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java +++ /dev/null @@ -1,453 +0,0 @@ -/** - * Copyright (c) 2011 YCSB++ project, 2014 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. - */ - -package com.yahoo.ycsb.db; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Hashtable; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Random; -import java.util.Set; -import java.util.TreeSet; -import java.util.Vector; -import java.util.concurrent.TimeUnit; - -import org.apache.accumulo.core.client.AccumuloException; -import org.apache.accumulo.core.client.AccumuloSecurityException; -import org.apache.accumulo.core.client.BatchWriter; -import org.apache.accumulo.core.client.BatchWriterConfig; -import org.apache.accumulo.core.client.Connector; -import org.apache.accumulo.core.client.MutationsRejectedException; -import org.apache.accumulo.core.client.Scanner; -import org.apache.accumulo.core.client.TableNotFoundException; -import org.apache.accumulo.core.client.ZooKeeperInstance; -import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; -import org.apache.accumulo.core.client.security.tokens.PasswordToken; -import org.apache.accumulo.core.data.Key; -import org.apache.accumulo.core.data.Mutation; -import org.apache.accumulo.core.data.Range; -import org.apache.accumulo.core.data.Value; -import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.core.util.CleanUp; -import org.apache.hadoop.io.Text; -import org.apache.zookeeper.KeeperException; - -import com.yahoo.ycsb.ByteArrayByteIterator; -import com.yahoo.ycsb.ByteIterator; -import com.yahoo.ycsb.DB; -import com.yahoo.ycsb.DBException; - -public class AccumuloClient extends DB { - // Error code constants. - public static final int Ok = 0; - public static final int ServerError = -1; - public static final int HttpError = -2; - public static final int NoMatchingRecord = -3; - - private ZooKeeperInstance _inst; - private Connector _connector; - private String _table = ""; - private BatchWriter _bw = null; - private Text _colFam = new Text(""); - private Scanner _singleScanner = null; // A scanner for reads/deletes. - private Scanner _scanScanner = null; // A scanner for use by scan() - - private static final String PC_PRODUCER = "producer"; - private static final String PC_CONSUMER = "consumer"; - private String _PC_FLAG = ""; - private ZKProducerConsumer.Queue q = null; - private static Hashtable<String,Long> hmKeyReads = null; - private static Hashtable<String,Integer> hmKeyNumReads = null; - private Random r = null; - - - @Override - public void init() throws DBException { - _colFam = new Text(getProperties().getProperty("accumulo.columnFamily")); - - _inst = new ZooKeeperInstance(getProperties().getProperty("accumulo.instanceName"), - getProperties().getProperty("accumulo.zooKeepers")); - try { - String principal = getProperties().getProperty("accumulo.username"); - AuthenticationToken token = new PasswordToken(getProperties().getProperty("accumulo.password")); - _connector = _inst.getConnector(principal, token); - } catch (AccumuloException e) { - throw new DBException(e); - } catch (AccumuloSecurityException e) { - throw new DBException(e); - } - - _PC_FLAG = getProperties().getProperty("accumulo.PC_FLAG","none"); - if (_PC_FLAG.equals(PC_PRODUCER) || _PC_FLAG.equals(PC_CONSUMER)) { - System.out.println("*** YCSB Client is "+_PC_FLAG); - String address = getProperties().getProperty("accumulo.PC_SERVER"); - String root = getProperties().getProperty("accumulo.PC_ROOT_IN_ZK"); - System.out.println("*** PC_INFO(server:"+address+";root="+root+")"); - q = new ZKProducerConsumer.Queue(address, root); - r = new Random(); - } - - if (_PC_FLAG.equals(PC_CONSUMER)) { - hmKeyReads = new Hashtable<String,Long>(); - hmKeyNumReads = new Hashtable<String,Integer>(); - keyNotification(null); - } - } - - - @Override - public void cleanup() throws DBException - { - try { - if (_bw != null) { - _bw.close(); - } - } catch (MutationsRejectedException e) { - throw new DBException(e); - } - CleanUp.shutdownNow(); - } - - /** - * Commonly repeated functionality: Before doing any operation, make sure - * we're working on the correct table. If not, open the correct one. - * - * @param table - */ - public void checkTable(String table) throws TableNotFoundException { - if (!_table.equals(table)) { - getTable(table); - } - } - - /** - * Called when the user specifies a table that isn't the same as the - * existing table. Connect to it and if necessary, close our current - * connection. - * - * @param table - */ - public void getTable(String table) throws TableNotFoundException { - if (_bw != null) { // Close the existing writer if necessary. - try { - _bw.close(); - } catch (MutationsRejectedException e) { - // Couldn't spit out the mutations we wanted. - // Ignore this for now. - } - } - - BatchWriterConfig bwc = new BatchWriterConfig(); - bwc.setMaxLatency(Long.parseLong(getProperties().getProperty("accumulo.batchWriterMaxLatency", "30000")), TimeUnit.MILLISECONDS); - bwc.setMaxMemory(Long.parseLong(getProperties().getProperty("accumulo.batchWriterSize", "100000"))); - bwc.setMaxWriteThreads(Integer.parseInt(getProperties().getProperty("accumulo.batchWriterThreads", "1"))); - - _bw = _connector.createBatchWriter(table, bwc); - - // Create our scanners - _singleScanner = _connector.createScanner(table, Authorizations.EMPTY); - _scanScanner = _connector.createScanner(table, Authorizations.EMPTY); - - _table = table; // Store the name of the table we have open. - } - - /** - * Gets a scanner from Accumulo over one row - * - * @param row the row to scan - * @param fields the set of columns to scan - * @return an Accumulo {@link Scanner} bound to the given row and columns - */ - private Scanner getRow(Text row, Set<String> fields) - { - _singleScanner.clearColumns(); - _singleScanner.setRange(new Range(row)); - if (fields != null) { - for(String field:fields) - { - _singleScanner.fetchColumn(_colFam, new Text(field)); - } - } - return _singleScanner; - } - - @Override - public int read(String table, String key, Set<String> fields, - HashMap<String, ByteIterator> result) { - - try { - checkTable(table); - } catch (TableNotFoundException e) { - System.err.println("Error trying to connect to Accumulo table." + e); - return ServerError; - } - - try { - // Pick out the results we care about. - for (Entry<Key, Value> entry : getRow(new Text(key), null)) { - Value v = entry.getValue(); - byte[] buf = v.get(); - result.put(entry.getKey().getColumnQualifier().toString(), - new ByteArrayByteIterator(buf)); - } - } catch (Exception e) { - System.err.println("Error trying to reading Accumulo table" + key + e); - return ServerError; - } - return Ok; - - } - - @Override - public int scan(String table, String startkey, int recordcount, - Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { - try { - checkTable(table); - } catch (TableNotFoundException e) { - System.err.println("Error trying to connect to Accumulo table." + e); - return ServerError; - } - - // There doesn't appear to be a way to create a range for a given - // LENGTH. Just start and end keys. So we'll do this the hard way for now: - // Just make the end 'infinity' and only read as much as we need. - _scanScanner.clearColumns(); - _scanScanner.setRange(new Range(new Text(startkey), null)); - - // Batch size is how many key/values to try to get per call. Here, I'm - // guessing that the number of keys in a row is equal to the number of fields - // we're interested in. - // We try to fetch one more so as to tell when we've run out of fields. - - if (fields != null) { - // And add each of them as fields we want. - for(String field:fields) - { - _scanScanner.fetchColumn(_colFam, new Text(field)); - } - } else { - // If no fields are provided, we assume one column/row. - } - - String rowKey = ""; - HashMap<String, ByteIterator> currentHM = null; - int count = 0; - - // Begin the iteration. - for (Entry<Key, Value> entry : _scanScanner) { - // Check for a new row. - if (!rowKey.equals(entry.getKey().getRow().toString())) { - if (count++ == recordcount) { // Done reading the last row. - break; - } - rowKey = entry.getKey().getRow().toString(); - if (fields != null) { - // Initial Capacity for all keys. - currentHM = new HashMap<String, ByteIterator>(fields.size()); - } - else - { - // An empty result map. - currentHM = new HashMap<String, ByteIterator>(); - } - result.add(currentHM); - } - // Now add the key to the hashmap. - Value v = entry.getValue(); - byte[] buf = v.get(); - currentHM.put(entry.getKey().getColumnQualifier().toString(), new ByteArrayByteIterator(buf)); - } - - return Ok; - - } - - @Override - public int update(String table, String key, HashMap<String, ByteIterator> values) { - try { - checkTable(table); - } catch (TableNotFoundException e) { - System.err.println("Error trying to connect to Accumulo table." + e); - return ServerError; - } - - Mutation mutInsert = new Mutation(new Text(key)); - for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { - mutInsert.put(_colFam, new Text(entry.getKey()), System - .currentTimeMillis(), - new Value(entry.getValue().toArray())); - } - - try { - _bw.addMutation(mutInsert); - // Distributed YCSB co-ordination: YCSB on a client produces the key to - // be stored in the shared queue in ZooKeeper. - if (_PC_FLAG.equals(PC_PRODUCER)) { - if (r.nextFloat() < 0.01) - keyNotification(key); - } - } catch (MutationsRejectedException e) { - System.err.println("Error performing update."); - e.printStackTrace(); - return ServerError; - } - - - return Ok; - } - - @Override - public int insert(String table, String key, HashMap<String, ByteIterator> values) { - return update(table, key, values); - } - - @Override - public int delete(String table, String key) { - try { - checkTable(table); - } catch (TableNotFoundException e) { - System.err.println("Error trying to connect to Accumulo table." + e); - return ServerError; - } - - try { - deleteRow(new Text(key)); - } catch (RuntimeException e) { - System.err.println("Error performing delete."); - e.printStackTrace(); - return ServerError; - } - - return Ok; - } - - // These functions are adapted from RowOperations.java: - private void deleteRow(Text row) { - deleteRow(getRow(row, null)); - } - - - /** - * Deletes a row, given a Scanner of JUST that row - * - */ - private void deleteRow(Scanner scanner) { - Mutation deleter = null; - // iterate through the keys - for (Entry<Key,Value> entry : scanner) { - // create a mutation for the row - if (deleter == null) - deleter = new Mutation(entry.getKey().getRow()); - // the remove function adds the key with the delete flag set to true - deleter.putDelete(entry.getKey().getColumnFamily(), entry.getKey().getColumnQualifier()); - } - try { - _bw.addMutation(deleter); - } catch (MutationsRejectedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - - private void keyNotification(String key) { - - if (_PC_FLAG.equals(PC_PRODUCER)) { - try { - q.produce(key); - } catch (KeeperException e) { - - } catch (InterruptedException e) { - - } - } else { - //XXX: do something better to keep the loop going (while??) - for (int i = 0; i < 10000000; i++) { - try { - String strKey = q.consume(); - - if ((hmKeyReads.containsKey(strKey) == false) && - (hmKeyNumReads.containsKey(strKey) == false)) { - hmKeyReads.put(strKey, new Long(System.currentTimeMillis())); - hmKeyNumReads.put(strKey, new Integer(1)); - } - - //YCSB Consumer will read the key that was fetched from the - //queue in ZooKeeper. - //(current way is kind of ugly but works, i think) - //TODO : Get table name from configuration or argument - String table = "usertable"; - HashSet<String> fields = new HashSet<String>(); - for (int j=0; j<9; j++) - fields.add("field"+j); - HashMap<String,ByteIterator> result = new HashMap<String,ByteIterator>(); - - int retval = read(table, strKey, fields, result); - //If the results are empty, the key is enqueued in Zookeeper - //and tried again, until the results are found. - if (result.size() == 0) { - q.produce(strKey); - int count = ((Integer)hmKeyNumReads.get(strKey)).intValue(); - hmKeyNumReads.put(strKey, new Integer(count+1)); - } - else { - if (((Integer)hmKeyNumReads.get(strKey)).intValue() > 1) { - long currTime = System.currentTimeMillis(); - long writeTime = ((Long)hmKeyReads.get(strKey)).longValue(); - System.out.println("Key="+strKey+ - //";StartSearch="+writeTime+ - //";EndSearch="+currTime+ - ";TimeLag="+(currTime-writeTime)); - } - } - - } catch (KeeperException e) { - - } catch (InterruptedException e) { - - } - } - } - - } - - public int presplit(String table, String[] keys) - { - TreeSet<Text> splits = new TreeSet<Text>(); - for (int i = 0;i < keys.length; i ++) - { - splits.add(new Text(keys[i])); - } - try { - _connector.tableOperations().addSplits(table, splits); - } catch (TableNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (AccumuloException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (AccumuloSecurityException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return Ok; - } - -} diff --git a/accumulo/src/main/java/com/yahoo/ycsb/db/ZKProducerConsumer.java b/accumulo/src/main/java/com/yahoo/ycsb/db/ZKProducerConsumer.java deleted file mode 100644 index 09741641dbeaf8ab444517c9c44027bf3a4a78db..0000000000000000000000000000000000000000 --- a/accumulo/src/main/java/com/yahoo/ycsb/db/ZKProducerConsumer.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Copyright (c) 2011 YCSB++ project, 2014 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. - */ - -package com.yahoo.ycsb.db; - -import java.io.IOException; -import java.util.List; - - -import org.apache.zookeeper.CreateMode; -import org.apache.zookeeper.KeeperException; -import org.apache.zookeeper.WatchedEvent; -import org.apache.zookeeper.Watcher; -import org.apache.zookeeper.ZooKeeper; -import org.apache.zookeeper.ZooDefs.Ids; -import org.apache.zookeeper.data.Stat; - -// Implementing the PC Queue in ZooKeeper -// -public class ZKProducerConsumer implements Watcher { - - static ZooKeeper zk = null; - static Integer mutex; - - String root; - - // Constructor that takes tha address of the ZK server - // - ZKProducerConsumer(String address) { - if(zk == null){ - try { - System.out.println("Starting ZK:"); - zk = new ZooKeeper(address, 3000, this); - mutex = new Integer(-1); - System.out.println("Finished starting ZK: " + zk); - } catch (IOException e) { - System.out.println(e.toString()); - zk = null; - } - } - //else mutex = new Integer(-1); - } - - synchronized public void process(WatchedEvent event) { - synchronized (mutex) { - //System.out.println("Process: " + event.getType()); - mutex.notify(); - } - } - - - static public class QueueElement { - public String key; - public long writeTime; - - QueueElement(String key, long writeTime) { - this.key = key; - this.writeTime = writeTime; - } - } - - // Producer-Consumer queue - static public class Queue extends ZKProducerConsumer { - - // Constructor of producer-consumer queue - Queue(String address, String name) { - super(address); - this.root = name; - // Create ZK node name - if (zk != null) { - try { - Stat s = zk.exists(root, false); - if (s == null) { - zk.create(root, new byte[0], Ids.OPEN_ACL_UNSAFE, - CreateMode.PERSISTENT); - } - } catch (KeeperException e) { - System.out - .println("Keeper exception when instantiating queue: " - + e.toString()); - } catch (InterruptedException e) { - System.out.println("Interrupted exception"); - } - } - } - - // Producer calls this method to insert the key in the queue - // - boolean produce(String key) throws KeeperException, InterruptedException{ - byte[] value; - value = key.getBytes(); - zk.create(root + "/key", value, - Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT_SEQUENTIAL); - - return true; - } - - // Consumer calls this method to "wait" for the key to the available - // - String consume() throws KeeperException, InterruptedException { - String retvalue = null; - Stat stat = null; - - // Get the first element available - while (true) { - synchronized (mutex) { - List<String> list = zk.getChildren(root, true); - if (list.size() == 0) { - System.out.println("Going to wait"); - mutex.wait(); - } else { - String path = root+"/"+list.get(0); - byte[] b = zk.getData(path, false, stat); - retvalue = new String(b); - zk.delete(path, -1); - - return retvalue; - - } - } - } - } - } -} - diff --git a/accumulo/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java b/accumulo/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java new file mode 100644 index 0000000000000000000000000000000000000000..96b869e2b73b8cf9fcbcc5e9c2e3bd21154a73a8 --- /dev/null +++ b/accumulo/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java @@ -0,0 +1,348 @@ +/** + * Copyright (c) 2011 YCSB++ project, 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. + */ + +package com.yahoo.ycsb.db.accumulo; + +import com.yahoo.ycsb.ByteArrayByteIterator; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; + +import org.apache.accumulo.core.client.AccumuloException; +import org.apache.accumulo.core.client.AccumuloSecurityException; +import org.apache.accumulo.core.client.BatchWriter; +import org.apache.accumulo.core.client.BatchWriterConfig; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.MutationsRejectedException; +import org.apache.accumulo.core.client.Scanner; +import org.apache.accumulo.core.client.TableNotFoundException; +import org.apache.accumulo.core.client.ZooKeeperInstance; +import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.data.Key; +import org.apache.accumulo.core.data.Mutation; +import org.apache.accumulo.core.data.Range; +import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.core.util.CleanUp; +import org.apache.hadoop.io.Text; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.Vector; +import java.util.concurrent.TimeUnit; + +/** + * <a href="https://accumulo.apache.org/">Accumulo</a> binding for YCSB. + */ +public class AccumuloClient extends DB { + + private ZooKeeperInstance inst; + private Connector connector; + private String table = ""; + private BatchWriter bw = null; + private Text colFam = new Text(""); + private Scanner singleScanner = null; // A scanner for reads/deletes. + private Scanner scanScanner = null; // A scanner for use by scan() + + static { + + Runtime.getRuntime().addShutdownHook(new Thread() { + @Override + public void run() { + CleanUp.shutdownNow(); + } + }); + } + + @Override + public void init() throws DBException { + colFam = new Text(getProperties().getProperty("accumulo.columnFamily")); + + inst = new ZooKeeperInstance( + getProperties().getProperty("accumulo.instanceName"), + getProperties().getProperty("accumulo.zooKeepers")); + try { + String principal = getProperties().getProperty("accumulo.username"); + AuthenticationToken token = + new PasswordToken(getProperties().getProperty("accumulo.password")); + connector = inst.getConnector(principal, token); + } catch (AccumuloException e) { + throw new DBException(e); + } catch (AccumuloSecurityException e) { + throw new DBException(e); + } + + if (!(getProperties().getProperty("accumulo.pcFlag", "none").equals("none"))) { + System.err.println("Sorry, the ZK based producer/consumer implementation has been removed. " + + "Please see YCSB issue #416 for work on adding a general solution to coordinated work."); + } + } + + @Override + public void cleanup() throws DBException { + try { + if (bw != null) { + bw.close(); + } + } catch (MutationsRejectedException e) { + throw new DBException(e); + } + } + + /** + * Commonly repeated functionality: Before doing any operation, make sure + * we're working on the correct table. If not, open the correct one. + * + * @param t + * The table to open. + */ + public void checkTable(String t) throws TableNotFoundException { + if (!table.equals(t)) { + getTable(t); + } + } + + /** + * Called when the user specifies a table that isn't the same as the existing + * table. Connect to it and if necessary, close our current connection. + * + * @param t + * The table to open. + */ + public void getTable(String t) throws TableNotFoundException { + if (bw != null) { // Close the existing writer if necessary. + try { + bw.close(); + } catch (MutationsRejectedException e) { + // Couldn't spit out the mutations we wanted. + // Ignore this for now. + System.err.println("MutationsRejectedException: " + e.getMessage()); + } + } + + BatchWriterConfig bwc = new BatchWriterConfig(); + bwc.setMaxLatency( + Long.parseLong(getProperties() + .getProperty("accumulo.batchWriterMaxLatency", "30000")), + TimeUnit.MILLISECONDS); + bwc.setMaxMemory(Long.parseLong( + getProperties().getProperty("accumulo.batchWriterSize", "100000"))); + bwc.setMaxWriteThreads(Integer.parseInt( + getProperties().getProperty("accumulo.batchWriterThreads", "1"))); + + bw = connector.createBatchWriter(t, bwc); + + // Create our scanners + singleScanner = connector.createScanner(t, Authorizations.EMPTY); + scanScanner = connector.createScanner(t, Authorizations.EMPTY); + + table = t; // Store the name of the table we have open. + } + + /** + * Gets a scanner from Accumulo over one row. + * + * @param row the row to scan + * @param fields the set of columns to scan + * @return an Accumulo {@link Scanner} bound to the given row and columns + */ + private Scanner getRow(Text row, Set<String> fields) { + singleScanner.clearColumns(); + singleScanner.setRange(new Range(row)); + if (fields != null) { + for (String field : fields) { + singleScanner.fetchColumn(colFam, new Text(field)); + } + } + return singleScanner; + } + + @Override + public Status read(String t, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + + try { + checkTable(t); + } catch (TableNotFoundException e) { + System.err.println("Error trying to connect to Accumulo table." + e); + return Status.ERROR; + } + + try { + // Pick out the results we care about. + for (Entry<Key, Value> entry : getRow(new Text(key), null)) { + Value v = entry.getValue(); + byte[] buf = v.get(); + result.put(entry.getKey().getColumnQualifier().toString(), + new ByteArrayByteIterator(buf)); + } + } catch (Exception e) { + System.err.println("Error trying to reading Accumulo table" + key + e); + return Status.ERROR; + } + return Status.OK; + + } + + @Override + public Status scan(String t, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + try { + checkTable(t); + } catch (TableNotFoundException e) { + System.err.println("Error trying to connect to Accumulo table." + e); + return Status.ERROR; + } + + // There doesn't appear to be a way to create a range for a given + // LENGTH. Just start and end keys. So we'll do this the hard way for + // now: + // Just make the end 'infinity' and only read as much as we need. + scanScanner.clearColumns(); + scanScanner.setRange(new Range(new Text(startkey), null)); + + // Batch size is how many key/values to try to get per call. Here, I'm + // guessing that the number of keys in a row is equal to the number of + // fields we're interested in. + + // We try to fetch one more so as to tell when we've run out of fields. + + // If no fields are provided, we assume one column/row. + if (fields != null) { + // And add each of them as fields we want. + for (String field : fields) { + scanScanner.fetchColumn(colFam, new Text(field)); + } + } + + String rowKey = ""; + HashMap<String, ByteIterator> currentHM = null; + int count = 0; + + // Begin the iteration. + for (Entry<Key, Value> entry : scanScanner) { + // Check for a new row. + if (!rowKey.equals(entry.getKey().getRow().toString())) { + if (count++ == recordcount) { // Done reading the last row. + break; + } + rowKey = entry.getKey().getRow().toString(); + if (fields != null) { + // Initial Capacity for all keys. + currentHM = new HashMap<String, ByteIterator>(fields.size()); + } else { + // An empty result map. + currentHM = new HashMap<String, ByteIterator>(); + } + result.add(currentHM); + } + // Now add the key to the hashmap. + Value v = entry.getValue(); + byte[] buf = v.get(); + currentHM.put(entry.getKey().getColumnQualifier().toString(), + new ByteArrayByteIterator(buf)); + } + + return Status.OK; + } + + @Override + public Status update(String t, String key, + HashMap<String, ByteIterator> values) { + try { + checkTable(t); + } catch (TableNotFoundException e) { + System.err.println("Error trying to connect to Accumulo table." + e); + return Status.ERROR; + } + + Mutation mutInsert = new Mutation(new Text(key)); + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { + mutInsert.put(colFam, new Text(entry.getKey()), + System.currentTimeMillis(), new Value(entry.getValue().toArray())); + } + + try { + bw.addMutation(mutInsert); + } catch (MutationsRejectedException e) { + System.err.println("Error performing update."); + e.printStackTrace(); + return Status.ERROR; + } + + return Status.OK; + } + + @Override + public Status insert(String t, String key, + HashMap<String, ByteIterator> values) { + return update(t, key, values); + } + + @Override + public Status delete(String t, String key) { + try { + checkTable(t); + } catch (TableNotFoundException e) { + System.err.println("Error trying to connect to Accumulo table." + e); + return Status.ERROR; + } + + try { + deleteRow(new Text(key)); + } catch (MutationsRejectedException e) { + System.err.println("Error performing delete."); + e.printStackTrace(); + return Status.ERROR; + } catch (RuntimeException e) { + System.err.println("Error performing delete."); + e.printStackTrace(); + return Status.ERROR; + } + + return Status.OK; + } + + // These functions are adapted from RowOperations.java: + private void deleteRow(Text row) throws MutationsRejectedException { + deleteRow(getRow(row, null)); + } + + /** + * Deletes a row, given a Scanner of JUST that row. + */ + private void deleteRow(Scanner scanner) throws MutationsRejectedException { + Mutation deleter = null; + // iterate through the keys + for (Entry<Key, Value> entry : scanner) { + // create a mutation for the row + if (deleter == null) { + deleter = new Mutation(entry.getKey().getRow()); + } + // the remove function adds the key with the delete flag set to true + deleter.putDelete(entry.getKey().getColumnFamily(), + entry.getKey().getColumnQualifier()); + } + + bw.addMutation(deleter); + } +} diff --git a/accumulo/src/main/java/com/yahoo/ycsb/db/accumulo/package-info.java b/accumulo/src/main/java/com/yahoo/ycsb/db/accumulo/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..e38d200c774c03138f6ba8f642b2d2fe9bebc578 --- /dev/null +++ b/accumulo/src/main/java/com/yahoo/ycsb/db/accumulo/package-info.java @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2015 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. + */ + +/** + * YCSB binding for <a href="https://accumulo.apache.org/">Apache Accumulo</a>. + */ +package com.yahoo.ycsb.db.accumulo; + diff --git a/accumulo/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java b/accumulo/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java new file mode 100644 index 0000000000000000000000000000000000000000..00fd02e0dd8e66c5910a5c80bd3338f3e04a2182 --- /dev/null +++ b/accumulo/src/test/java/com/yahoo/ycsb/db/accumulo/AccumuloTest.java @@ -0,0 +1,209 @@ +/* + * Copyright (c) 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. + */ + +package com.yahoo.ycsb.db.accumulo; + + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.Map.Entry; +import java.util.Properties; + +import com.yahoo.ycsb.Workload; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.measurements.Measurements; +import com.yahoo.ycsb.workloads.CoreWorkload; + +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.Scanner; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.data.Key; +import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.core.security.TablePermission; +import org.apache.accumulo.minicluster.MiniAccumuloCluster; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.junit.rules.TestName; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Use an Accumulo MiniCluster to test out basic workload operations with + * the Accumulo binding. + */ +public class AccumuloTest { + private static final Logger LOG = LoggerFactory.getLogger(AccumuloTest.class); + private static final int INSERT_COUNT = 2000; + private static final int TRANSACTION_COUNT = 2000; + + @ClassRule + public static TemporaryFolder workingDir = new TemporaryFolder(); + @Rule + public TestName test = new TestName(); + + private static MiniAccumuloCluster cluster; + private static Properties properties; + private Workload workload; + private DB client; + private Properties workloadProps; + + @BeforeClass + public static void setup() throws Exception { + cluster = new MiniAccumuloCluster(workingDir.newFolder("accumulo").getAbsoluteFile(), "protectyaneck"); + LOG.debug("starting minicluster"); + cluster.start(); + LOG.debug("creating connection for admin operations."); + // set up the table and user + final Connector admin = cluster.getConnector("root", "protectyaneck"); + admin.tableOperations().create(CoreWorkload.TABLENAME_PROPERTY_DEFAULT); + admin.securityOperations().createLocalUser("ycsb", new PasswordToken("protectyaneck")); + admin.securityOperations().grantTablePermission("ycsb", CoreWorkload.TABLENAME_PROPERTY_DEFAULT, TablePermission.READ); + admin.securityOperations().grantTablePermission("ycsb", CoreWorkload.TABLENAME_PROPERTY_DEFAULT, TablePermission.WRITE); + + // set properties the binding will read + properties = new Properties(); + properties.setProperty("accumulo.zooKeepers", cluster.getZooKeepers()); + properties.setProperty("accumulo.instanceName", cluster.getInstanceName()); + properties.setProperty("accumulo.columnFamily", "family"); + properties.setProperty("accumulo.username", "ycsb"); + properties.setProperty("accumulo.password", "protectyaneck"); + // cut down the batch writer timeout so that writes will push through. + properties.setProperty("accumulo.batchWriterMaxLatency", "4"); + // set these explicitly to the defaults at the time we're compiled, since they'll be inlined in our class. + properties.setProperty(CoreWorkload.TABLENAME_PROPERTY, CoreWorkload.TABLENAME_PROPERTY_DEFAULT); + properties.setProperty(CoreWorkload.FIELD_COUNT_PROPERTY, CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT); + properties.setProperty(CoreWorkload.INSERT_ORDER_PROPERTY, "ordered"); + } + + @AfterClass + public static void clusterCleanup() throws Exception { + if (cluster != null) { + LOG.debug("shutting down minicluster"); + cluster.stop(); + cluster = null; + } + } + + @Before + public void client() throws Exception { + + LOG.debug("Loading workload properties for {}", test.getMethodName()); + workloadProps = new Properties(); + workloadProps.load(getClass().getResourceAsStream("/workloads/" + test.getMethodName())); + + for (String prop : properties.stringPropertyNames()) { + workloadProps.setProperty(prop, properties.getProperty(prop)); + } + + // TODO we need a better test rig for 'run this ycsb workload' + LOG.debug("initializing measurements and workload"); + Measurements.setProperties(workloadProps); + workload = new CoreWorkload(); + workload.init(workloadProps); + + LOG.debug("initializing client"); + client = new AccumuloClient(); + client.setProperties(workloadProps); + client.init(); + } + + @After + public void cleanup() throws Exception { + if (client != null) { + LOG.debug("cleaning up client"); + client.cleanup(); + client = null; + } + if (workload != null) { + LOG.debug("cleaning up workload"); + workload.cleanup(); + } + } + + @After + public void truncateTable() throws Exception { + if (cluster != null) { + LOG.debug("truncating table {}", CoreWorkload.TABLENAME_PROPERTY_DEFAULT); + final Connector admin = cluster.getConnector("root", "protectyaneck"); + admin.tableOperations().deleteRows(CoreWorkload.TABLENAME_PROPERTY_DEFAULT, null, null); + } + } + + @Test + public void workloada() throws Exception { + runWorkload(); + } + + @Test + public void workloadb() throws Exception { + runWorkload(); + } + + @Test + public void workloadc() throws Exception { + runWorkload(); + } + + @Test + public void workloadd() throws Exception { + runWorkload(); + } + + @Test + public void workloade() throws Exception { + runWorkload(); + } + + /** + * go through a workload cycle. + * <ol> + * <li>initialize thread-specific state + * <li>load the workload dataset + * <li>run workload transactions + * </ol> + */ + private void runWorkload() throws Exception { + final Object state = workload.initThread(workloadProps,0,0); + LOG.debug("load"); + for (int i = 0; i < INSERT_COUNT; i++) { + assertTrue("insert failed.", workload.doInsert(client, state)); + } + // Ensure we wait long enough for the batch writer to flush + // TODO accumulo client should be flushing per insert by default. + Thread.sleep(2000); + LOG.debug("verify number of cells"); + final Scanner scanner = cluster.getConnector("root", "protectyaneck").createScanner(CoreWorkload.TABLENAME_PROPERTY_DEFAULT, Authorizations.EMPTY); + int count = 0; + for (Entry<Key, Value> entry : scanner) { + count++; + } + assertEquals("Didn't get enough total cells.", (Integer.valueOf(CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT) * INSERT_COUNT), count); + LOG.debug("run"); + for (int i = 0; i < TRANSACTION_COUNT; i++) { + assertTrue("transaction failed.", workload.doTransaction(client, state)); + } + } +} diff --git a/accumulo/src/test/resources/log4j.properties b/accumulo/src/test/resources/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..e03d54a31a8e20a926c453d6057a41d128ed1f44 --- /dev/null +++ b/accumulo/src/test/resources/log4j.properties @@ -0,0 +1,29 @@ +# +# Copyright (c) 2015 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. +# + +# Root logger option +log4j.rootLogger=INFO, stderr + +log4j.appender.stderr=org.apache.log4j.ConsoleAppender +log4j.appender.stderr.target=System.err +log4j.appender.stderr.layout=org.apache.log4j.PatternLayout +log4j.appender.stderr.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n + +# Suppress messages from ZooKeeper +log4j.logger.com.yahoo.ycsb.db.accumulo=INFO +log4j.logger.org.apache.zookeeper=ERROR +log4j.logger.org.apache.accumulo=WARN diff --git a/aerospike/pom.xml b/aerospike/pom.xml index 55b82ecce74412da52cfc2b84e6a1f74b24350b2..37cab3e2c991dd7be1169ed97075935e06bbb2ea 100644 --- a/aerospike/pom.xml +++ b/aerospike/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2015 YCSB contributors. All rights reserved. +Copyright (c) 2015-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 @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> diff --git a/aerospike/src/main/java/com/yahoo/ycsb/db/AerospikeClient.java b/aerospike/src/main/java/com/yahoo/ycsb/db/AerospikeClient.java index dc872061fd2f0803e63edb99577f899dc473f760..5aa80e46cfc9dfcb7de2ed6ff9d4e1589c759c08 100644 --- a/aerospike/src/main/java/com/yahoo/ycsb/db/AerospikeClient.java +++ b/aerospike/src/main/java/com/yahoo/ycsb/db/AerospikeClient.java @@ -17,40 +17,34 @@ package com.yahoo.ycsb.db; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.Vector; - import com.aerospike.client.AerospikeException; import com.aerospike.client.Bin; import com.aerospike.client.Key; import com.aerospike.client.Record; -import com.aerospike.client.ResultCode; import com.aerospike.client.policy.ClientPolicy; import com.aerospike.client.policy.Policy; import com.aerospike.client.policy.RecordExistsAction; import com.aerospike.client.policy.WritePolicy; - import com.yahoo.ycsb.ByteArrayByteIterator; import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; -public class AerospikeClient extends com.yahoo.ycsb.DB { - private static final boolean DEBUG = false; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; +/** + * YCSB binding for <a href="http://www.aerospike.com/">Areospike</a>. + */ +public class AerospikeClient extends com.yahoo.ycsb.DB { private static final String DEFAULT_HOST = "localhost"; private static final String DEFAULT_PORT = "3000"; private static final String DEFAULT_TIMEOUT = "10000"; private static final String DEFAULT_NAMESPACE = "ycsb"; - private static final int RESULT_OK = 0; - private static final int RESULT_ERROR = -1; - - private static final int WRITE_OVERLOAD_DELAY = 5; - private static final int WRITE_OVERLOAD_TRIES = 3; - private String namespace = null; private com.aerospike.client.AerospikeClient client = null; @@ -103,7 +97,7 @@ public class AerospikeClient extends com.yahoo.ycsb.DB { } @Override - public int read(String table, String key, Set<String> fields, + public Status read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { try { Record record; @@ -116,11 +110,8 @@ public class AerospikeClient extends com.yahoo.ycsb.DB { } if (record == null) { - if (DEBUG) { - System.err.println("Record key " + key + " not found (read)"); - } - - return RESULT_ERROR; + System.err.println("Record key " + key + " not found (read)"); + return Status.ERROR; } for (Map.Entry<String, Object> entry: record.bins.entrySet()) { @@ -128,21 +119,21 @@ public class AerospikeClient extends com.yahoo.ycsb.DB { new ByteArrayByteIterator((byte[])entry.getValue())); } - return RESULT_OK; + return Status.OK; } catch (AerospikeException e) { System.err.println("Error while reading key " + key + ": " + e); - return RESULT_ERROR; + return Status.ERROR; } } @Override - public int scan(String table, String start, int count, Set<String> fields, + public Status scan(String table, String start, int count, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { System.err.println("Scan not implemented"); - return RESULT_ERROR; + return Status.ERROR; } - private int write(String table, String key, WritePolicy writePolicy, + private Status write(String table, String key, WritePolicy writePolicy, HashMap<String, ByteIterator> values) { Bin[] bins = new Bin[values.size()]; int index = 0; @@ -152,65 +143,41 @@ public class AerospikeClient extends com.yahoo.ycsb.DB { ++index; } - int delay = WRITE_OVERLOAD_DELAY; Key keyObj = new Key(namespace, table, key); - for (int tries = 0; tries < WRITE_OVERLOAD_TRIES; ++tries) { - try { - client.put(writePolicy, keyObj, bins); - return RESULT_OK; - } catch (AerospikeException e) { - if (e.getResultCode() != ResultCode.DEVICE_OVERLOAD) { - System.err.println("Error while writing key " + key + ": " + e); - return RESULT_ERROR; - } - - try { - Thread.sleep(delay); - } catch (InterruptedException e2) { - if (DEBUG) { - System.err.println("Interrupted: " + e2); - } - } - - delay *= 2; - } - } - - if (DEBUG) { - System.err.println("Device overload"); + try { + client.put(writePolicy, keyObj, bins); + return Status.OK; + } catch (AerospikeException e) { + System.err.println("Error while writing key " + key + ": " + e); + return Status.ERROR; } - - return RESULT_ERROR; } @Override - public int update(String table, String key, + public Status update(String table, String key, HashMap<String, ByteIterator> values) { return write(table, key, updatePolicy, values); } @Override - public int insert(String table, String key, + public Status insert(String table, String key, HashMap<String, ByteIterator> values) { return write(table, key, insertPolicy, values); } @Override - public int delete(String table, String key) { + public Status delete(String table, String key) { try { if (!client.delete(deletePolicy, new Key(namespace, table, key))) { - if (DEBUG) { - System.err.println("Record key " + key + " not found (delete)"); - } - - return RESULT_ERROR; + System.err.println("Record key " + key + " not found (delete)"); + return Status.ERROR; } - return RESULT_OK; + return Status.OK; } catch (AerospikeException e) { System.err.println("Error while deleting key " + key + ": " + e); - return RESULT_ERROR; + return Status.ERROR; } } } diff --git a/aerospike/src/main/java/com/yahoo/ycsb/db/package-info.java b/aerospike/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..1436a02835b0eaae386be5ae25bb5f4eb7aadc61 --- /dev/null +++ b/aerospike/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2015 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. + */ + +/** + * YCSB binding for <a href="http://www.aerospike.com/">Areospike</a>. + */ +package com.yahoo.ycsb.db; diff --git a/bin/ycsb b/bin/ycsb index 03c40ee0ae7dc8272a82eed5290acc12c6a8178c..b731a45fe1585b4e40ce2f73254d153cc2a09d05 100755 --- a/bin/ycsb +++ b/bin/ycsb @@ -16,13 +16,18 @@ # LICENSE file. # -import argparse +import errno import fnmatch import io import os import shlex import sys import subprocess +try: + import argparse +except ImportError: + print >> sys.stderr, '[ERROR] argparse not found. Try installing it via "pip".' + raise BASE_URL = "https://github.com/brianfrankcooper/YCSB/tree/master/" COMMANDS = { @@ -44,29 +49,36 @@ COMMANDS = { } DATABASES = { - "accumulo" : "com.yahoo.ycsb.db.AccumuloClient", + "accumulo" : "com.yahoo.ycsb.db.accumulo.AccumuloClient", "aerospike" : "com.yahoo.ycsb.db.AerospikeClient", "basic" : "com.yahoo.ycsb.BasicDB", "cassandra-7" : "com.yahoo.ycsb.db.CassandraClient7", "cassandra-8" : "com.yahoo.ycsb.db.CassandraClient8", "cassandra-10" : "com.yahoo.ycsb.db.CassandraClient10", "cassandra-cql": "com.yahoo.ycsb.db.CassandraCQLClient", + "cassandra2-cql": "com.yahoo.ycsb.db.CassandraCQLClient", "couchbase" : "com.yahoo.ycsb.db.CouchbaseClient", "dynamodb" : "com.yahoo.ycsb.db.DynamoDBClient", "elasticsearch": "com.yahoo.ycsb.db.ElasticSearchClient", "geode" : "com.yahoo.ycsb.db.GeodeClient", - "hbase" : "com.yahoo.ycsb.db.HBaseClient", - "hbase-10" : "com.yahoo.ycsb.db.HBaseClient10", + "googledatastore" : "com.yahoo.ycsb.db.GoogleDatastoreClient", + "hbase094" : "com.yahoo.ycsb.db.HBaseClient", + "hbase098" : "com.yahoo.ycsb.db.HBaseClient", + "hbase10" : "com.yahoo.ycsb.db.HBaseClient10", "hypertable" : "com.yahoo.ycsb.db.HypertableClient", "infinispan-cs": "com.yahoo.ycsb.db.InfinispanRemoteClient", "infinispan" : "com.yahoo.ycsb.db.InfinispanClient", "jdbc" : "com.yahoo.ycsb.db.JdbcDBClient", + "kudu" : "com.yahoo.ycsb.db.KuduYCSBClient", "mapkeeper" : "com.yahoo.ycsb.db.MapKeeperClient", + "memcached" : "com.yahoo.ycsb.db.MemcachedClient", "mongodb" : "com.yahoo.ycsb.db.MongoDbClient", "mongodb-async": "com.yahoo.ycsb.db.AsyncMongoDbClient", "nosqldb" : "com.yahoo.ycsb.db.NoSqlDbClient", "orientdb" : "com.yahoo.ycsb.db.OrientDBClient", "redis" : "com.yahoo.ycsb.db.RedisClient", + "s3" : "com.yahoo.ycsb.db.S3Client", + "solr" : "com.yahoo.ycsb.db.SolrClient", "tarantool" : "com.yahoo.ycsb.db.TarantoolClient", "voldemort" : "com.yahoo.ycsb.db.VoldemortClient" } @@ -106,6 +118,13 @@ def usage(): return output.getvalue() +def check_output(cmd): + p = subprocess.Popen(cmd, stdout=subprocess.PIPE) + stdout, _ = p.communicate() + if p.returncode: + raise subprocess.CalledProcessError(p.returncode, cmd) + return stdout + def debug(message): print >> sys.stderr, "[DEBUG] ", message @@ -122,7 +141,6 @@ def find_jars(dir, glob='*.jar'): jars.append(os.path.join(dirpath, filename)) return jars - def get_ycsb_home(): dir = os.path.abspath(os.path.dirname(sys.argv[0])) while "LICENSE.txt" not in os.listdir(dir): @@ -137,15 +155,16 @@ def is_distribution(): # presumes maven can run, so should only be run on source checkouts # will invoke the 'package' goal for the given binding in order to resolve intra-project deps # presumes maven properly handles system-specific path separators -def get_classpath_from_maven(database): +# Given module is full module name eg. 'core' or 'couchbase-binding' +def get_classpath_from_maven(module): try: - debug("Running 'mvn -pl com.yahoo.ycsb:"+database+"-binding -am package -DskipTests " + debug("Running 'mvn -pl com.yahoo.ycsb:" + module + " -am package -DskipTests " "dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true'") - mvn_output = subprocess.check_output(["mvn", "-pl", "com.yahoo.ycsb:"+database+"-binding", - "-am", "package", "-DskipTests", - "dependency:build-classpath", - "-DincludeScope=compile", - "-Dmdep.outputFilterFile=true"]) + mvn_output = check_output(["mvn", "-pl", "com.yahoo.ycsb:" + module, + "-am", "package", "-DskipTests", + "dependency:build-classpath", + "-DincludeScope=compile", + "-Dmdep.outputFilterFile=true"]) # the above outputs a "classpath=/path/tojar:/path/to/other/jar" for each module # the last module will be the datastore binding line = [x for x in mvn_output.splitlines() if x.startswith("classpath=")][-1:] @@ -187,6 +206,13 @@ def main(): # Classpath set up binding = args.database.split("-")[0] + + # Deprecation message for the entire cassandra-binding + if binding == "cassandra": + warn("The 'cassandra-7', 'cassandra-8', 'cassandra-10', and " + "cassandra-cql' clients are deprecated. If you are using " + "Cassandra 2.X try using the 'cassandra2-cql' client instead.") + if is_distribution(): db_dir = os.path.join(ycsb_home, binding + "-binding") # include top-level conf for when we're a binding-specific artifact. @@ -199,12 +225,14 @@ def main(): warn("Running against a source checkout. In order to get our runtime " "dependencies we'll have to invoke Maven. Depending on the state " "of your system, this may take ~30-45 seconds") - db_dir = os.path.join(ycsb_home, binding) + db_location = "core" if binding == "basic" else binding + project = "core" if binding == "basic" else binding + "-binding" + db_dir = os.path.join(ycsb_home, db_location) # goes first so we can rely on side-effect of package - maven_says = get_classpath_from_maven(binding) + maven_says = get_classpath_from_maven(project) # TODO when we have a version property, skip the glob cp = find_jars(os.path.join(db_dir, "target"), - binding + "-binding*.jar") + project + "*.jar") # alredy in jar:jar:jar form cp.append(maven_says) cp.insert(0, os.path.join(db_dir, "conf")) @@ -218,8 +246,14 @@ def main(): if command: ycsb_command.append(command) print >> sys.stderr, " ".join(ycsb_command) - return subprocess.call(ycsb_command) - + try: + return subprocess.call(ycsb_command) + except OSError as e: + if e.errno == errno.ENOENT: + error('Command failed. Is java installed and on your PATH?') + return 1 + else: + raise if __name__ == '__main__': sys.exit(main()) diff --git a/binding-parent/datastore-specific-descriptor/pom.xml b/binding-parent/datastore-specific-descriptor/pom.xml index 4bfeeecc859ef9633721dce3e3685cf049720154..8ad0b9c4b5e31fdd00e8fdb9ac43f7351185605f 100644 --- a/binding-parent/datastore-specific-descriptor/pom.xml +++ b/binding-parent/datastore-specific-descriptor/pom.xml @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>root</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../../</relativePath> </parent> diff --git a/binding-parent/pom.xml b/binding-parent/pom.xml index 4cbb27553c32d5958a0bcccc4ec560dd54cee59f..afb72d7be779093c50ad4c967f3634640b1876b9 100644 --- a/binding-parent/pom.xml +++ b/binding-parent/pom.xml @@ -1,5 +1,5 @@ <!-- -Copyright (c) 2015 YCSB contributors. All rights reserved. +Copyright (c) 2015-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 @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>root</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> </parent> <artifactId>binding-parent</artifactId> @@ -60,6 +60,7 @@ LICENSE file. <format>tar.gz</format> </formats> <appendAssemblyId>false</appendAssemblyId> + <tarLongFileMode>posix</tarLongFileMode> </configuration> <executions> <execution> @@ -70,6 +71,18 @@ LICENSE file. </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <executions> + <execution> + <id>validate</id> + <configuration> + <configLocation>../checkstyle.xml</configLocation> + </configuration> + </execution> + </executions> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> diff --git a/cassandra/README.md b/cassandra/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bff09f4e5b0256bbce154e71391d5d2d003082d1 --- /dev/null +++ b/cassandra/README.md @@ -0,0 +1,72 @@ +<!-- +Copyright (c) 2015 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. +--> +# THIS BINDING IS DEPRECATED +---------------------------- +Date of removal from YCSB: **March 2016** + +Due to the low amount of use and support for older Cassandra lineages (0.X and 1.X), YCSB will not support clients for these versions either. + +For Cassandra 2.X use the ```cassandra2-cql``` client: https://github.com/brianfrankcooper/YCSB/tree/master/cassandra2. + +# Cassandra (0.7, 0.8, 1.x) drivers for YCSB + +**For Cassandra 2 CQL support, use the `cassandra2-cql` binding. The Thrift drivers below are deprecated, and the CQL driver here does not support Cassandra 2.1+.** + +There are three drivers in the Cassandra binding: + +* `cassandra-7`: Cassandra 0.7 Thrift binding. +* `cassandra-8`: Cassandra 0.8 Thrift binding. +* `cassandra-10`: Cassandra 1.0+ Thrift binding. +* `cassandra-cql`: Cassandra CQL binding, for Cassandra 1.x to 2.0. See `cassandra2/README.md` for details on parameters. + +# `cassandra-10` + +## Creating a table + +Using `cassandra-cli`: + + create keyspace usertable with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = {replication_factor:1}; + + create column family data with column_type = 'Standard' and comparator = 'UTF8Type'; + +**Note that `replication_factor` and consistency levels (below) will affect performance.** + +## Configuration Parameters + +- `hosts` (**required**) + - Cassandra nodes to connect to. + - No default. + +* `port` + - Thrift port for communicating with Cassandra cluster. + * Default is `9160`. + +- `cassandra.columnfamily` + - Column family name - must match the column family for the table created (see above). + - Default value is `data` + +- `cassandra.username` +- `cassandra.password` + - Optional user name and password for authentication. See http://docs.datastax.com/en/cassandra/2.0/cassandra/security/security_config_native_authenticate_t.html for details. + +* `cassandra.readconsistencylevel` +* `cassandra.scanconsistencylevel` +* `cassandra.writeconsistencylevel` + + - Default value is `ONE` + - Consistency level for reads and writes, respectively. See the [DataStax documentation](http://docs.datastax.com/en/cassandra/2.0/cassandra/dml/dml_config_consistency_c.html) for details. + - *Note that the default setting does not provide durability in the face of node failure. Changing this setting will affect observed performance.* See also `replication_factor`, above. diff --git a/cassandra/pom.xml b/cassandra/pom.xml index 73de9d9f920ffc644413682df4c3c3640a75c98e..ef4f20b46d5eddeae129678f9f856ca6774d9977 100644 --- a/cassandra/pom.xml +++ b/cassandra/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> diff --git a/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java b/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java index cac333424c12a9531a80a23337f0664cfd39c422..eeaca7aeb3a7dc9280a5981cda65a7ac9383f1ee 100755 --- a/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java +++ b/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java @@ -30,389 +30,406 @@ import java.util.HashMap; import java.util.Vector; import java.util.concurrent.atomic.AtomicInteger; - /** * Tested with Cassandra 2.0, CQL client for YCSB framework - * - * In CQLSH, create keyspace and table. Something like: - * cqlsh> create keyspace ycsb - * WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor': 1 }; - * cqlsh> create table usertable ( - * y_id varchar primary key, - * field0 varchar, - * field1 varchar, - * field2 varchar, - * field3 varchar, - * field4 varchar, - * field5 varchar, - * field6 varchar, - * field7 varchar, - * field8 varchar, - * field9 varchar); + * + * See {@code cassandra2} for a version compatible with Cassandra 2.1+. See + * {@code cassandra2/README.md} for details. * * @author cmatser */ public class CassandraCQLClient extends DB { - private static Cluster cluster = null; - private static Session session = null; - - private static ConsistencyLevel readConsistencyLevel = ConsistencyLevel.ONE; - private static ConsistencyLevel writeConsistencyLevel = ConsistencyLevel.ONE; - - public static final int OK = 0; - public static final int ERR = -1; - - public static final String YCSB_KEY = "y_id"; - public static final String KEYSPACE_PROPERTY = "cassandra.keyspace"; - public static final String KEYSPACE_PROPERTY_DEFAULT = "ycsb"; - public static final String USERNAME_PROPERTY = "cassandra.username"; - public static final String PASSWORD_PROPERTY = "cassandra.password"; - - public static final String READ_CONSISTENCY_LEVEL_PROPERTY = "cassandra.readconsistencylevel"; - public static final String READ_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = "ONE"; - public static final String WRITE_CONSISTENCY_LEVEL_PROPERTY = "cassandra.writeconsistencylevel"; - public static final String WRITE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = "ONE"; - - /** Count the number of times initialized to teardown on the last {@link #cleanup()}. */ - private static final AtomicInteger initCount = new AtomicInteger(0); - - private static boolean _debug = false; - - /** - * Initialize any state for this DB. Called once per DB instance; there is - * one DB instance per client thread. - */ - @Override - public void init() throws DBException { - - //Keep track of number of calls to init (for later cleanup) - initCount.incrementAndGet(); - - //Synchronized so that we only have a single - // cluster/session instance for all the threads. - synchronized (initCount) { - - //Check if the cluster has already been initialized - if (cluster != null) { - return; - } - - try { - - _debug = Boolean.parseBoolean(getProperties().getProperty("debug", "false")); - - String host = getProperties().getProperty("host"); - if (host == null) { - throw new DBException("Required property \"host\" missing for CassandraClient"); - } - String hosts[] = host.split(" "); - String port = getProperties().getProperty("port", "9160"); - if (port == null) { - throw new DBException("Required property \"port\" missing for CassandraClient"); - } - - String username = getProperties().getProperty(USERNAME_PROPERTY); - String password = getProperties().getProperty(PASSWORD_PROPERTY); - - String keyspace = getProperties().getProperty(KEYSPACE_PROPERTY, KEYSPACE_PROPERTY_DEFAULT); - - readConsistencyLevel = ConsistencyLevel.valueOf(getProperties().getProperty(READ_CONSISTENCY_LEVEL_PROPERTY, READ_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); - writeConsistencyLevel = ConsistencyLevel.valueOf(getProperties().getProperty(WRITE_CONSISTENCY_LEVEL_PROPERTY, WRITE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); - - // public void connect(String node) {} - if ((username != null) && !username.isEmpty()) { - cluster = Cluster.builder() - .withCredentials(username, password) - .withPort(Integer.valueOf(port)) - .addContactPoints(hosts).build(); - } - else { - cluster = Cluster.builder() - .withPort(Integer.valueOf(port)) - .addContactPoints(hosts).build(); - } - - //Update number of connections based on threads - int threadcount = Integer.parseInt(getProperties().getProperty("threadcount","1")); - cluster.getConfiguration().getPoolingOptions().setMaxConnectionsPerHost(HostDistance.LOCAL, threadcount); - - //Set connection timeout 3min (default is 5s) - cluster.getConfiguration().getSocketOptions().setConnectTimeoutMillis(3*60*1000); - //Set read (execute) timeout 3min (default is 12s) - cluster.getConfiguration().getSocketOptions().setReadTimeoutMillis(3*60*1000); - - Metadata metadata = cluster.getMetadata(); - System.out.printf("Connected to cluster: %s\n", metadata.getClusterName()); - - for (Host discoveredHost : metadata.getAllHosts()) { - System.out.printf("Datacenter: %s; Host: %s; Rack: %s\n", - discoveredHost.getDatacenter(), - discoveredHost.getAddress(), - discoveredHost.getRack()); - } - - session = cluster.connect(keyspace); - - } catch (Exception e) { - throw new DBException(e); - } - }//synchronized - } + private static Cluster cluster = null; + private static Session session = null; + + private static ConsistencyLevel readConsistencyLevel = ConsistencyLevel.ONE; + private static ConsistencyLevel writeConsistencyLevel = ConsistencyLevel.ONE; + + public static final String YCSB_KEY = "y_id"; + public static final String KEYSPACE_PROPERTY = "cassandra.keyspace"; + public static final String KEYSPACE_PROPERTY_DEFAULT = "ycsb"; + public static final String USERNAME_PROPERTY = "cassandra.username"; + public static final String PASSWORD_PROPERTY = "cassandra.password"; + + public static final String HOSTS_PROPERTY = "hosts"; + public static final String PORT_PROPERTY = "port"; + + public static final String READ_CONSISTENCY_LEVEL_PROPERTY = + "cassandra.readconsistencylevel"; + public static final String READ_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = "ONE"; + public static final String WRITE_CONSISTENCY_LEVEL_PROPERTY = + "cassandra.writeconsistencylevel"; + public static final String WRITE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = "ONE"; + + /** + * Count the number of times initialized to teardown on the last + * {@link #cleanup()}. + */ + private static final AtomicInteger INIT_COUNT = new AtomicInteger(0); + + private static boolean debug = false; + + /** + * Initialize any state for this DB. Called once per DB instance; there is one + * DB instance per client thread. + */ + @Override + public void init() throws DBException { + + // Keep track of number of calls to init (for later cleanup) + INIT_COUNT.incrementAndGet(); + + // Synchronized so that we only have a single + // cluster/session instance for all the threads. + synchronized (INIT_COUNT) { + + // Check if the cluster has already been initialized + if (cluster != null) { + return; + } + + try { + + debug = + Boolean.parseBoolean(getProperties().getProperty("debug", "false")); + + String host = getProperties().getProperty(HOSTS_PROPERTY); + if (host == null) { + throw new DBException(String.format( + "Required property \"%s\" missing for CassandraCQLClient", + HOSTS_PROPERTY)); + } + String[] hosts = host.split(","); + String port = getProperties().getProperty("port", "9042"); + if (port == null) { + throw new DBException(String.format( + "Required property \"%s\" missing for CassandraCQLClient", + PORT_PROPERTY)); + } - /** - * Cleanup any state for this DB. Called once per DB instance; there is one - * DB instance per client thread. - */ - @Override - public void cleanup() throws DBException { - if (initCount.decrementAndGet() <= 0) { - cluster.shutdown(); + String username = getProperties().getProperty(USERNAME_PROPERTY); + String password = getProperties().getProperty(PASSWORD_PROPERTY); + + String keyspace = getProperties().getProperty(KEYSPACE_PROPERTY, + KEYSPACE_PROPERTY_DEFAULT); + + readConsistencyLevel = ConsistencyLevel.valueOf( + getProperties().getProperty(READ_CONSISTENCY_LEVEL_PROPERTY, + READ_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); + writeConsistencyLevel = ConsistencyLevel.valueOf( + getProperties().getProperty(WRITE_CONSISTENCY_LEVEL_PROPERTY, + WRITE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); + + // public void connect(String node) {} + if ((username != null) && !username.isEmpty()) { + cluster = Cluster.builder().withCredentials(username, password) + .withPort(Integer.valueOf(port)).addContactPoints(hosts).build(); + } else { + cluster = Cluster.builder().withPort(Integer.valueOf(port)) + .addContactPoints(hosts).build(); } - } - /** - * Read a record from the database. Each field/value pair from the result - * will be stored in a HashMap. - * - * @param table The name of the table - * @param key The record key of the record to read. - * @param fields The list of fields to read, or null for all of them - * @param result A HashMap of field/value pairs for the result - * @return Zero on success, a non-zero error code on error - */ - @Override - public int read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { - - try { - Statement stmt; - Select.Builder selectBuilder; - - if (fields == null) { - selectBuilder = QueryBuilder.select().all(); - } - else { - selectBuilder = QueryBuilder.select(); - for (String col : fields) { - ((Select.Selection) selectBuilder).column(col); - } - } - - stmt = selectBuilder.from(table).where(QueryBuilder.eq(YCSB_KEY, key)).limit(1); - stmt.setConsistencyLevel(readConsistencyLevel); - - if (_debug) { - System.out.println(stmt.toString()); - } - - ResultSet rs = session.execute(stmt); - - //Should be only 1 row - if (!rs.isExhausted()) { - Row row = rs.one(); - ColumnDefinitions cd = row.getColumnDefinitions(); - - for (ColumnDefinitions.Definition def : cd) { - ByteBuffer val = row.getBytesUnsafe(def.getName()); - if (val != null) { - result.put(def.getName(), - new ByteArrayByteIterator(val.array())); - } - else { - result.put(def.getName(), null); - } - } - - } - - return OK; - - } catch (Exception e) { - e.printStackTrace(); - System.out.println("Error reading key: " + key); - return ERR; + // Update number of connections based on threads + int threadcount = + Integer.parseInt(getProperties().getProperty("threadcount", "1")); + cluster.getConfiguration().getPoolingOptions() + .setMaxConnectionsPerHost(HostDistance.LOCAL, threadcount); + + // Set connection timeout 3min (default is 5s) + cluster.getConfiguration().getSocketOptions() + .setConnectTimeoutMillis(3 * 60 * 1000); + // Set read (execute) timeout 3min (default is 12s) + cluster.getConfiguration().getSocketOptions() + .setReadTimeoutMillis(3 * 60 * 1000); + + Metadata metadata = cluster.getMetadata(); + System.out.printf("Connected to cluster: %s\n", + metadata.getClusterName()); + + for (Host discoveredHost : metadata.getAllHosts()) { + System.out.printf("Datacenter: %s; Host: %s; Rack: %s\n", + discoveredHost.getDatacenter(), discoveredHost.getAddress(), + discoveredHost.getRack()); } + session = cluster.connect(keyspace); + + } catch (Exception e) { + throw new DBException(e); + } + } // synchronized + } + + /** + * Cleanup any state for this DB. Called once per DB instance; there is one DB + * instance per client thread. + */ + @Override + public void cleanup() throws DBException { + if (INIT_COUNT.decrementAndGet() <= 0) { + cluster.shutdown(); } - - /** - * Perform a range scan for a set of records in the database. Each - * field/value pair from the result will be stored in a HashMap. - * - * Cassandra CQL uses "token" method for range scan which doesn't always - * yield intuitive results. - * - * @param table The name of the table - * @param startkey The record key of the first record to read. - * @param recordcount The number of records to read - * @param fields The list of fields to read, or null for all of them - * @param result A Vector of HashMaps, where each HashMap is a set - * field/value pairs for one record - * @return Zero on success, a non-zero error code on error - */ - @Override - public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { - - try { - Statement stmt; - Select.Builder selectBuilder; - - if (fields == null) { - selectBuilder = QueryBuilder.select().all(); - } - else { - selectBuilder = QueryBuilder.select(); - for (String col : fields) { - ((Select.Selection) selectBuilder).column(col); - } - } - - stmt = selectBuilder.from(table); - - //The statement builder is not setup right for tokens. - // So, we need to build it manually. - String initialStmt = stmt.toString(); - StringBuilder scanStmt = new StringBuilder(); - scanStmt.append( - initialStmt.substring(0, initialStmt.length()-1)); - scanStmt.append(" WHERE "); - scanStmt.append(QueryBuilder.token(YCSB_KEY)); - scanStmt.append(" >= "); - scanStmt.append("token('"); - scanStmt.append(startkey); - scanStmt.append("')"); - scanStmt.append(" LIMIT "); - scanStmt.append(recordcount); - - stmt = new SimpleStatement(scanStmt.toString()); - stmt.setConsistencyLevel(readConsistencyLevel); - - if (_debug) { - System.out.println(stmt.toString()); - } - - ResultSet rs = session.execute(stmt); - - HashMap<String, ByteIterator> tuple; - while (!rs.isExhausted()) { - Row row = rs.one(); - tuple = new HashMap<String, ByteIterator> (); - - ColumnDefinitions cd = row.getColumnDefinitions(); - - for (ColumnDefinitions.Definition def : cd) { - ByteBuffer val = row.getBytesUnsafe(def.getName()); - if (val != null) { - tuple.put(def.getName(), - new ByteArrayByteIterator(val.array())); - } - else { - tuple.put(def.getName(), null); - } - } - - result.add(tuple); - } - - return OK; - - } catch (Exception e) { - e.printStackTrace(); - System.out.println("Error scanning with startkey: " + startkey); - return ERR; + } + + /** + * Read a record from the database. Each field/value pair from the result will + * be stored in a HashMap. + * + * @param table + * The name of the table + * @param key + * The record key of the record to read. + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A HashMap of field/value pairs for the result + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + + try { + Statement stmt; + Select.Builder selectBuilder; + + if (fields == null) { + selectBuilder = QueryBuilder.select().all(); + } else { + selectBuilder = QueryBuilder.select(); + for (String col : fields) { + ((Select.Selection) selectBuilder).column(col); + } + } + + stmt = selectBuilder.from(table).where(QueryBuilder.eq(YCSB_KEY, key)) + .limit(1); + stmt.setConsistencyLevel(readConsistencyLevel); + + if (debug) { + System.out.println(stmt.toString()); + } + + ResultSet rs = session.execute(stmt); + + // Should be only 1 row + if (!rs.isExhausted()) { + Row row = rs.one(); + ColumnDefinitions cd = row.getColumnDefinitions(); + + for (ColumnDefinitions.Definition def : cd) { + ByteBuffer val = row.getBytesUnsafe(def.getName()); + if (val != null) { + result.put(def.getName(), new ByteArrayByteIterator(val.array())); + } else { + result.put(def.getName(), null); + } } - } + } - /** - * Update a record in the database. Any field/value pairs in the specified - * values HashMap will be written into the record with the specified record - * key, overwriting any existing values with the same field name. - * - * @param table The name of the table - * @param key The record key of the record to write. - * @param values A HashMap of field/value pairs to update in the record - * @return Zero on success, a non-zero error code on error - */ - @Override - public int update(String table, String key, HashMap<String, ByteIterator> values) { - //Insert and updates provide the same functionality - return insert(table, key, values); - } + return Status.OK; - /** - * Insert a record in the database. Any field/value pairs in the specified - * values HashMap will be written into the record with the specified record - * key. - * - * @param table The name of the table - * @param key The record key of the record to insert. - * @param values A HashMap of field/value pairs to insert in the record - * @return Zero on success, a non-zero error code on error - */ - @Override - public int insert(String table, String key, HashMap<String, ByteIterator> values) { - - try { - Insert insertStmt = QueryBuilder.insertInto(table); - - //Add key - insertStmt.value(YCSB_KEY, key); - - //Add fields - for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { - Object value; - ByteIterator byteIterator = entry.getValue(); - value = byteIterator.toString(); - - insertStmt.value(entry.getKey(), value); - } - - insertStmt.setConsistencyLevel(writeConsistencyLevel); - - if (_debug) { - System.out.println(insertStmt.toString()); - } - - ResultSet rs = session.execute(insertStmt); - - return OK; - } catch (Exception e) { - e.printStackTrace(); - } - - return ERR; + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Error reading key: " + key); + return Status.ERROR; } - /** - * Delete a record from the database. - * - * @param table The name of the table - * @param key The record key of the record to delete. - * @return Zero on success, a non-zero error code on error - */ - @Override - public int delete(String table, String key) { - - try { - Statement stmt; + } + + /** + * Perform a range scan for a set of records in the database. Each field/value + * pair from the result will be stored in a HashMap. + * + * Cassandra CQL uses "token" method for range scan which doesn't always yield + * intuitive results. + * + * @param table + * The name of the table + * @param startkey + * The record key of the first record to read. + * @param recordcount + * The number of records to read + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A Vector of HashMaps, where each HashMap is a set field/value + * pairs for one record + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + + try { + Statement stmt; + Select.Builder selectBuilder; + + if (fields == null) { + selectBuilder = QueryBuilder.select().all(); + } else { + selectBuilder = QueryBuilder.select(); + for (String col : fields) { + ((Select.Selection) selectBuilder).column(col); + } + } + + stmt = selectBuilder.from(table); + + // The statement builder is not setup right for tokens. + // So, we need to build it manually. + String initialStmt = stmt.toString(); + StringBuilder scanStmt = new StringBuilder(); + scanStmt.append(initialStmt.substring(0, initialStmt.length() - 1)); + scanStmt.append(" WHERE "); + scanStmt.append(QueryBuilder.token(YCSB_KEY)); + scanStmt.append(" >= "); + scanStmt.append("token('"); + scanStmt.append(startkey); + scanStmt.append("')"); + scanStmt.append(" LIMIT "); + scanStmt.append(recordcount); + + stmt = new SimpleStatement(scanStmt.toString()); + stmt.setConsistencyLevel(readConsistencyLevel); + + if (debug) { + System.out.println(stmt.toString()); + } + + ResultSet rs = session.execute(stmt); + + HashMap<String, ByteIterator> tuple; + while (!rs.isExhausted()) { + Row row = rs.one(); + tuple = new HashMap<String, ByteIterator>(); + + ColumnDefinitions cd = row.getColumnDefinitions(); + + for (ColumnDefinitions.Definition def : cd) { + ByteBuffer val = row.getBytesUnsafe(def.getName()); + if (val != null) { + tuple.put(def.getName(), new ByteArrayByteIterator(val.array())); + } else { + tuple.put(def.getName(), null); + } + } - stmt = QueryBuilder.delete().from(table).where(QueryBuilder.eq(YCSB_KEY, key)); - stmt.setConsistencyLevel(writeConsistencyLevel); + result.add(tuple); + } - if (_debug) { - System.out.println(stmt.toString()); - } + return Status.OK; - ResultSet rs = session.execute(stmt); + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Error scanning with startkey: " + startkey); + return Status.ERROR; + } - return OK; - } catch (Exception e) { - e.printStackTrace(); - System.out.println("Error deleting key: " + key); - } + } + + /** + * Update a record in the database. Any field/value pairs in the specified + * values HashMap will be written into the record with the specified record + * key, overwriting any existing values with the same field name. + * + * @param table + * The name of the table + * @param key + * The record key of the record to write. + * @param values + * A HashMap of field/value pairs to update in the record + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { + // Insert and updates provide the same functionality + return insert(table, key, values); + } + + /** + * Insert a record in the database. Any field/value pairs in the specified + * values HashMap will be written into the record with the specified record + * key. + * + * @param table + * The name of the table + * @param key + * The record key of the record to insert. + * @param values + * A HashMap of field/value pairs to insert in the record + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + + try { + Insert insertStmt = QueryBuilder.insertInto(table); + + // Add key + insertStmt.value(YCSB_KEY, key); + + // Add fields + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { + Object value; + ByteIterator byteIterator = entry.getValue(); + value = byteIterator.toString(); + + insertStmt.value(entry.getKey(), value); + } + + insertStmt.setConsistencyLevel(writeConsistencyLevel); + + if (debug) { + System.out.println(insertStmt.toString()); + } + + session.execute(insertStmt); + + return Status.OK; + } catch (Exception e) { + e.printStackTrace(); + } - return ERR; + return Status.ERROR; + } + + /** + * Delete a record from the database. + * + * @param table + * The name of the table + * @param key + * The record key of the record to delete. + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status delete(String table, String key) { + + try { + Statement stmt; + + stmt = QueryBuilder.delete().from(table) + .where(QueryBuilder.eq(YCSB_KEY, key)); + stmt.setConsistencyLevel(writeConsistencyLevel); + + if (debug) { + System.out.println(stmt.toString()); + } + + session.execute(stmt); + + return Status.OK; + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Error deleting key: " + key); } + return Status.ERROR; + } + } diff --git a/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient10.java b/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient10.java index 669cf0294da83164f93695f6cff883eb5f2cfe55..9eaf2eeb5ef35867a170358af536d3bc8469d721 100644 --- a/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient10.java +++ b/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient10.java @@ -17,46 +17,58 @@ package com.yahoo.ycsb.db; -import com.yahoo.ycsb.*; +import com.yahoo.ycsb.ByteArrayByteIterator; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.StringByteIterator; +import com.yahoo.ycsb.Utils; + +import org.apache.cassandra.thrift.AuthenticationRequest; +import org.apache.cassandra.thrift.Cassandra; +import org.apache.cassandra.thrift.Column; +import org.apache.cassandra.thrift.ColumnOrSuperColumn; +import org.apache.cassandra.thrift.ColumnParent; +import org.apache.cassandra.thrift.ColumnPath; +import org.apache.cassandra.thrift.ConsistencyLevel; +import org.apache.cassandra.thrift.KeyRange; +import org.apache.cassandra.thrift.KeySlice; +import org.apache.cassandra.thrift.Mutation; +import org.apache.cassandra.thrift.SlicePredicate; +import org.apache.cassandra.thrift.SliceRange; +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.transport.TFramedTransport; +import org.apache.thrift.transport.TSocket; +import org.apache.thrift.transport.TTransport; +import java.nio.ByteBuffer; import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Properties; import java.util.Set; -import java.util.HashMap; -import java.util.HashSet; import java.util.Vector; -import java.util.Random; -import java.util.Properties; -import java.nio.ByteBuffer; - -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TFramedTransport; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.protocol.TProtocol; -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.cassandra.thrift.*; - //XXXX if we do replication, fix the consistency levels /** - * Cassandra 1.0.6 client for YCSB framework + * Cassandra 1.0.6 client for YCSB framework. */ -public class CassandraClient10 extends DB -{ - static Random random = new Random(); - public static final int Ok = 0; - public static final int Error = -1; - public static final ByteBuffer emptyByteBuffer = ByteBuffer.wrap(new byte[0]); - - public int ConnectionRetries; - public int OperationRetries; - public String column_family; - - public static final String CONNECTION_RETRY_PROPERTY = "cassandra.connectionretries"; +public class CassandraClient10 extends DB { + public static final int OK = 0; + public static final int ERROR = -1; + public static final ByteBuffer EMPTY_BYTE_BUFFER = + ByteBuffer.wrap(new byte[0]); + + public static final String CONNECTION_RETRY_PROPERTY = + "cassandra.connectionretries"; public static final String CONNECTION_RETRY_PROPERTY_DEFAULT = "300"; - public static final String OPERATION_RETRY_PROPERTY = "cassandra.operationretries"; + public static final String OPERATION_RETRY_PROPERTY = + "cassandra.operationretries"; public static final String OPERATION_RETRY_PROPERTY_DEFAULT = "300"; public static final String USERNAME_PROPERTY = "cassandra.username"; @@ -64,118 +76,127 @@ public class CassandraClient10 extends DB public static final String COLUMN_FAMILY_PROPERTY = "cassandra.columnfamily"; public static final String COLUMN_FAMILY_PROPERTY_DEFAULT = "data"; - - public static final String READ_CONSISTENCY_LEVEL_PROPERTY = "cassandra.readconsistencylevel"; + + public static final String READ_CONSISTENCY_LEVEL_PROPERTY = + "cassandra.readconsistencylevel"; public static final String READ_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = "ONE"; - public static final String WRITE_CONSISTENCY_LEVEL_PROPERTY = "cassandra.writeconsistencylevel"; + public static final String WRITE_CONSISTENCY_LEVEL_PROPERTY = + "cassandra.writeconsistencylevel"; public static final String WRITE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = "ONE"; - public static final String SCAN_CONSISTENCY_LEVEL_PROPERTY = "cassandra.scanconsistencylevel"; + public static final String SCAN_CONSISTENCY_LEVEL_PROPERTY = + "cassandra.scanconsistencylevel"; public static final String SCAN_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = "ONE"; - public static final String DELETE_CONSISTENCY_LEVEL_PROPERTY = "cassandra.deleteconsistencylevel"; + public static final String DELETE_CONSISTENCY_LEVEL_PROPERTY = + "cassandra.deleteconsistencylevel"; public static final String DELETE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = "ONE"; + private int connectionRetries; + private int operationRetries; + private String columnFamily; - TTransport tr; - Cassandra.Client client; + private TTransport tr; + private Cassandra.Client client; - boolean _debug = false; + private boolean debug = false; - String _table = ""; - Exception errorexception = null; + private String tableName = ""; + private Exception errorexception = null; - List<Mutation> mutations = new ArrayList<Mutation>(); - Map<String, List<Mutation>> mutationMap = new HashMap<String, List<Mutation>>(); - Map<ByteBuffer, Map<String, List<Mutation>>> record = new HashMap<ByteBuffer, Map<String, List<Mutation>>>(); + private List<Mutation> mutations = new ArrayList<Mutation>(); + private Map<String, List<Mutation>> mutationMap = + new HashMap<String, List<Mutation>>(); + private Map<ByteBuffer, Map<String, List<Mutation>>> record = + new HashMap<ByteBuffer, Map<String, List<Mutation>>>(); - ColumnParent parent; - - ConsistencyLevel readConsistencyLevel = ConsistencyLevel.ONE; - ConsistencyLevel writeConsistencyLevel = ConsistencyLevel.ONE; - ConsistencyLevel scanConsistencyLevel = ConsistencyLevel.ONE; - ConsistencyLevel deleteConsistencyLevel = ConsistencyLevel.ONE; + private ColumnParent parent; + private ConsistencyLevel readConsistencyLevel = ConsistencyLevel.ONE; + private ConsistencyLevel writeConsistencyLevel = ConsistencyLevel.ONE; + private ConsistencyLevel scanConsistencyLevel = ConsistencyLevel.ONE; + private ConsistencyLevel deleteConsistencyLevel = ConsistencyLevel.ONE; /** * Initialize any state for this DB. Called once per DB instance; there is one * DB instance per client thread. */ - public void init() throws DBException - { + public void init() throws DBException { String hosts = getProperties().getProperty("hosts"); - if (hosts == null) - { - throw new DBException("Required property \"hosts\" missing for CassandraClient"); + if (hosts == null) { + throw new DBException( + "Required property \"hosts\" missing for CassandraClient"); } - column_family = getProperties().getProperty(COLUMN_FAMILY_PROPERTY, COLUMN_FAMILY_PROPERTY_DEFAULT); - parent = new ColumnParent(column_family); + columnFamily = getProperties().getProperty(COLUMN_FAMILY_PROPERTY, + COLUMN_FAMILY_PROPERTY_DEFAULT); + parent = new ColumnParent(columnFamily); - ConnectionRetries = Integer.parseInt(getProperties().getProperty(CONNECTION_RETRY_PROPERTY, - CONNECTION_RETRY_PROPERTY_DEFAULT)); - OperationRetries = Integer.parseInt(getProperties().getProperty(OPERATION_RETRY_PROPERTY, - OPERATION_RETRY_PROPERTY_DEFAULT)); + connectionRetries = + Integer.parseInt(getProperties().getProperty(CONNECTION_RETRY_PROPERTY, + CONNECTION_RETRY_PROPERTY_DEFAULT)); + operationRetries = + Integer.parseInt(getProperties().getProperty(OPERATION_RETRY_PROPERTY, + OPERATION_RETRY_PROPERTY_DEFAULT)); String username = getProperties().getProperty(USERNAME_PROPERTY); String password = getProperties().getProperty(PASSWORD_PROPERTY); - readConsistencyLevel = ConsistencyLevel.valueOf(getProperties().getProperty(READ_CONSISTENCY_LEVEL_PROPERTY, READ_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); - writeConsistencyLevel = ConsistencyLevel.valueOf(getProperties().getProperty(WRITE_CONSISTENCY_LEVEL_PROPERTY, WRITE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); - scanConsistencyLevel = ConsistencyLevel.valueOf(getProperties().getProperty(SCAN_CONSISTENCY_LEVEL_PROPERTY, SCAN_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); - deleteConsistencyLevel = ConsistencyLevel.valueOf(getProperties().getProperty(DELETE_CONSISTENCY_LEVEL_PROPERTY, DELETE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); - - - _debug = Boolean.parseBoolean(getProperties().getProperty("debug", "false")); + readConsistencyLevel = ConsistencyLevel + .valueOf(getProperties().getProperty(READ_CONSISTENCY_LEVEL_PROPERTY, + READ_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); + writeConsistencyLevel = ConsistencyLevel + .valueOf(getProperties().getProperty(WRITE_CONSISTENCY_LEVEL_PROPERTY, + WRITE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); + scanConsistencyLevel = ConsistencyLevel + .valueOf(getProperties().getProperty(SCAN_CONSISTENCY_LEVEL_PROPERTY, + SCAN_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); + deleteConsistencyLevel = ConsistencyLevel + .valueOf(getProperties().getProperty(DELETE_CONSISTENCY_LEVEL_PROPERTY, + DELETE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); + + debug = Boolean.parseBoolean(getProperties().getProperty("debug", "false")); String[] allhosts = hosts.split(","); - String myhost = allhosts[random.nextInt(allhosts.length)]; + String myhost = allhosts[Utils.random().nextInt(allhosts.length)]; Exception connectexception = null; - for (int retry = 0; retry < ConnectionRetries; retry++) - { - tr = new TFramedTransport(new TSocket(myhost, Integer.parseInt(getProperties().getProperty("port","9160")))); + for (int retry = 0; retry < connectionRetries; retry++) { + tr = new TFramedTransport(new TSocket(myhost, + Integer.parseInt(getProperties().getProperty("port", "9160")))); TProtocol proto = new TBinaryProtocol(tr); client = new Cassandra.Client(proto); - try - { + try { tr.open(); connectexception = null; break; - } catch (Exception e) - { + } catch (Exception e) { connectexception = e; } - try - { + try { Thread.sleep(1000); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } - if (connectexception != null) - { - System.err.println("Unable to connect to " + myhost + " after " + ConnectionRetries - + " tries"); + if (connectexception != null) { + System.err.println("Unable to connect to " + myhost + " after " + + connectionRetries + " tries"); throw new DBException(connectexception); } - if (username != null && password != null) - { - Map<String,String> cred = new HashMap<String,String>(); - cred.put("username", username); - cred.put("password", password); - AuthenticationRequest req = new AuthenticationRequest(cred); - try - { - client.login(req); - } - catch (Exception e) - { - throw new DBException(e); - } + if (username != null && password != null) { + Map<String, String> cred = new HashMap<String, String>(); + cred.put("username", username); + cred.put("password", password); + AuthenticationRequest req = new AuthenticationRequest(cred); + try { + client.login(req); + } catch (Exception e) { + throw new DBException(e); + } } } @@ -183,8 +204,7 @@ public class CassandraClient10 extends DB * Cleanup any state for this DB. Called once per DB instance; there is one DB * instance per client thread. */ - public void cleanup() throws DBException - { + public void cleanup() throws DBException { tr.close(); } @@ -202,89 +222,85 @@ public class CassandraClient10 extends DB * A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ - public int read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) - { - if (!_table.equals(table)) { - try - { + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - for (int i = 0; i < OperationRetries; i++) - { + for (int i = 0; i < operationRetries; i++) { - try - { + try { SlicePredicate predicate; - if (fields == null) - { - predicate = new SlicePredicate().setSlice_range(new SliceRange(emptyByteBuffer, emptyByteBuffer, false, 1000000)); + if (fields == null) { + predicate = new SlicePredicate().setSlice_range(new SliceRange( + EMPTY_BYTE_BUFFER, EMPTY_BYTE_BUFFER, false, 1000000)); } else { - ArrayList<ByteBuffer> fieldlist = new ArrayList<ByteBuffer>(fields.size()); - for (String s : fields) - { + ArrayList<ByteBuffer> fieldlist = + new ArrayList<ByteBuffer>(fields.size()); + for (String s : fields) { fieldlist.add(ByteBuffer.wrap(s.getBytes("UTF-8"))); } predicate = new SlicePredicate().setColumn_names(fieldlist); } - List<ColumnOrSuperColumn> results = client.get_slice(ByteBuffer.wrap(key.getBytes("UTF-8")), parent, predicate, readConsistencyLevel); + List<ColumnOrSuperColumn> results = + client.get_slice(ByteBuffer.wrap(key.getBytes("UTF-8")), parent, + predicate, readConsistencyLevel); - if (_debug) - { + if (debug) { System.out.print("Reading key: " + key); } Column column; String name; ByteIterator value; - for (ColumnOrSuperColumn oneresult : results) - { + for (ColumnOrSuperColumn oneresult : results) { column = oneresult.column; - name = new String(column.name.array(), column.name.position()+column.name.arrayOffset(), column.name.remaining()); - value = new ByteArrayByteIterator(column.value.array(), column.value.position()+column.value.arrayOffset(), column.value.remaining()); + name = new String(column.name.array(), + column.name.position() + column.name.arrayOffset(), + column.name.remaining()); + value = new ByteArrayByteIterator(column.value.array(), + column.value.position() + column.value.arrayOffset(), + column.value.remaining()); - result.put(name,value); + result.put(name, value); - if (_debug) - { + if (debug) { System.out.print("(" + name + "=" + value + ")"); } } - if (_debug) - { + if (debug) { System.out.println(); - System.out.println("ConsistencyLevel=" + readConsistencyLevel.toString()); + System.out + .println("ConsistencyLevel=" + readConsistencyLevel.toString()); } - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } @@ -305,97 +321,91 @@ public class CassandraClient10 extends DB * pairs for one record * @return Zero on success, a non-zero error code on error */ - public int scan(String table, String startkey, int recordcount, Set<String> fields, - Vector<HashMap<String, ByteIterator>> result) - { - if (!_table.equals(table)) { - try - { + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - for (int i = 0; i < OperationRetries; i++) - { + for (int i = 0; i < operationRetries; i++) { - try - { + try { SlicePredicate predicate; - if (fields == null) - { - predicate = new SlicePredicate().setSlice_range(new SliceRange(emptyByteBuffer, emptyByteBuffer, false, 1000000)); + if (fields == null) { + predicate = new SlicePredicate().setSlice_range(new SliceRange( + EMPTY_BYTE_BUFFER, EMPTY_BYTE_BUFFER, false, 1000000)); } else { - ArrayList<ByteBuffer> fieldlist = new ArrayList<ByteBuffer>(fields.size()); - for (String s : fields) - { - fieldlist.add(ByteBuffer.wrap(s.getBytes("UTF-8"))); + ArrayList<ByteBuffer> fieldlist = + new ArrayList<ByteBuffer>(fields.size()); + for (String s : fields) { + fieldlist.add(ByteBuffer.wrap(s.getBytes("UTF-8"))); } predicate = new SlicePredicate().setColumn_names(fieldlist); } - KeyRange kr = new KeyRange().setStart_key(startkey.getBytes("UTF-8")).setEnd_key(new byte[] {}).setCount(recordcount); + KeyRange kr = new KeyRange().setStart_key(startkey.getBytes("UTF-8")) + .setEnd_key(new byte[] {}).setCount(recordcount); - List<KeySlice> results = client.get_range_slices(parent, predicate, kr, scanConsistencyLevel); + List<KeySlice> results = client.get_range_slices(parent, predicate, kr, + scanConsistencyLevel); - if (_debug) - { + if (debug) { System.out.println("Scanning startkey: " + startkey); } HashMap<String, ByteIterator> tuple; - for (KeySlice oneresult : results) - { + for (KeySlice oneresult : results) { tuple = new HashMap<String, ByteIterator>(); Column column; String name; ByteIterator value; - for (ColumnOrSuperColumn onecol : oneresult.columns) - { - column = onecol.column; - name = new String(column.name.array(), column.name.position()+column.name.arrayOffset(), column.name.remaining()); - value = new ByteArrayByteIterator(column.value.array(), column.value.position()+column.value.arrayOffset(), column.value.remaining()); - - tuple.put(name, value); - - if (_debug) - { + for (ColumnOrSuperColumn onecol : oneresult.columns) { + column = onecol.column; + name = new String(column.name.array(), + column.name.position() + column.name.arrayOffset(), + column.name.remaining()); + value = new ByteArrayByteIterator(column.value.array(), + column.value.position() + column.value.arrayOffset(), + column.value.remaining()); + + tuple.put(name, value); + + if (debug) { System.out.print("(" + name + "=" + value + ")"); } } result.add(tuple); - if (_debug) - { + if (debug) { System.out.println(); - System.out.println("ConsistencyLevel=" + scanConsistencyLevel.toString()); + System.out + .println("ConsistencyLevel=" + scanConsistencyLevel.toString()); } } - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } /** @@ -411,8 +421,8 @@ public class CassandraClient10 extends DB * A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ - public int update(String table, String key, HashMap<String, ByteIterator> values) - { + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { return insert(table, key, values); } @@ -429,37 +439,30 @@ public class CassandraClient10 extends DB * A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ - public int insert(String table, String key, HashMap<String, ByteIterator> values) - { - if (!_table.equals(table)) { - try - { + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - for (int i = 0; i < OperationRetries; i++) - { - if (_debug) - { + for (int i = 0; i < operationRetries; i++) { + if (debug) { System.out.println("Inserting key: " + key); } - try - { + try { ByteBuffer wrappedKey = ByteBuffer.wrap(key.getBytes("UTF-8")); Column col; ColumnOrSuperColumn column; - for (Map.Entry<String, ByteIterator> entry : values.entrySet()) - { + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { col = new Column(); col.setName(ByteBuffer.wrap(entry.getKey().getBytes("UTF-8"))); col.setValue(ByteBuffer.wrap(entry.getValue().toArray())); @@ -471,7 +474,7 @@ public class CassandraClient10 extends DB mutations.add(new Mutation().setColumn_or_supercolumn(column)); } - mutationMap.put(column_family, mutations); + mutationMap.put(columnFamily, mutations); record.put(wrappedKey, mutationMap); client.batch_mutate(record, writeConsistencyLevel); @@ -479,28 +482,26 @@ public class CassandraClient10 extends DB mutations.clear(); mutationMap.clear(); record.clear(); - - if (_debug) - { - System.out.println("ConsistencyLevel=" + writeConsistencyLevel.toString()); + + if (debug) { + System.out + .println("ConsistencyLevel=" + writeConsistencyLevel.toString()); } - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } /** @@ -512,56 +513,46 @@ public class CassandraClient10 extends DB * The record key of the record to delete. * @return Zero on success, a non-zero error code on error */ - public int delete(String table, String key) - { - if (!_table.equals(table)) { - try - { + public Status delete(String table, String key) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - for (int i = 0; i < OperationRetries; i++) - { - try - { + for (int i = 0; i < operationRetries; i++) { + try { client.remove(ByteBuffer.wrap(key.getBytes("UTF-8")), - new ColumnPath(column_family), - System.currentTimeMillis(), - deleteConsistencyLevel); + new ColumnPath(columnFamily), System.currentTimeMillis(), + deleteConsistencyLevel); - if (_debug) - { + if (debug) { System.out.println("Delete key: " + key); - System.out.println("ConsistencyLevel=" + deleteConsistencyLevel.toString()); + System.out + .println("ConsistencyLevel=" + deleteConsistencyLevel.toString()); } - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } - public static void main(String[] args) - { + public static void main(String[] args) { CassandraClient10 cli = new CassandraClient10(); Properties props = new Properties(); @@ -569,11 +560,9 @@ public class CassandraClient10 extends DB props.setProperty("hosts", args[0]); cli.setProperties(props); - try - { + try { cli.init(); - } catch (Exception e) - { + } catch (Exception e) { e.printStackTrace(); System.exit(0); } @@ -582,7 +571,7 @@ public class CassandraClient10 extends DB vals.put("age", new StringByteIterator("57")); vals.put("middlename", new StringByteIterator("bradley")); vals.put("favoritecolor", new StringByteIterator("blue")); - int res = cli.insert("usertable", "BrianFrankCooper", vals); + Status res = cli.insert("usertable", "BrianFrankCooper", vals); System.out.println("Result of insert: " + res); HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); @@ -592,59 +581,11 @@ public class CassandraClient10 extends DB fields.add("favoritecolor"); res = cli.read("usertable", "BrianFrankCooper", null, result); System.out.println("Result of read: " + res); - for (String s : result.keySet()) - { - System.out.println("[" + s + "]=[" + result.get(s) + "]"); + for (Map.Entry<String, ByteIterator> entry : result.entrySet()) { + System.out.println("[" + entry.getKey() + "]=[" + entry.getValue() + "]"); } res = cli.delete("usertable", "BrianFrankCooper"); System.out.println("Result of delete: " + res); } - - /* - * public static void main(String[] args) throws TException, - * InvalidRequestException, UnavailableException, - * UnsupportedEncodingException, NotFoundException { - * - * - * - * String key_user_id = "1"; - * - * - * - * - * client.insert("Keyspace1", key_user_id, new ColumnPath("Standard1", null, - * "age".getBytes("UTF-8")), "24".getBytes("UTF-8"), timestamp, - * ConsistencyLevel.ONE); - * - * - * // read single column ColumnPath path = new ColumnPath("Standard1", null, - * "name".getBytes("UTF-8")); - * - * System.out.println(client.get("Keyspace1", key_user_id, path, - * ConsistencyLevel.ONE)); - * - * - * // read entire row SlicePredicate predicate = new SlicePredicate(null, new - * SliceRange(new byte[0], new byte[0], false, 10)); - * - * ColumnParent parent = new ColumnParent("Standard1", null); - * - * List<ColumnOrSuperColumn> results = client.get_slice("Keyspace1", - * key_user_id, parent, predicate, ConsistencyLevel.ONE); - * - * for (ColumnOrSuperColumn result : results) { - * - * Column column = result.column; - * - * System.out.println(new String(column.name, "UTF-8") + " -> " + new - * String(column.value, "UTF-8")); - * - * } - * - * - * - * - * } - */ } diff --git a/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient7.java b/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient7.java index e60bc2986abbf46688ae711259e5238d488b82dd..8f63554953f0574d5f7f8f9c467e0dd847155994 100644 --- a/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient7.java +++ b/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient7.java @@ -17,46 +17,56 @@ package com.yahoo.ycsb.db; -import com.yahoo.ycsb.*; +import com.yahoo.ycsb.ByteArrayByteIterator; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.StringByteIterator; +import com.yahoo.ycsb.Utils; + +import org.apache.cassandra.thrift.AuthenticationRequest; +import org.apache.cassandra.thrift.Cassandra; +import org.apache.cassandra.thrift.Column; +import org.apache.cassandra.thrift.ColumnOrSuperColumn; +import org.apache.cassandra.thrift.ColumnParent; +import org.apache.cassandra.thrift.ColumnPath; +import org.apache.cassandra.thrift.ConsistencyLevel; +import org.apache.cassandra.thrift.KeyRange; +import org.apache.cassandra.thrift.KeySlice; +import org.apache.cassandra.thrift.Mutation; +import org.apache.cassandra.thrift.SlicePredicate; +import org.apache.cassandra.thrift.SliceRange; +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.transport.TFramedTransport; +import org.apache.thrift.transport.TSocket; +import org.apache.thrift.transport.TTransport; +import java.nio.ByteBuffer; import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Properties; import java.util.Set; -import java.util.HashMap; -import java.util.HashSet; import java.util.Vector; -import java.util.Random; -import java.util.Properties; -import java.nio.ByteBuffer; - -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TFramedTransport; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.protocol.TProtocol; -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.cassandra.thrift.*; - //XXXX if we do replication, fix the consistency levels /** - * Cassandra 0.7 client for YCSB framework + * Cassandra 0.7 client for YCSB framework. */ -public class CassandraClient7 extends DB -{ - static Random random = new Random(); - public static final int Ok = 0; - public static final int Error = -1; - public static final ByteBuffer emptyByteBuffer = ByteBuffer.wrap(new byte[0]); - - public int ConnectionRetries; - public int OperationRetries; - public String column_family; - - public static final String CONNECTION_RETRY_PROPERTY = "cassandra.connectionretries"; +public class CassandraClient7 extends DB { + public static final ByteBuffer EMPTY_BYTE_BUFFER = + ByteBuffer.wrap(new byte[0]); + + public static final String CONNECTION_RETRY_PROPERTY = + "cassandra.connectionretries"; public static final String CONNECTION_RETRY_PROPERTY_DEFAULT = "300"; - public static final String OPERATION_RETRY_PROPERTY = "cassandra.operationretries"; + public static final String OPERATION_RETRY_PROPERTY = + "cassandra.operationretries"; public static final String OPERATION_RETRY_PROPERTY_DEFAULT = "300"; public static final String USERNAME_PROPERTY = "cassandra.username"; @@ -65,94 +75,93 @@ public class CassandraClient7 extends DB public static final String COLUMN_FAMILY_PROPERTY = "cassandra.columnfamily"; public static final String COLUMN_FAMILY_PROPERTY_DEFAULT = "data"; - TTransport tr; - Cassandra.Client client; + private int connectionRetries; + private int operationRetries; + private String columnFamily; + + private TTransport tr; + private Cassandra.Client client; + + private boolean debug = false; - boolean _debug = false; - - String _table = ""; - Exception errorexception = null; - - List<Mutation> mutations = new ArrayList<Mutation>(); - Map<String, List<Mutation>> mutationMap = new HashMap<String, List<Mutation>>(); - Map<ByteBuffer, Map<String, List<Mutation>>> record = new HashMap<ByteBuffer, Map<String, List<Mutation>>>(); - - ColumnParent parent; + private String tableName = ""; + private Exception errorexception = null; + + private List<Mutation> mutations = new ArrayList<Mutation>(); + private Map<String, List<Mutation>> mutationMap = + new HashMap<String, List<Mutation>>(); + private Map<ByteBuffer, Map<String, List<Mutation>>> record = + new HashMap<ByteBuffer, Map<String, List<Mutation>>>(); + + private ColumnParent parent; /** * Initialize any state for this DB. Called once per DB instance; there is one * DB instance per client thread. */ - public void init() throws DBException - { + public void init() throws DBException { String hosts = getProperties().getProperty("hosts"); - if (hosts == null) - { - throw new DBException("Required property \"hosts\" missing for CassandraClient"); + if (hosts == null) { + throw new DBException( + "Required property \"hosts\" missing for CassandraClient"); } - column_family = getProperties().getProperty(COLUMN_FAMILY_PROPERTY, COLUMN_FAMILY_PROPERTY_DEFAULT); - parent = new ColumnParent(column_family); + columnFamily = getProperties().getProperty(COLUMN_FAMILY_PROPERTY, + COLUMN_FAMILY_PROPERTY_DEFAULT); + parent = new ColumnParent(columnFamily); - ConnectionRetries = Integer.parseInt(getProperties().getProperty(CONNECTION_RETRY_PROPERTY, - CONNECTION_RETRY_PROPERTY_DEFAULT)); - OperationRetries = Integer.parseInt(getProperties().getProperty(OPERATION_RETRY_PROPERTY, - OPERATION_RETRY_PROPERTY_DEFAULT)); + connectionRetries = + Integer.parseInt(getProperties().getProperty(CONNECTION_RETRY_PROPERTY, + CONNECTION_RETRY_PROPERTY_DEFAULT)); + operationRetries = + Integer.parseInt(getProperties().getProperty(OPERATION_RETRY_PROPERTY, + OPERATION_RETRY_PROPERTY_DEFAULT)); String username = getProperties().getProperty(USERNAME_PROPERTY); String password = getProperties().getProperty(PASSWORD_PROPERTY); - _debug = Boolean.parseBoolean(getProperties().getProperty("debug", "false")); + debug = Boolean.parseBoolean(getProperties().getProperty("debug", "false")); String[] allhosts = hosts.split(","); - String myhost = allhosts[random.nextInt(allhosts.length)]; + String myhost = allhosts[Utils.random().nextInt(allhosts.length)]; Exception connectexception = null; - for (int retry = 0; retry < ConnectionRetries; retry++) - { + for (int retry = 0; retry < connectionRetries; retry++) { tr = new TFramedTransport(new TSocket(myhost, 9160)); TProtocol proto = new TBinaryProtocol(tr); client = new Cassandra.Client(proto); - try - { + try { tr.open(); connectexception = null; break; - } catch (Exception e) - { + } catch (Exception e) { connectexception = e; } - try - { + try { Thread.sleep(1000); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } - if (connectexception != null) - { - System.err.println("Unable to connect to " + myhost + " after " + ConnectionRetries - + " tries"); - System.out.println("Unable to connect to " + myhost + " after " + ConnectionRetries - + " tries"); + if (connectexception != null) { + System.err.println("Unable to connect to " + myhost + " after " + + connectionRetries + " tries"); + System.out.println("Unable to connect to " + myhost + " after " + + connectionRetries + " tries"); throw new DBException(connectexception); } - if (username != null && password != null) - { - Map<String,String> cred = new HashMap<String,String>(); - cred.put("username", username); - cred.put("password", password); - AuthenticationRequest req = new AuthenticationRequest(cred); - try - { - client.login(req); - } - catch (Exception e) - { - throw new DBException(e); - } + if (username != null && password != null) { + Map<String, String> cred = new HashMap<String, String>(); + cred.put("username", username); + cred.put("password", password); + AuthenticationRequest req = new AuthenticationRequest(cred); + try { + client.login(req); + } catch (Exception e) { + throw new DBException(e); + } } } @@ -160,8 +169,7 @@ public class CassandraClient7 extends DB * Cleanup any state for this DB. Called once per DB instance; there is one DB * instance per client thread. */ - public void cleanup() throws DBException - { + public void cleanup() throws DBException { tr.close(); } @@ -179,88 +187,85 @@ public class CassandraClient7 extends DB * A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ - public int read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) - { - if (!_table.equals(table)) { - try - { + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - for (int i = 0; i < OperationRetries; i++) - { + for (int i = 0; i < operationRetries; i++) { - try - { + try { SlicePredicate predicate; - if (fields == null) - { - predicate = new SlicePredicate().setSlice_range(new SliceRange(emptyByteBuffer, emptyByteBuffer, false, 1000000)); - + if (fields == null) { + SliceRange range = new SliceRange(EMPTY_BYTE_BUFFER, + EMPTY_BYTE_BUFFER, false, 1000000); + + predicate = new SlicePredicate().setSlice_range(range); + } else { - ArrayList<ByteBuffer> fieldlist = new ArrayList<ByteBuffer>(fields.size()); - for (String s : fields) - { + ArrayList<ByteBuffer> fieldlist = + new ArrayList<ByteBuffer>(fields.size()); + for (String s : fields) { fieldlist.add(ByteBuffer.wrap(s.getBytes("UTF-8"))); } predicate = new SlicePredicate().setColumn_names(fieldlist); } - List<ColumnOrSuperColumn> results = client.get_slice(ByteBuffer.wrap(key.getBytes("UTF-8")), parent, predicate, ConsistencyLevel.ONE); + List<ColumnOrSuperColumn> results = + client.get_slice(ByteBuffer.wrap(key.getBytes("UTF-8")), parent, + predicate, ConsistencyLevel.ONE); - if (_debug) - { + if (debug) { System.out.print("Reading key: " + key); } Column column; String name; ByteIterator value; - for (ColumnOrSuperColumn oneresult : results) - { + for (ColumnOrSuperColumn oneresult : results) { column = oneresult.column; - name = new String(column.name.array(), column.name.position()+column.name.arrayOffset(), column.name.remaining()); - value = new ByteArrayByteIterator(column.value.array(), column.value.position()+column.value.arrayOffset(), column.value.remaining()); + name = new String(column.name.array(), + column.name.position() + column.name.arrayOffset(), + column.name.remaining()); + value = new ByteArrayByteIterator(column.value.array(), + column.value.position() + column.value.arrayOffset(), + column.value.remaining()); - result.put(name,value); + result.put(name, value); - if (_debug) - { + if (debug) { System.out.print("(" + name + "=" + value + ")"); } } - if (_debug) - { + if (debug) { System.out.println(); } - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } @@ -281,96 +286,91 @@ public class CassandraClient7 extends DB * pairs for one record * @return Zero on success, a non-zero error code on error */ - public int scan(String table, String startkey, int recordcount, Set<String> fields, - Vector<HashMap<String, ByteIterator>> result) - { - if (!_table.equals(table)) { - try - { + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - - for (int i = 0; i < OperationRetries; i++) - { - try - { + for (int i = 0; i < operationRetries; i++) { + + try { SlicePredicate predicate; - if (fields == null) - { - predicate = new SlicePredicate().setSlice_range(new SliceRange(emptyByteBuffer, emptyByteBuffer, false, 1000000)); - + if (fields == null) { + SliceRange range = new SliceRange(EMPTY_BYTE_BUFFER, + EMPTY_BYTE_BUFFER, false, 1000000); + + predicate = new SlicePredicate().setSlice_range(range); + } else { - ArrayList<ByteBuffer> fieldlist = new ArrayList<ByteBuffer>(fields.size()); - for (String s : fields) - { - fieldlist.add(ByteBuffer.wrap(s.getBytes("UTF-8"))); + ArrayList<ByteBuffer> fieldlist = + new ArrayList<ByteBuffer>(fields.size()); + for (String s : fields) { + fieldlist.add(ByteBuffer.wrap(s.getBytes("UTF-8"))); } - + predicate = new SlicePredicate().setColumn_names(fieldlist); } - - KeyRange kr = new KeyRange().setStart_key(startkey.getBytes("UTF-8")).setEnd_key(new byte[] {}).setCount(recordcount); - List<KeySlice> results = client.get_range_slices(parent, predicate, kr, ConsistencyLevel.ONE); + KeyRange kr = new KeyRange().setStart_key(startkey.getBytes("UTF-8")) + .setEnd_key(new byte[] {}).setCount(recordcount); + + List<KeySlice> results = client.get_range_slices(parent, predicate, kr, + ConsistencyLevel.ONE); - if (_debug) - { + if (debug) { System.out.println("Scanning startkey: " + startkey); } HashMap<String, ByteIterator> tuple; - for (KeySlice oneresult : results) - { + for (KeySlice oneresult : results) { tuple = new HashMap<String, ByteIterator>(); - + Column column; String name; ByteIterator value; - for (ColumnOrSuperColumn onecol : oneresult.columns) - { - column = onecol.column; - name = new String(column.name.array(), column.name.position()+column.name.arrayOffset(), column.name.remaining()); - value = new ByteArrayByteIterator(column.value.array(), column.value.position()+column.value.arrayOffset(), column.value.remaining()); - - tuple.put(name, value); - - if (_debug) - { + for (ColumnOrSuperColumn onecol : oneresult.columns) { + column = onecol.column; + name = new String(column.name.array(), + column.name.position() + column.name.arrayOffset(), + column.name.remaining()); + value = new ByteArrayByteIterator(column.value.array(), + column.value.position() + column.value.arrayOffset(), + column.value.remaining()); + + tuple.put(name, value); + + if (debug) { System.out.print("(" + name + "=" + value + ")"); } } result.add(tuple); - if (_debug) - { + if (debug) { System.out.println(); } } - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } /** @@ -386,8 +386,8 @@ public class CassandraClient7 extends DB * A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ - public int update(String table, String key, HashMap<String, ByteIterator> values) - { + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { return insert(table, key, values); } @@ -404,37 +404,30 @@ public class CassandraClient7 extends DB * A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ - public int insert(String table, String key, HashMap<String, ByteIterator> values) - { - if (!_table.equals(table)) { - try - { + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - - for (int i = 0; i < OperationRetries; i++) - { - if (_debug) - { + + for (int i = 0; i < operationRetries; i++) { + if (debug) { System.out.println("Inserting key: " + key); } - - try - { + + try { ByteBuffer wrappedKey = ByteBuffer.wrap(key.getBytes("UTF-8")); Column col; ColumnOrSuperColumn column; - for (Map.Entry<String, ByteIterator> entry : values.entrySet()) - { + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { col = new Column(); col.setName(ByteBuffer.wrap(entry.getKey().getBytes("UTF-8"))); col.setValue(ByteBuffer.wrap(entry.getValue().toArray())); @@ -442,35 +435,33 @@ public class CassandraClient7 extends DB column = new ColumnOrSuperColumn(); column.setColumn(col); - + mutations.add(new Mutation().setColumn_or_supercolumn(column)); } - - mutationMap.put(column_family, mutations); + + mutationMap.put(columnFamily, mutations); record.put(wrappedKey, mutationMap); client.batch_mutate(record, ConsistencyLevel.ONE); - + mutations.clear(); mutationMap.clear(); record.clear(); - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } /** @@ -482,55 +473,44 @@ public class CassandraClient7 extends DB * The record key of the record to delete. * @return Zero on success, a non-zero error code on error */ - public int delete(String table, String key) - { - if (!_table.equals(table)) { - try - { + public Status delete(String table, String key) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - for (int i = 0; i < OperationRetries; i++) - { - try - { - client.remove(ByteBuffer.wrap(key.getBytes("UTF-8")), - new ColumnPath(column_family), - System.currentTimeMillis(), - ConsistencyLevel.ONE); - - if (_debug) - { + for (int i = 0; i < operationRetries; i++) { + try { + client.remove(ByteBuffer.wrap(key.getBytes("UTF-8")), + new ColumnPath(columnFamily), System.currentTimeMillis(), + ConsistencyLevel.ONE); + + if (debug) { System.out.println("Delete key: " + key); } - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } - public static void main(String[] args) - { + public static void main(String[] args) { CassandraClient7 cli = new CassandraClient7(); Properties props = new Properties(); @@ -538,11 +518,9 @@ public class CassandraClient7 extends DB props.setProperty("hosts", args[0]); cli.setProperties(props); - try - { + try { cli.init(); - } catch (Exception e) - { + } catch (Exception e) { e.printStackTrace(); System.exit(0); } @@ -551,8 +529,8 @@ public class CassandraClient7 extends DB vals.put("age", new StringByteIterator("57")); vals.put("middlename", new StringByteIterator("bradley")); vals.put("favoritecolor", new StringByteIterator("blue")); - int res = cli.insert("usertable", "BrianFrankCooper", vals); - System.out.println("Result of insert: " + res); + Status res = cli.insert("usertable", "BrianFrankCooper", vals); + System.out.println("Result of insert: " + res.getName()); HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); HashSet<String> fields = new HashSet<String>(); @@ -560,60 +538,12 @@ public class CassandraClient7 extends DB fields.add("age"); fields.add("favoritecolor"); res = cli.read("usertable", "BrianFrankCooper", null, result); - System.out.println("Result of read: " + res); - for (String s : result.keySet()) - { - System.out.println("[" + s + "]=[" + result.get(s) + "]"); + System.out.println("Result of read: " + res.getName()); + for (Map.Entry<String, ByteIterator> entry : result.entrySet()) { + System.out.println("[" + entry.getKey() + "]=[" + entry.getValue() + "]"); } res = cli.delete("usertable", "BrianFrankCooper"); - System.out.println("Result of delete: " + res); + System.out.println("Result of delete: " + res.getName()); } - - /* - * public static void main(String[] args) throws TException, - * InvalidRequestException, UnavailableException, - * UnsupportedEncodingException, NotFoundException { - * - * - * - * String key_user_id = "1"; - * - * - * - * - * client.insert("Keyspace1", key_user_id, new ColumnPath("Standard1", null, - * "age".getBytes("UTF-8")), "24".getBytes("UTF-8"), timestamp, - * ConsistencyLevel.ONE); - * - * - * // read single column ColumnPath path = new ColumnPath("Standard1", null, - * "name".getBytes("UTF-8")); - * - * System.out.println(client.get("Keyspace1", key_user_id, path, - * ConsistencyLevel.ONE)); - * - * - * // read entire row SlicePredicate predicate = new SlicePredicate(null, new - * SliceRange(new byte[0], new byte[0], false, 10)); - * - * ColumnParent parent = new ColumnParent("Standard1", null); - * - * List<ColumnOrSuperColumn> results = client.get_slice("Keyspace1", - * key_user_id, parent, predicate, ConsistencyLevel.ONE); - * - * for (ColumnOrSuperColumn result : results) { - * - * Column column = result.column; - * - * System.out.println(new String(column.name, "UTF-8") + " -> " + new - * String(column.value, "UTF-8")); - * - * } - * - * - * - * - * } - */ } diff --git a/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient8.java b/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient8.java index ec8abf3234eea3aec767789ba09b0275e0a6bdf5..ca6b0cf79bfce1a21771780c9435740b1295e924 100644 --- a/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient8.java +++ b/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient8.java @@ -26,7 +26,6 @@ import java.util.Set; import java.util.HashMap; import java.util.HashSet; import java.util.Vector; -import java.util.Random; import java.util.Properties; import java.nio.ByteBuffer; @@ -37,26 +36,20 @@ import org.apache.thrift.protocol.TProtocol; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.cassandra.thrift.*; - //XXXX if we do replication, fix the consistency levels /** - * Cassandra 0.8 client for YCSB framework + * Cassandra 0.8 client for YCSB framework. */ -public class CassandraClient8 extends DB -{ - static Random random = new Random(); - public static final int Ok = 0; - public static final int Error = -1; - public static final ByteBuffer emptyByteBuffer = ByteBuffer.wrap(new byte[0]); - - public int ConnectionRetries; - public int OperationRetries; - public String column_family; - - public static final String CONNECTION_RETRY_PROPERTY = "cassandra.connectionretries"; +public class CassandraClient8 extends DB { + public static final ByteBuffer EMPTY_BYTE_BUFFER = + ByteBuffer.wrap(new byte[0]); + + public static final String CONNECTION_RETRY_PROPERTY = + "cassandra.connectionretries"; public static final String CONNECTION_RETRY_PROPERTY_DEFAULT = "300"; - public static final String OPERATION_RETRY_PROPERTY = "cassandra.operationretries"; + public static final String OPERATION_RETRY_PROPERTY = + "cassandra.operationretries"; public static final String OPERATION_RETRY_PROPERTY_DEFAULT = "300"; public static final String USERNAME_PROPERTY = "cassandra.username"; @@ -65,94 +58,93 @@ public class CassandraClient8 extends DB public static final String COLUMN_FAMILY_PROPERTY = "cassandra.columnfamily"; public static final String COLUMN_FAMILY_PROPERTY_DEFAULT = "data"; - TTransport tr; - Cassandra.Client client; + private int connectionRetries; + private int operationRetries; + private String columnFamily; + + private TTransport tr; + private Cassandra.Client client; + + private boolean debug = false; - boolean _debug = false; - - String _table = ""; - Exception errorexception = null; - - List<Mutation> mutations = new ArrayList<Mutation>(); - Map<String, List<Mutation>> mutationMap = new HashMap<String, List<Mutation>>(); - Map<ByteBuffer, Map<String, List<Mutation>>> record = new HashMap<ByteBuffer, Map<String, List<Mutation>>>(); - - ColumnParent parent; + private String tableName = ""; + private Exception errorexception = null; + + private List<Mutation> mutations = new ArrayList<Mutation>(); + private Map<String, List<Mutation>> mutationMap = + new HashMap<String, List<Mutation>>(); + private Map<ByteBuffer, Map<String, List<Mutation>>> record = + new HashMap<ByteBuffer, Map<String, List<Mutation>>>(); + + private ColumnParent parent; /** * Initialize any state for this DB. Called once per DB instance; there is one * DB instance per client thread. */ - public void init() throws DBException - { + public void init() throws DBException { String hosts = getProperties().getProperty("hosts"); - if (hosts == null) - { - throw new DBException("Required property \"hosts\" missing for CassandraClient"); + if (hosts == null) { + throw new DBException( + "Required property \"hosts\" missing for CassandraClient"); } - column_family = getProperties().getProperty(COLUMN_FAMILY_PROPERTY, COLUMN_FAMILY_PROPERTY_DEFAULT); - parent = new ColumnParent(column_family); + columnFamily = getProperties().getProperty(COLUMN_FAMILY_PROPERTY, + COLUMN_FAMILY_PROPERTY_DEFAULT); + parent = new ColumnParent(columnFamily); - ConnectionRetries = Integer.parseInt(getProperties().getProperty(CONNECTION_RETRY_PROPERTY, - CONNECTION_RETRY_PROPERTY_DEFAULT)); - OperationRetries = Integer.parseInt(getProperties().getProperty(OPERATION_RETRY_PROPERTY, - OPERATION_RETRY_PROPERTY_DEFAULT)); + connectionRetries = + Integer.parseInt(getProperties().getProperty(CONNECTION_RETRY_PROPERTY, + CONNECTION_RETRY_PROPERTY_DEFAULT)); + operationRetries = + Integer.parseInt(getProperties().getProperty(OPERATION_RETRY_PROPERTY, + OPERATION_RETRY_PROPERTY_DEFAULT)); String username = getProperties().getProperty(USERNAME_PROPERTY); String password = getProperties().getProperty(PASSWORD_PROPERTY); - _debug = Boolean.parseBoolean(getProperties().getProperty("debug", "false")); + debug = Boolean.parseBoolean(getProperties().getProperty("debug", "false")); String[] allhosts = hosts.split(","); - String myhost = allhosts[random.nextInt(allhosts.length)]; + String myhost = allhosts[Utils.random().nextInt(allhosts.length)]; Exception connectexception = null; - for (int retry = 0; retry < ConnectionRetries; retry++) - { + for (int retry = 0; retry < connectionRetries; retry++) { tr = new TFramedTransport(new TSocket(myhost, 9160)); TProtocol proto = new TBinaryProtocol(tr); client = new Cassandra.Client(proto); - try - { + try { tr.open(); connectexception = null; break; - } catch (Exception e) - { + } catch (Exception e) { connectexception = e; } - try - { + try { Thread.sleep(1000); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } - if (connectexception != null) - { - System.err.println("Unable to connect to " + myhost + " after " + ConnectionRetries - + " tries"); - System.out.println("Unable to connect to " + myhost + " after " + ConnectionRetries - + " tries"); + if (connectexception != null) { + System.err.println("Unable to connect to " + myhost + " after " + + connectionRetries + " tries"); + System.out.println("Unable to connect to " + myhost + " after " + + connectionRetries + " tries"); throw new DBException(connectexception); } - if (username != null && password != null) - { - Map<String,String> cred = new HashMap<String,String>(); - cred.put("username", username); - cred.put("password", password); - AuthenticationRequest req = new AuthenticationRequest(cred); - try - { - client.login(req); - } - catch (Exception e) - { - throw new DBException(e); - } + if (username != null && password != null) { + Map<String, String> cred = new HashMap<String, String>(); + cred.put("username", username); + cred.put("password", password); + AuthenticationRequest req = new AuthenticationRequest(cred); + try { + client.login(req); + } catch (Exception e) { + throw new DBException(e); + } } } @@ -160,8 +152,7 @@ public class CassandraClient8 extends DB * Cleanup any state for this DB. Called once per DB instance; there is one DB * instance per client thread. */ - public void cleanup() throws DBException - { + public void cleanup() throws DBException { tr.close(); } @@ -179,88 +170,83 @@ public class CassandraClient8 extends DB * A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ - public int read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) - { - if (!_table.equals(table)) { - try - { + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - for (int i = 0; i < OperationRetries; i++) - { + for (int i = 0; i < operationRetries; i++) { - try - { + try { SlicePredicate predicate; - if (fields == null) - { - predicate = new SlicePredicate().setSlice_range(new SliceRange(emptyByteBuffer, emptyByteBuffer, false, 1000000)); - + if (fields == null) { + predicate = new SlicePredicate().setSlice_range(new SliceRange( + EMPTY_BYTE_BUFFER, EMPTY_BYTE_BUFFER, false, 1000000)); + } else { - ArrayList<ByteBuffer> fieldlist = new ArrayList<ByteBuffer>(fields.size()); - for (String s : fields) - { + ArrayList<ByteBuffer> fieldlist = + new ArrayList<ByteBuffer>(fields.size()); + for (String s : fields) { fieldlist.add(ByteBuffer.wrap(s.getBytes("UTF-8"))); } predicate = new SlicePredicate().setColumn_names(fieldlist); } - List<ColumnOrSuperColumn> results = client.get_slice(ByteBuffer.wrap(key.getBytes("UTF-8")), parent, predicate, ConsistencyLevel.ONE); + List<ColumnOrSuperColumn> results = + client.get_slice(ByteBuffer.wrap(key.getBytes("UTF-8")), parent, + predicate, ConsistencyLevel.ONE); - if (_debug) - { + if (debug) { System.out.print("Reading key: " + key); } Column column; String name; ByteIterator value; - for (ColumnOrSuperColumn oneresult : results) - { + for (ColumnOrSuperColumn oneresult : results) { column = oneresult.column; - name = new String(column.name.array(), column.name.position()+column.name.arrayOffset(), column.name.remaining()); - value = new ByteArrayByteIterator(column.value.array(), column.value.position()+column.value.arrayOffset(), column.value.remaining()); + name = new String(column.name.array(), + column.name.position() + column.name.arrayOffset(), + column.name.remaining()); + value = new ByteArrayByteIterator(column.value.array(), + column.value.position() + column.value.arrayOffset(), + column.value.remaining()); - result.put(name,value); + result.put(name, value); - if (_debug) - { + if (debug) { System.out.print("(" + name + "=" + value + ")"); } } - if (_debug) - { + if (debug) { System.out.println(); } - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } @@ -281,96 +267,89 @@ public class CassandraClient8 extends DB * pairs for one record * @return Zero on success, a non-zero error code on error */ - public int scan(String table, String startkey, int recordcount, Set<String> fields, - Vector<HashMap<String, ByteIterator>> result) - { - if (!_table.equals(table)) { - try - { + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - - for (int i = 0; i < OperationRetries; i++) - { - try - { + for (int i = 0; i < operationRetries; i++) { + + try { SlicePredicate predicate; - if (fields == null) - { - predicate = new SlicePredicate().setSlice_range(new SliceRange(emptyByteBuffer, emptyByteBuffer, false, 1000000)); - + if (fields == null) { + predicate = new SlicePredicate().setSlice_range(new SliceRange( + EMPTY_BYTE_BUFFER, EMPTY_BYTE_BUFFER, false, 1000000)); + } else { - ArrayList<ByteBuffer> fieldlist = new ArrayList<ByteBuffer>(fields.size()); - for (String s : fields) - { - fieldlist.add(ByteBuffer.wrap(s.getBytes("UTF-8"))); + ArrayList<ByteBuffer> fieldlist = + new ArrayList<ByteBuffer>(fields.size()); + for (String s : fields) { + fieldlist.add(ByteBuffer.wrap(s.getBytes("UTF-8"))); } - + predicate = new SlicePredicate().setColumn_names(fieldlist); } - - KeyRange kr = new KeyRange().setStart_key(startkey.getBytes("UTF-8")).setEnd_key(new byte[] {}).setCount(recordcount); - List<KeySlice> results = client.get_range_slices(parent, predicate, kr, ConsistencyLevel.ONE); + KeyRange kr = new KeyRange().setStart_key(startkey.getBytes("UTF-8")) + .setEnd_key(new byte[] {}).setCount(recordcount); - if (_debug) - { + List<KeySlice> results = client.get_range_slices(parent, predicate, kr, + ConsistencyLevel.ONE); + + if (debug) { System.out.println("Scanning startkey: " + startkey); } HashMap<String, ByteIterator> tuple; - for (KeySlice oneresult : results) - { + for (KeySlice oneresult : results) { tuple = new HashMap<String, ByteIterator>(); - + Column column; String name; ByteIterator value; - for (ColumnOrSuperColumn onecol : oneresult.columns) - { - column = onecol.column; - name = new String(column.name.array(), column.name.position()+column.name.arrayOffset(), column.name.remaining()); - value = new ByteArrayByteIterator(column.value.array(), column.value.position()+column.value.arrayOffset(), column.value.remaining()); - - tuple.put(name, value); - - if (_debug) - { + for (ColumnOrSuperColumn onecol : oneresult.columns) { + column = onecol.column; + name = new String(column.name.array(), + column.name.position() + column.name.arrayOffset(), + column.name.remaining()); + value = new ByteArrayByteIterator(column.value.array(), + column.value.position() + column.value.arrayOffset(), + column.value.remaining()); + + tuple.put(name, value); + + if (debug) { System.out.print("(" + name + "=" + value + ")"); } } result.add(tuple); - if (_debug) - { + if (debug) { System.out.println(); } } - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } /** @@ -386,8 +365,8 @@ public class CassandraClient8 extends DB * A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ - public int update(String table, String key, HashMap<String, ByteIterator> values) - { + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { return insert(table, key, values); } @@ -404,37 +383,30 @@ public class CassandraClient8 extends DB * A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ - public int insert(String table, String key, HashMap<String, ByteIterator> values) - { - if (!_table.equals(table)) { - try - { + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - - for (int i = 0; i < OperationRetries; i++) - { - if (_debug) - { + + for (int i = 0; i < operationRetries; i++) { + if (debug) { System.out.println("Inserting key: " + key); } - - try - { + + try { ByteBuffer wrappedKey = ByteBuffer.wrap(key.getBytes("UTF-8")); Column col; ColumnOrSuperColumn column; - for (Map.Entry<String, ByteIterator> entry : values.entrySet()) - { + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { col = new Column(); col.setName(ByteBuffer.wrap(entry.getKey().getBytes("UTF-8"))); col.setValue(ByteBuffer.wrap(entry.getValue().toArray())); @@ -442,35 +414,33 @@ public class CassandraClient8 extends DB column = new ColumnOrSuperColumn(); column.setColumn(col); - + mutations.add(new Mutation().setColumn_or_supercolumn(column)); } - - mutationMap.put(column_family, mutations); + + mutationMap.put(columnFamily, mutations); record.put(wrappedKey, mutationMap); client.batch_mutate(record, ConsistencyLevel.ONE); - + mutations.clear(); mutationMap.clear(); record.clear(); - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } /** @@ -482,55 +452,44 @@ public class CassandraClient8 extends DB * The record key of the record to delete. * @return Zero on success, a non-zero error code on error */ - public int delete(String table, String key) - { - if (!_table.equals(table)) { - try - { + public Status delete(String table, String key) { + if (!tableName.equals(table)) { + try { client.set_keyspace(table); - _table = table; - } - catch (Exception e) - { + tableName = table; + } catch (Exception e) { e.printStackTrace(); e.printStackTrace(System.out); - return Error; + return Status.ERROR; } } - for (int i = 0; i < OperationRetries; i++) - { - try - { - client.remove(ByteBuffer.wrap(key.getBytes("UTF-8")), - new ColumnPath(column_family), - System.currentTimeMillis(), - ConsistencyLevel.ONE); - - if (_debug) - { + for (int i = 0; i < operationRetries; i++) { + try { + client.remove(ByteBuffer.wrap(key.getBytes("UTF-8")), + new ColumnPath(columnFamily), System.currentTimeMillis(), + ConsistencyLevel.ONE); + + if (debug) { System.out.println("Delete key: " + key); } - return Ok; - } catch (Exception e) - { + return Status.OK; + } catch (Exception e) { errorexception = e; } - try - { + try { Thread.sleep(500); - } catch (InterruptedException e) - { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } errorexception.printStackTrace(); errorexception.printStackTrace(System.out); - return Error; + return Status.ERROR; } - public static void main(String[] args) - { + public static void main(String[] args) { CassandraClient8 cli = new CassandraClient8(); Properties props = new Properties(); @@ -538,11 +497,9 @@ public class CassandraClient8 extends DB props.setProperty("hosts", args[0]); cli.setProperties(props); - try - { + try { cli.init(); - } catch (Exception e) - { + } catch (Exception e) { e.printStackTrace(); System.exit(0); } @@ -551,7 +508,7 @@ public class CassandraClient8 extends DB vals.put("age", new StringByteIterator("57")); vals.put("middlename", new StringByteIterator("bradley")); vals.put("favoritecolor", new StringByteIterator("blue")); - int res = cli.insert("usertable", "BrianFrankCooper", vals); + Status res = cli.insert("usertable", "BrianFrankCooper", vals); System.out.println("Result of insert: " + res); HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); @@ -561,59 +518,11 @@ public class CassandraClient8 extends DB fields.add("favoritecolor"); res = cli.read("usertable", "BrianFrankCooper", null, result); System.out.println("Result of read: " + res); - for (String s : result.keySet()) - { - System.out.println("[" + s + "]=[" + result.get(s) + "]"); + for (Map.Entry<String, ByteIterator> entry : result.entrySet()) { + System.out.println("[" + entry.getKey() + "]=[" + entry.getValue() + "]"); } res = cli.delete("usertable", "BrianFrankCooper"); System.out.println("Result of delete: " + res); } - - /* - * public static void main(String[] args) throws TException, - * InvalidRequestException, UnavailableException, - * UnsupportedEncodingException, NotFoundException { - * - * - * - * String key_user_id = "1"; - * - * - * - * - * client.insert("Keyspace1", key_user_id, new ColumnPath("Standard1", null, - * "age".getBytes("UTF-8")), "24".getBytes("UTF-8"), timestamp, - * ConsistencyLevel.ONE); - * - * - * // read single column ColumnPath path = new ColumnPath("Standard1", null, - * "name".getBytes("UTF-8")); - * - * System.out.println(client.get("Keyspace1", key_user_id, path, - * ConsistencyLevel.ONE)); - * - * - * // read entire row SlicePredicate predicate = new SlicePredicate(null, new - * SliceRange(new byte[0], new byte[0], false, 10)); - * - * ColumnParent parent = new ColumnParent("Standard1", null); - * - * List<ColumnOrSuperColumn> results = client.get_slice("Keyspace1", - * key_user_id, parent, predicate, ConsistencyLevel.ONE); - * - * for (ColumnOrSuperColumn result : results) { - * - * Column column = result.column; - * - * System.out.println(new String(column.name, "UTF-8") + " -> " + new - * String(column.value, "UTF-8")); - * - * } - * - * - * - * - * } - */ } diff --git a/cassandra/src/main/java/com/yahoo/ycsb/db/package-info.java b/cassandra/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..88ce1f0111a374f41bf98efe0f5350beb6b9b140 --- /dev/null +++ b/cassandra/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2014, Yahoo!, Inc. 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. + */ + +/** + * The YCSB binding for <a href="http://cassandra.apache.org/">Cassandra</a> + * versions 0.7, 0.8, and 1.0.X. + */ +package com.yahoo.ycsb.db; + diff --git a/cassandra2/README.md b/cassandra2/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bee44c8d8c41a36f459d0b38b54d35422dddac1a --- /dev/null +++ b/cassandra2/README.md @@ -0,0 +1,80 @@ +<!-- +Copyright (c) 2015 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. +--> + +# Apache Cassandra 2.x CQL binding + +Binding for [Apache Cassandra](http://cassandra.apache.org), using the CQL API +via the [DataStax +driver](http://docs.datastax.com/en/developer/java-driver/2.1/java-driver/whatsNew2.html). + +To run against the (deprecated) Cassandra Thrift API, use the `cassandra-10` binding. + +## Creating a table for use with YCSB + +For keyspace `ycsb`, table `usertable`: + + cqlsh> create keyspace ycsb + WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor': 3 }; + cqlsh> USE ycsb; + cqlsh> create table usertable ( + y_id varchar primary key, + field0 varchar, + field1 varchar, + field2 varchar, + field3 varchar, + field4 varchar, + field5 varchar, + field6 varchar, + field7 varchar, + field8 varchar, + field9 varchar); + +**Note that `replication_factor` and consistency levels (below) will affect performance.** + +## Cassandra Configuration Parameters + +- `hosts` (**required**) + - Cassandra nodes to connect to. + - No default. + +* `port` + * CQL port for communicating with Cassandra cluster. + * Default is `9042`. + +- `cassandra.keyspace` + Keyspace name - must match the keyspace for the table created (see above). + See http://docs.datastax.com/en/cql/3.1/cql/cql_reference/create_keyspace_r.html for details. + + - Default value is `ycsb` + +- `cassandra.username` +- `cassandra.password` + - Optional user name and password for authentication. See http://docs.datastax.com/en/cassandra/2.0/cassandra/security/security_config_native_authenticate_t.html for details. + +* `cassandra.readconsistencylevel` +* `cassandra.writeconsistencylevel` + + * Default value is `ONE` + - Consistency level for reads and writes, respectively. See the [DataStax documentation](http://docs.datastax.com/en/cassandra/2.0/cassandra/dml/dml_config_consistency_c.html) for details. + * *Note that the default setting does not provide durability in the face of node failure. Changing this setting will affect observed performance.* See also `replication_factor`, above. + +* `cassandra.maxconnections` +* `cassandra.coreconnections` + * Defaults for max and core connections can be found here: https://datastax.github.io/java-driver/2.1.8/features/pooling/#pool-size. Cassandra 2.0.X falls under protocol V2, Cassandra 2.1+ falls under protocol V3. +* `cassandra.connecttimeoutmillis` +* `cassandra.readtimeoutmillis` + * Defaults for connect and read timeouts can be found here: https://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/SocketOptions.html. \ No newline at end of file diff --git a/cassandra2/pom.xml b/cassandra2/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..bbf4cd24d1e3b860dcb98158c8b7817d26571b5a --- /dev/null +++ b/cassandra2/pom.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Copyright (c) 2012-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. +--> + +<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.7.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> + </parent> + + <artifactId>cassandra2-binding</artifactId> + <name>Cassandra 2.1+ DB Binding</name> + <packaging>jar</packaging> + + <dependencies> + <!-- CQL driver --> + <dependency> + <groupId>com.datastax.cassandra</groupId> + <artifactId>cassandra-driver-core</artifactId> + <version>${cassandra2.cql.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.cassandraunit</groupId> + <artifactId>cassandra-unit-shaded</artifactId> + <version>2.1.9.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> diff --git a/cassandra2/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java b/cassandra2/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java new file mode 100644 index 0000000000000000000000000000000000000000..d4dc8c7707b429f090561967d35acaa5052c4cac --- /dev/null +++ b/cassandra2/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java @@ -0,0 +1,480 @@ +/** + * Copyright (c) 2013-2015 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. + * + * Submitted by Chrisjan Matser on 10/11/2010. + */ +package com.yahoo.ycsb.db; + +import com.datastax.driver.core.Cluster; +import com.datastax.driver.core.ColumnDefinitions; +import com.datastax.driver.core.ConsistencyLevel; +import com.datastax.driver.core.Host; +import com.datastax.driver.core.HostDistance; +import com.datastax.driver.core.Metadata; +import com.datastax.driver.core.ResultSet; +import com.datastax.driver.core.Row; +import com.datastax.driver.core.Session; +import com.datastax.driver.core.SimpleStatement; +import com.datastax.driver.core.Statement; +import com.datastax.driver.core.querybuilder.Insert; +import com.datastax.driver.core.querybuilder.QueryBuilder; +import com.datastax.driver.core.querybuilder.Select; +import com.yahoo.ycsb.ByteArrayByteIterator; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; + +import java.nio.ByteBuffer; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.Vector; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * Cassandra 2.x CQL client. + * + * See {@code cassandra2/README.md} for details. + * + * @author cmatser + */ +public class CassandraCQLClient extends DB { + + private static Cluster cluster = null; + private static Session session = null; + + private static ConsistencyLevel readConsistencyLevel = ConsistencyLevel.ONE; + private static ConsistencyLevel writeConsistencyLevel = ConsistencyLevel.ONE; + + public static final String YCSB_KEY = "y_id"; + public static final String KEYSPACE_PROPERTY = "cassandra.keyspace"; + public static final String KEYSPACE_PROPERTY_DEFAULT = "ycsb"; + public static final String USERNAME_PROPERTY = "cassandra.username"; + public static final String PASSWORD_PROPERTY = "cassandra.password"; + + public static final String HOSTS_PROPERTY = "hosts"; + public static final String PORT_PROPERTY = "port"; + public static final String PORT_PROPERTY_DEFAULT = "9042"; + + public static final String READ_CONSISTENCY_LEVEL_PROPERTY = + "cassandra.readconsistencylevel"; + public static final String READ_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = "ONE"; + public static final String WRITE_CONSISTENCY_LEVEL_PROPERTY = + "cassandra.writeconsistencylevel"; + public static final String WRITE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT = "ONE"; + + public static final String MAX_CONNECTIONS_PROPERTY = + "cassandra.maxconnections"; + public static final String CORE_CONNECTIONS_PROPERTY = + "cassandra.coreconnections"; + public static final String CONNECT_TIMEOUT_MILLIS_PROPERTY = + "cassandra.connecttimeoutmillis"; + public static final String READ_TIMEOUT_MILLIS_PROPERTY = + "cassandra.readtimeoutmillis"; + + /** + * Count the number of times initialized to teardown on the last + * {@link #cleanup()}. + */ + private static final AtomicInteger INIT_COUNT = new AtomicInteger(0); + + private static boolean debug = false; + + /** + * Initialize any state for this DB. Called once per DB instance; there is one + * DB instance per client thread. + */ + @Override + public void init() throws DBException { + + // Keep track of number of calls to init (for later cleanup) + INIT_COUNT.incrementAndGet(); + + // Synchronized so that we only have a single + // cluster/session instance for all the threads. + synchronized (INIT_COUNT) { + + // Check if the cluster has already been initialized + if (cluster != null) { + return; + } + + try { + + debug = + Boolean.parseBoolean(getProperties().getProperty("debug", "false")); + + String host = getProperties().getProperty(HOSTS_PROPERTY); + if (host == null) { + throw new DBException(String.format( + "Required property \"%s\" missing for CassandraCQLClient", + HOSTS_PROPERTY)); + } + String[] hosts = host.split(","); + String port = getProperties().getProperty(PORT_PROPERTY, PORT_PROPERTY_DEFAULT); + + String username = getProperties().getProperty(USERNAME_PROPERTY); + String password = getProperties().getProperty(PASSWORD_PROPERTY); + + String keyspace = getProperties().getProperty(KEYSPACE_PROPERTY, + KEYSPACE_PROPERTY_DEFAULT); + + readConsistencyLevel = ConsistencyLevel.valueOf( + getProperties().getProperty(READ_CONSISTENCY_LEVEL_PROPERTY, + READ_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); + writeConsistencyLevel = ConsistencyLevel.valueOf( + getProperties().getProperty(WRITE_CONSISTENCY_LEVEL_PROPERTY, + WRITE_CONSISTENCY_LEVEL_PROPERTY_DEFAULT)); + + if ((username != null) && !username.isEmpty()) { + cluster = Cluster.builder().withCredentials(username, password) + .withPort(Integer.valueOf(port)).addContactPoints(hosts).build(); + } else { + cluster = Cluster.builder().withPort(Integer.valueOf(port)) + .addContactPoints(hosts).build(); + } + + String maxConnections = getProperties().getProperty( + MAX_CONNECTIONS_PROPERTY); + if (maxConnections != null) { + cluster.getConfiguration().getPoolingOptions() + .setMaxConnectionsPerHost(HostDistance.LOCAL, + Integer.valueOf(maxConnections)); + } + + String coreConnections = getProperties().getProperty( + CORE_CONNECTIONS_PROPERTY); + if (coreConnections != null) { + cluster.getConfiguration().getPoolingOptions() + .setCoreConnectionsPerHost(HostDistance.LOCAL, + Integer.valueOf(coreConnections)); + } + + String connectTimoutMillis = getProperties().getProperty( + CONNECT_TIMEOUT_MILLIS_PROPERTY); + if (connectTimoutMillis != null) { + cluster.getConfiguration().getSocketOptions() + .setConnectTimeoutMillis(Integer.valueOf(connectTimoutMillis)); + } + + String readTimoutMillis = getProperties().getProperty( + READ_TIMEOUT_MILLIS_PROPERTY); + if (readTimoutMillis != null) { + cluster.getConfiguration().getSocketOptions() + .setReadTimeoutMillis(Integer.valueOf(readTimoutMillis)); + } + + Metadata metadata = cluster.getMetadata(); + System.err.printf("Connected to cluster: %s\n", + metadata.getClusterName()); + + for (Host discoveredHost : metadata.getAllHosts()) { + System.out.printf("Datacenter: %s; Host: %s; Rack: %s\n", + discoveredHost.getDatacenter(), discoveredHost.getAddress(), + discoveredHost.getRack()); + } + + session = cluster.connect(keyspace); + + } catch (Exception e) { + throw new DBException(e); + } + } // synchronized + } + + /** + * Cleanup any state for this DB. Called once per DB instance; there is one DB + * instance per client thread. + */ + @Override + public void cleanup() throws DBException { + synchronized (INIT_COUNT) { + final int curInitCount = INIT_COUNT.decrementAndGet(); + if (curInitCount <= 0) { + session.close(); + cluster.close(); + cluster = null; + session = null; + } + if (curInitCount < 0) { + // This should never happen. + throw new DBException( + String.format("initCount is negative: %d", curInitCount)); + } + } + } + + /** + * Read a record from the database. Each field/value pair from the result will + * be stored in a HashMap. + * + * @param table + * The name of the table + * @param key + * The record key of the record to read. + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A HashMap of field/value pairs for the result + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + try { + Statement stmt; + Select.Builder selectBuilder; + + if (fields == null) { + selectBuilder = QueryBuilder.select().all(); + } else { + selectBuilder = QueryBuilder.select(); + for (String col : fields) { + ((Select.Selection) selectBuilder).column(col); + } + } + + stmt = selectBuilder.from(table).where(QueryBuilder.eq(YCSB_KEY, key)) + .limit(1); + stmt.setConsistencyLevel(readConsistencyLevel); + + if (debug) { + System.out.println(stmt.toString()); + } + + ResultSet rs = session.execute(stmt); + + if (rs.isExhausted()) { + return Status.NOT_FOUND; + } + + // Should be only 1 row + Row row = rs.one(); + ColumnDefinitions cd = row.getColumnDefinitions(); + + for (ColumnDefinitions.Definition def : cd) { + ByteBuffer val = row.getBytesUnsafe(def.getName()); + if (val != null) { + result.put(def.getName(), new ByteArrayByteIterator(val.array())); + } else { + result.put(def.getName(), null); + } + } + + return Status.OK; + + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Error reading key: " + key); + return Status.ERROR; + } + + } + + /** + * Perform a range scan for a set of records in the database. Each field/value + * pair from the result will be stored in a HashMap. + * + * Cassandra CQL uses "token" method for range scan which doesn't always yield + * intuitive results. + * + * @param table + * The name of the table + * @param startkey + * The record key of the first record to read. + * @param recordcount + * The number of records to read + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A Vector of HashMaps, where each HashMap is a set field/value + * pairs for one record + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + + try { + Statement stmt; + Select.Builder selectBuilder; + + if (fields == null) { + selectBuilder = QueryBuilder.select().all(); + } else { + selectBuilder = QueryBuilder.select(); + for (String col : fields) { + ((Select.Selection) selectBuilder).column(col); + } + } + + stmt = selectBuilder.from(table); + + // The statement builder is not setup right for tokens. + // So, we need to build it manually. + String initialStmt = stmt.toString(); + StringBuilder scanStmt = new StringBuilder(); + scanStmt.append(initialStmt.substring(0, initialStmt.length() - 1)); + scanStmt.append(" WHERE "); + scanStmt.append(QueryBuilder.token(YCSB_KEY)); + scanStmt.append(" >= "); + scanStmt.append("token('"); + scanStmt.append(startkey); + scanStmt.append("')"); + scanStmt.append(" LIMIT "); + scanStmt.append(recordcount); + + stmt = new SimpleStatement(scanStmt.toString()); + stmt.setConsistencyLevel(readConsistencyLevel); + + if (debug) { + System.out.println(stmt.toString()); + } + + ResultSet rs = session.execute(stmt); + + HashMap<String, ByteIterator> tuple; + while (!rs.isExhausted()) { + Row row = rs.one(); + tuple = new HashMap<String, ByteIterator>(); + + ColumnDefinitions cd = row.getColumnDefinitions(); + + for (ColumnDefinitions.Definition def : cd) { + ByteBuffer val = row.getBytesUnsafe(def.getName()); + if (val != null) { + tuple.put(def.getName(), new ByteArrayByteIterator(val.array())); + } else { + tuple.put(def.getName(), null); + } + } + + result.add(tuple); + } + + return Status.OK; + + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Error scanning with startkey: " + startkey); + return Status.ERROR; + } + + } + + /** + * Update a record in the database. Any field/value pairs in the specified + * values HashMap will be written into the record with the specified record + * key, overwriting any existing values with the same field name. + * + * @param table + * The name of the table + * @param key + * The record key of the record to write. + * @param values + * A HashMap of field/value pairs to update in the record + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { + // Insert and updates provide the same functionality + return insert(table, key, values); + } + + /** + * Insert a record in the database. Any field/value pairs in the specified + * values HashMap will be written into the record with the specified record + * key. + * + * @param table + * The name of the table + * @param key + * The record key of the record to insert. + * @param values + * A HashMap of field/value pairs to insert in the record + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + + try { + Insert insertStmt = QueryBuilder.insertInto(table); + + // Add key + insertStmt.value(YCSB_KEY, key); + + // Add fields + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { + Object value; + ByteIterator byteIterator = entry.getValue(); + value = byteIterator.toString(); + + insertStmt.value(entry.getKey(), value); + } + + insertStmt.setConsistencyLevel(writeConsistencyLevel); + + if (debug) { + System.out.println(insertStmt.toString()); + } + + session.execute(insertStmt); + + return Status.OK; + } catch (Exception e) { + e.printStackTrace(); + } + + return Status.ERROR; + } + + /** + * Delete a record from the database. + * + * @param table + * The name of the table + * @param key + * The record key of the record to delete. + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status delete(String table, String key) { + + try { + Statement stmt; + + stmt = QueryBuilder.delete().from(table) + .where(QueryBuilder.eq(YCSB_KEY, key)); + stmt.setConsistencyLevel(writeConsistencyLevel); + + if (debug) { + System.out.println(stmt.toString()); + } + + session.execute(stmt); + + return Status.OK; + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Error deleting key: " + key); + } + + return Status.ERROR; + } + +} diff --git a/cassandra2/src/main/java/com/yahoo/ycsb/db/package-info.java b/cassandra2/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..007f01dc54dd9d543b5380dff68880f23b1c009b --- /dev/null +++ b/cassandra2/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2014, Yahoo!, Inc. 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. + */ + +/** + * The YCSB binding for <a href="http://cassandra.apache.org/">Cassandra</a> + * 2.1+ via CQL. + */ +package com.yahoo.ycsb.db; + diff --git a/cassandra2/src/test/java/com/yahoo/ycsb/db/CassandraCQLClientTest.java b/cassandra2/src/test/java/com/yahoo/ycsb/db/CassandraCQLClientTest.java new file mode 100644 index 0000000000000000000000000000000000000000..bc73a73710506b957e39ce80ab730da908ea6654 --- /dev/null +++ b/cassandra2/src/test/java/com/yahoo/ycsb/db/CassandraCQLClientTest.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2015 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. + */ + +package com.yahoo.ycsb.db; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.hasEntry; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.notNullValue; + +import com.google.common.collect.Sets; + +import com.datastax.driver.core.ResultSet; +import com.datastax.driver.core.Row; +import com.datastax.driver.core.Session; +import com.datastax.driver.core.Statement; +import com.datastax.driver.core.querybuilder.Insert; +import com.datastax.driver.core.querybuilder.QueryBuilder; +import com.datastax.driver.core.querybuilder.Select; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.StringByteIterator; +import com.yahoo.ycsb.measurements.Measurements; +import com.yahoo.ycsb.workloads.CoreWorkload; + +import org.cassandraunit.CassandraCQLUnit; +import org.cassandraunit.dataset.cql.ClassPathCQLDataSet; +import org.junit.After; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.Set; + +/** + * Integration tests for the Cassandra client + */ +public class CassandraCQLClientTest { + private final static String TABLE = "usertable"; + private final static String HOST = "localhost"; + private final static int PORT = 9142; + private final static String DEFAULT_ROW_KEY = "user1"; + + private CassandraCQLClient client; + private Session session; + + @ClassRule + public static CassandraCQLUnit cassandraUnit = + new CassandraCQLUnit(new ClassPathCQLDataSet("ycsb.cql", "ycsb")); + + @Before + public void setUpClient() throws Exception { + Properties p = new Properties(); + p.setProperty("hosts", HOST); + p.setProperty("port", Integer.toString(PORT)); + p.setProperty("table", TABLE); + + Measurements.setProperties(p); + final CoreWorkload workload = new CoreWorkload(); + workload.init(p); + client = new CassandraCQLClient(); + client.setProperties(p); + client.init(); + } + + @Before + public void setSession() { + session = cassandraUnit.getSession(); + } + + @After + public void tearDownClient() throws Exception { + client.cleanup(); + client = null; + } + + @After + public void clearTable() throws Exception { + // Clear the table so that each test starts fresh. + final Statement truncate = QueryBuilder.truncate(TABLE); + cassandraUnit.getSession().execute(truncate); + } + + @Test + public void testReadMissingRow() throws Exception { + final HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); + final Status status = client.read(TABLE, "Missing row", null, result); + assertThat(result.size(), is(0)); + assertThat(status, is(Status.NOT_FOUND)); + } + + private void insertRow() { + final String rowKey = DEFAULT_ROW_KEY; + Insert insertStmt = QueryBuilder.insertInto(TABLE); + insertStmt.value(CassandraCQLClient.YCSB_KEY, rowKey); + + insertStmt.value("field0", "value1"); + insertStmt.value("field1", "value2"); + session.execute(insertStmt); + } + + @Test + public void testRead() throws Exception { + insertRow(); + + final HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); + final Status status = client.read(CoreWorkload.table, DEFAULT_ROW_KEY, null, result); + assertThat(status, is(Status.OK)); + assertThat(result.entrySet(), hasSize(11)); + assertThat(result, hasEntry("field2", null)); + + final HashMap<String, String> strResult = new HashMap<String, String>(); + for (final Map.Entry<String, ByteIterator> e : result.entrySet()) { + if (e.getValue() != null) { + strResult.put(e.getKey(), e.getValue().toString()); + } + } + assertThat(strResult, hasEntry(CassandraCQLClient.YCSB_KEY, DEFAULT_ROW_KEY)); + assertThat(strResult, hasEntry("field0", "value1")); + assertThat(strResult, hasEntry("field1", "value2")); + } + + @Test + public void testReadSingleColumn() throws Exception { + insertRow(); + final HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); + final Set<String> fields = Sets.newHashSet("field1"); + final Status status = client.read(CoreWorkload.table, DEFAULT_ROW_KEY, fields, result); + assertThat(status, is(Status.OK)); + assertThat(result.entrySet(), hasSize(1)); + final Map<String, String> strResult = StringByteIterator.getStringMap(result); + assertThat(strResult, hasEntry("field1", "value2")); + } + + @Test + public void testUpdate() throws Exception { + final String key = "key"; + final HashMap<String, String> input = new HashMap<String, String>(); + input.put("field0", "value1"); + input.put("field1", "value2"); + + final Status status = client.insert(TABLE, key, StringByteIterator.getByteIteratorMap(input)); + assertThat(status, is(Status.OK)); + + // Verify result + final Select selectStmt = + QueryBuilder.select("field0", "field1") + .from(TABLE) + .where(QueryBuilder.eq(CassandraCQLClient.YCSB_KEY, key)) + .limit(1); + + final ResultSet rs = session.execute(selectStmt); + final Row row = rs.one(); + assertThat(row, notNullValue()); + assertThat(rs.isExhausted(), is(true)); + assertThat(row.getString("field0"), is("value1")); + assertThat(row.getString("field1"), is("value2")); + } +} diff --git a/cassandra2/src/test/resources/ycsb.cql b/cassandra2/src/test/resources/ycsb.cql new file mode 100644 index 0000000000000000000000000000000000000000..c52ab787b21a251a5a899b3163e9540e8af0c082 --- /dev/null +++ b/cassandra2/src/test/resources/ycsb.cql @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2015 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. + */ + +CREATE TABLE usertable ( + y_id varchar primary key, + field0 varchar, + field1 varchar, + field2 varchar, + field3 varchar, + field4 varchar, + field5 varchar, + field6 varchar, + field7 varchar, + field8 varchar, + field9 varchar); diff --git a/checkstyle.xml b/checkstyle.xml index 029f0abd12c93d036a7b255a865101f5a1fd848d..2197b022643a1112c1524a006ceea8b619e8f8c4 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -115,7 +115,9 @@ LICENSE file. <!-- Checks for Size Violations. --> <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="LineLength"/> + <module name="LineLength"> + <property name="max" value="120"/> + </module> <module name="MethodLength"/> <module name="ParameterNumber"/> @@ -178,7 +180,7 @@ LICENSE file. <property name="basicOffset" value="2" /> <property name="caseIndent" value="0" /> </module> - <module name="TodoComment"/> + <!-- <module name="TodoComment"/> --> <module name="UpperEll"/> </module> diff --git a/core/pom.xml b/core/pom.xml index 1d747eda197cc9e23d5e6643197f9f3cd28f908f..5e5da1446feda5ac5b41a68bc6c0d16ae2d70871 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>root</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> </parent> <artifactId>core</artifactId> @@ -29,6 +29,7 @@ LICENSE file. <packaging>jar</packaging> <properties> + <checkstyle.failOnViolation>false</checkstyle.failOnViolation> <jackson.api.version>1.9.4</jackson.api.version> </properties> diff --git a/core/src/main/java/com/yahoo/ycsb/BasicDB.java b/core/src/main/java/com/yahoo/ycsb/BasicDB.java index 0eff6f3808f0197439a581c36b05a384846e367e..83eb5e2528355b4ef3da6a09913f965a4360472d 100644 --- a/core/src/main/java/com/yahoo/ycsb/BasicDB.java +++ b/core/src/main/java/com/yahoo/ycsb/BasicDB.java @@ -17,11 +17,7 @@ package com.yahoo.ycsb; -import java.util.HashMap; -import java.util.Properties; -import java.util.Set; -import java.util.Enumeration; -import java.util.Vector; +import java.util.*; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.LockSupport; @@ -109,7 +105,7 @@ public class BasicDB extends DB * @param result A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ - public int read(String table, String key, Set<String> fields, HashMap<String,ByteIterator> result) + public Status read(String table, String key, Set<String> fields, HashMap<String,ByteIterator> result) { delay(); @@ -131,7 +127,7 @@ public class BasicDB extends DB System.out.println("]"); } - return 0; + return Status.OK; } /** @@ -144,7 +140,7 @@ public class BasicDB extends DB * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record * @return Zero on success, a non-zero error code on error */ - public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String,ByteIterator>> result) + public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String,ByteIterator>> result) { delay(); @@ -166,7 +162,7 @@ public class BasicDB extends DB System.out.println("]"); } - return 0; + return Status.OK; } /** @@ -178,7 +174,7 @@ public class BasicDB extends DB * @param values A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ - public int update(String table, String key, HashMap<String,ByteIterator> values) + public Status update(String table, String key, HashMap<String,ByteIterator> values) { delay(); @@ -187,15 +183,15 @@ public class BasicDB extends DB System.out.print("UPDATE "+table+" "+key+" [ "); if (values!=null) { - for (String k : values.keySet()) + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { - System.out.print(k+"="+values.get(k)+" "); + System.out.print(entry.getKey() +"="+ entry.getValue() +" "); } } System.out.println("]"); } - return 0; + return Status.OK; } /** @@ -207,7 +203,7 @@ public class BasicDB extends DB * @param values A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ - public int insert(String table, String key, HashMap<String,ByteIterator> values) + public Status insert(String table, String key, HashMap<String,ByteIterator> values) { delay(); @@ -216,16 +212,16 @@ public class BasicDB extends DB System.out.print("INSERT "+table+" "+key+" [ "); if (values!=null) { - for (String k : values.keySet()) + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { - System.out.print(k+"="+values.get(k)+" "); + System.out.print(entry.getKey() +"="+ entry.getValue() +" "); } } System.out.println("]"); } - return 0; + return Status.OK; } @@ -236,7 +232,7 @@ public class BasicDB extends DB * @param key The record key of the record to delete. * @return Zero on success, a non-zero error code on error */ - public int delete(String table, String key) + public Status delete(String table, String key) { delay(); @@ -245,7 +241,7 @@ public class BasicDB extends DB System.out.println("DELETE "+table+" "+key); } - return 0; + return Status.OK; } /** diff --git a/core/src/main/java/com/yahoo/ycsb/Client.java b/core/src/main/java/com/yahoo/ycsb/Client.java index e1cd226f09470c986db75adcb01d85d09733a387..df9d8cf794fa6dd51a13d030a82060106ab14757 100644 --- a/core/src/main/java/com/yahoo/ycsb/Client.java +++ b/core/src/main/java/com/yahoo/ycsb/Client.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010 Yahoo! Inc. All rights reserved. + * Copyright (c) 2010 - 2016 Yahoo! Inc. 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 @@ -469,6 +469,11 @@ public class Client */ public static final String MAX_EXECUTION_TIME = "maxexecutiontime"; + /** + * Whether or not this is the transaction phase (run) or not (load). + */ + public static final String DO_TRANSACTIONS_PROPERTY = "dotransactions"; + public static void usageMessage() { @@ -591,7 +596,7 @@ public class Client System.exit(0); } int tcount=Integer.parseInt(args[argindex]); - props.setProperty(THREAD_COUNT_PROPERTY, tcount+""); + props.setProperty(THREAD_COUNT_PROPERTY, String.valueOf(tcount)); argindex++; } else if (args[argindex].compareTo("-target")==0) @@ -603,7 +608,7 @@ public class Client System.exit(0); } int ttarget=Integer.parseInt(args[argindex]); - props.setProperty(TARGET_PROPERTY, ttarget+""); + props.setProperty(TARGET_PROPERTY, String.valueOf(ttarget)); argindex++; } else if (args[argindex].compareTo("-load")==0) @@ -734,6 +739,8 @@ public class Client System.exit(0); } + props.setProperty(DO_TRANSACTIONS_PROPERTY, String.valueOf(dotransactions)); + long maxExecutionTime = Integer.parseInt(props.getProperty(MAX_EXECUTION_TIME, "0")); //get number of threads, target and db diff --git a/core/src/main/java/com/yahoo/ycsb/CommandLine.java b/core/src/main/java/com/yahoo/ycsb/CommandLine.java index c3f06549900263c8012d402d639b9d7deb3fb941..80c1fc18b1df7b00807ee300fdbf4d4a3177a5ce 100644 --- a/core/src/main/java/com/yahoo/ycsb/CommandLine.java +++ b/core/src/main/java/com/yahoo/ycsb/CommandLine.java @@ -295,8 +295,8 @@ public class CommandLine } HashMap<String,ByteIterator> result=new HashMap<String,ByteIterator>(); - int ret=db.read(table,tokens[1],fields,result); - System.out.println("Return code: "+ret); + Status ret=db.read(table,tokens[1],fields,result); + System.out.println("Return code: "+ret.getName()); for (Map.Entry<String,ByteIterator> ent : result.entrySet()) { System.out.println(ent.getKey()+"="+ent.getValue()); @@ -324,10 +324,10 @@ public class CommandLine } Vector<HashMap<String,ByteIterator>> results=new Vector<HashMap<String,ByteIterator>>(); - int ret=db.scan(table,tokens[1],Integer.parseInt(tokens[2]),fields,results); - System.out.println("Return code: "+ret); + Status ret=db.scan(table,tokens[1],Integer.parseInt(tokens[2]),fields,results); + System.out.println("Result: "+ret.getName()); int record=0; - if (results.size()==0) + if (results.isEmpty()) { System.out.println("0 records"); } @@ -362,8 +362,8 @@ public class CommandLine values.put(nv[0],new StringByteIterator(nv[1])); } - int ret=db.update(table,tokens[1],values); - System.out.println("Return code: "+ret); + Status ret=db.update(table,tokens[1],values); + System.out.println("Result: "+ret.getName()); } } else if (tokens[0].compareTo("insert")==0) @@ -382,8 +382,8 @@ public class CommandLine values.put(nv[0],new StringByteIterator(nv[1])); } - int ret=db.insert(table,tokens[1],values); - System.out.println("Return code: "+ret); + Status ret=db.insert(table,tokens[1],values); + System.out.println("Result: "+ret.getName()); } } else if (tokens[0].compareTo("delete")==0) @@ -394,8 +394,8 @@ public class CommandLine } else { - int ret=db.delete(table,tokens[1]); - System.out.println("Return code: "+ret); + Status ret=db.delete(table,tokens[1]); + System.out.println("Return result: "+ret.getName()); } } else diff --git a/core/src/main/java/com/yahoo/ycsb/DB.java b/core/src/main/java/com/yahoo/ycsb/DB.java index 91a695f140623729b7a7dbd8b8ebf087ff91ba9f..f9fec3a93922c5297ae89899f1c1a2f61e3f768c 100644 --- a/core/src/main/java/com/yahoo/ycsb/DB.java +++ b/core/src/main/java/com/yahoo/ycsb/DB.java @@ -88,9 +88,9 @@ public abstract class DB * @param key The record key of the record to read. * @param fields The list of fields to read, or null for all of them * @param result A HashMap of field/value pairs for the result - * @return Zero on success, a non-zero error code on error or "not found". + * @return The result of the operation. */ - public abstract int read(String table, String key, Set<String> fields, HashMap<String,ByteIterator> result); + public abstract Status read(String table, String key, Set<String> fields, HashMap<String,ByteIterator> result); /** * Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap. @@ -100,9 +100,9 @@ public abstract class DB * @param recordcount The number of records to read * @param fields The list of fields to read, or null for all of them * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record - * @return Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes. + * @return The result of the operation. */ - public abstract int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String,ByteIterator>> result); + public abstract Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String,ByteIterator>> result); /** * Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified @@ -111,9 +111,9 @@ public abstract class DB * @param table The name of the table * @param key The record key of the record to write. * @param values A HashMap of field/value pairs to update in the record - * @return Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes. + * @return The result of the operation. */ - public abstract int update(String table, String key, HashMap<String,ByteIterator> values); + public abstract Status update(String table, String key, HashMap<String,ByteIterator> values); /** * Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified @@ -122,16 +122,16 @@ public abstract class DB * @param table The name of the table * @param key The record key of the record to insert. * @param values A HashMap of field/value pairs to insert in the record - * @return Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes. + * @return The result of the operation. */ - public abstract int insert(String table, String key, HashMap<String,ByteIterator> values); + public abstract Status insert(String table, String key, HashMap<String,ByteIterator> values); /** * Delete a record from the database. * * @param table The name of the table * @param key The record key of the record to delete. - * @return Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes. + * @return The result of the operation. */ - public abstract int delete(String table, String key); + public abstract Status delete(String table, String key); } diff --git a/core/src/main/java/com/yahoo/ycsb/DBWrapper.java b/core/src/main/java/com/yahoo/ycsb/DBWrapper.java index 50b314bb75196708eca4b030e9d66d78e9954ddc..337f4d9b5d04d0ee5ceb337adb65169d6e7b2862 100644 --- a/core/src/main/java/com/yahoo/ycsb/DBWrapper.java +++ b/core/src/main/java/com/yahoo/ycsb/DBWrapper.java @@ -1,23 +1,25 @@ -/** - * Copyright (c) 2010 Yahoo! Inc. 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. +/** + * Copyright (c) 2010 Yahoo! Inc. 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. */ package com.yahoo.ycsb; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; import java.util.Properties; import java.util.Set; import java.util.Vector; @@ -26,157 +28,205 @@ import com.yahoo.ycsb.measurements.Measurements; /** * Wrapper around a "real" DB that measures latencies and counts return codes. + * Also reports latency separately between OK and failed operations. */ public class DBWrapper extends DB { - DB _db; - Measurements _measurements; - - public DBWrapper(DB db) - { - _db=db; - _measurements=Measurements.getMeasurements(); - } - - /** - * Set the properties for this DB. - */ - public void setProperties(Properties p) - { - _db.setProperties(p); - } - - /** - * Get the set of properties for this DB. - */ - public Properties getProperties() - { - return _db.getProperties(); - } - - /** - * Initialize any state for this DB. - * Called once per DB instance; there is one DB instance per client thread. - */ - public void init() throws DBException - { - _db.init(); - } - - /** - * Cleanup any state for this DB. - * Called once per DB instance; there is one DB instance per client thread. - */ - public void cleanup() throws DBException - { - long ist=_measurements.getIntendedtartTimeNs(); - long st = System.nanoTime(); - _db.cleanup(); - long en=System.nanoTime(); - measure("CLEANUP",ist, st, en); - } - - /** - * Read a record from the database. Each field/value pair from the result will be stored in a HashMap. - * - * @param table The name of the table - * @param key The record key of the record to read. - * @param fields The list of fields to read, or null for all of them - * @param result A HashMap of field/value pairs for the result - * @return Zero on success, a non-zero error code on error - */ - public int read(String table, String key, Set<String> fields, HashMap<String,ByteIterator> result) - { - long ist=_measurements.getIntendedtartTimeNs(); - long st = System.nanoTime(); - int res=_db.read(table,key,fields,result); - long en=System.nanoTime(); - measure("READ",ist, st, en); - _measurements.reportReturnCode("READ",res); - return res; - } - - /** - * Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap. - * - * @param table The name of the table - * @param startkey The record key of the first record to read. - * @param recordcount The number of records to read - * @param fields The list of fields to read, or null for all of them - * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record - * @return Zero on success, a non-zero error code on error - */ - public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String,ByteIterator>> result) - { - long ist=_measurements.getIntendedtartTimeNs(); - long st = System.nanoTime(); - int res=_db.scan(table,startkey,recordcount,fields,result); - long en=System.nanoTime(); - measure("SCAN",ist, st, en); - _measurements.reportReturnCode("SCAN",res); - return res; - } - - private void measure(String op, long intendedStartTimeNanos, long startTimeNanos, long endTimeNanos) { - _measurements.measure(op, (int)((endTimeNanos-startTimeNanos)/1000)); - _measurements.measureIntended(op, (int)((endTimeNanos-intendedStartTimeNanos)/1000)); + private DB _db; + private Measurements _measurements; + + private boolean reportLatencyForEachError = false; + private HashSet<String> latencyTrackedErrors = new HashSet<String>(); + + private static final String REPORT_LATENCY_FOR_EACH_ERROR_PROPERTY = + "reportlatencyforeacherror"; + private static final String REPORT_LATENCY_FOR_EACH_ERROR_PROPERTY_DEFAULT = + "false"; + + private static final String LATENCY_TRACKED_ERRORS_PROPERTY = + "latencytrackederrors"; + + public DBWrapper(DB db) + { + _db=db; + _measurements=Measurements.getMeasurements(); + } + + /** + * Set the properties for this DB. + */ + public void setProperties(Properties p) + { + _db.setProperties(p); + } + + /** + * Get the set of properties for this DB. + */ + public Properties getProperties() + { + return _db.getProperties(); + } + + /** + * Initialize any state for this DB. + * Called once per DB instance; there is one DB instance per client thread. + */ + public void init() throws DBException + { + _db.init(); + + this.reportLatencyForEachError = Boolean.parseBoolean(getProperties(). + getProperty(REPORT_LATENCY_FOR_EACH_ERROR_PROPERTY, + REPORT_LATENCY_FOR_EACH_ERROR_PROPERTY_DEFAULT)); + + if (!reportLatencyForEachError) { + String latencyTrackedErrors = getProperties().getProperty( + LATENCY_TRACKED_ERRORS_PROPERTY, null); + if (latencyTrackedErrors != null) { + this.latencyTrackedErrors = new HashSet<String>(Arrays.asList( + latencyTrackedErrors.split(","))); + } } - - /** - * Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - * record key, overwriting any existing values with the same field name. - * - * @param table The name of the table - * @param key The record key of the record to write. - * @param values A HashMap of field/value pairs to update in the record - * @return Zero on success, a non-zero error code on error - */ - public int update(String table, String key, HashMap<String,ByteIterator> values) - { - long ist=_measurements.getIntendedtartTimeNs(); - long st = System.nanoTime(); - int res=_db.update(table,key,values); - long en=System.nanoTime(); - measure("UPDATE",ist, st, en); - _measurements.reportReturnCode("UPDATE",res); - return res; - } - - /** - * Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - * record key. - * - * @param table The name of the table - * @param key The record key of the record to insert. - * @param values A HashMap of field/value pairs to insert in the record - * @return Zero on success, a non-zero error code on error - */ - public int insert(String table, String key, HashMap<String,ByteIterator> values) - { - long ist=_measurements.getIntendedtartTimeNs(); - long st = System.nanoTime(); - int res=_db.insert(table,key,values); - long en=System.nanoTime(); - measure("INSERT",ist, st, en); - _measurements.reportReturnCode("INSERT",res); - return res; - } - - /** - * Delete a record from the database. - * - * @param table The name of the table - * @param key The record key of the record to delete. - * @return Zero on success, a non-zero error code on error - */ - public int delete(String table, String key) - { - long ist=_measurements.getIntendedtartTimeNs(); - long st = System.nanoTime(); - int res=_db.delete(table,key); - long en=System.nanoTime(); - measure("DELETE",ist, st, en); - _measurements.reportReturnCode("DELETE",res); - return res; - } + + System.err.println("DBWrapper: report latency for each error is " + + this.reportLatencyForEachError + " and specific error codes to track" + + " for latency are: " + this.latencyTrackedErrors.toString()); + } + + /** + * Cleanup any state for this DB. + * Called once per DB instance; there is one DB instance per client thread. + */ + public void cleanup() throws DBException + { + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + _db.cleanup(); + long en=System.nanoTime(); + measure("CLEANUP", Status.OK, ist, st, en); + } + + /** + * Read a record from the database. Each field/value pair from the result + * will be stored in a HashMap. + * + * @param table The name of the table + * @param key The record key of the record to read. + * @param fields The list of fields to read, or null for all of them + * @param result A HashMap of field/value pairs for the result + * @return The result of the operation. + */ + public Status read(String table, String key, Set<String> fields, + HashMap<String,ByteIterator> result) + { + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + Status res=_db.read(table,key,fields,result); + long en=System.nanoTime(); + measure("READ", res, ist, st, en); + _measurements.reportStatus("READ", res); + return res; + } + + /** + * Perform a range scan for a set of records in the database. + * Each field/value pair from the result will be stored in a HashMap. + * + * @param table The name of the table + * @param startkey The record key of the first record to read. + * @param recordcount The number of records to read + * @param fields The list of fields to read, or null for all of them + * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record + * @return The result of the operation. + */ + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String,ByteIterator>> result) + { + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + Status res=_db.scan(table,startkey,recordcount,fields,result); + long en=System.nanoTime(); + measure("SCAN", res, ist, st, en); + _measurements.reportStatus("SCAN", res); + return res; + } + + private void measure(String op, Status result, long intendedStartTimeNanos, + long startTimeNanos, long endTimeNanos) { + String measurementName = op; + if (result != Status.OK) { + if (this.reportLatencyForEachError || + this.latencyTrackedErrors.contains(result.getName())) { + measurementName = op + "-" + result.getName(); + } else { + measurementName = op + "-FAILED"; + } + } + _measurements.measure(measurementName, + (int)((endTimeNanos-startTimeNanos)/1000)); + _measurements.measureIntended(measurementName, + (int)((endTimeNanos-intendedStartTimeNanos)/1000)); + } + + /** + * Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified + * record key, overwriting any existing values with the same field name. + * + * @param table The name of the table + * @param key The record key of the record to write. + * @param values A HashMap of field/value pairs to update in the record + * @return The result of the operation. + */ + public Status update(String table, String key, + HashMap<String,ByteIterator> values) + { + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + Status res=_db.update(table,key,values); + long en=System.nanoTime(); + measure("UPDATE", res, ist, st, en); + _measurements.reportStatus("UPDATE", res); + return res; + } + + /** + * Insert a record in the database. Any field/value pairs in the specified + * values HashMap will be written into the record with the specified + * record key. + * + * @param table The name of the table + * @param key The record key of the record to insert. + * @param values A HashMap of field/value pairs to insert in the record + * @return The result of the operation. + */ + public Status insert(String table, String key, + HashMap<String,ByteIterator> values) + { + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + Status res=_db.insert(table,key,values); + long en=System.nanoTime(); + measure("INSERT", res, ist, st, en); + _measurements.reportStatus("INSERT", res); + return res; + } + + /** + * Delete a record from the database. + * + * @param table The name of the table + * @param key The record key of the record to delete. + * @return The result of the operation. + */ + public Status delete(String table, String key) + { + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + Status res=_db.delete(table,key); + long en=System.nanoTime(); + measure("DELETE", res, ist, st, en); + _measurements.reportStatus("DELETE", res); + return res; + } } diff --git a/core/src/main/java/com/yahoo/ycsb/GoodBadUglyDB.java b/core/src/main/java/com/yahoo/ycsb/GoodBadUglyDB.java index 706438eb879bf93515dd31cefa6252696481c409..e576a84268b104a12410bc80dae0a36098a6f5d5 100644 --- a/core/src/main/java/com/yahoo/ycsb/GoodBadUglyDB.java +++ b/core/src/main/java/com/yahoo/ycsb/GoodBadUglyDB.java @@ -96,9 +96,9 @@ public class GoodBadUglyDB extends DB { * @param result A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ - public int read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { + public Status read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { delay(); - return 0; + return Status.OK; } /** @@ -112,11 +112,11 @@ public class GoodBadUglyDB extends DB { * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record * @return Zero on success, a non-zero error code on error */ - public int scan(String table, String startkey, int recordcount, Set<String> fields, + public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { delay(); - return 0; + return Status.OK; } /** @@ -128,10 +128,10 @@ public class GoodBadUglyDB extends DB { * @param values A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ - public int update(String table, String key, HashMap<String, ByteIterator> values) { + public Status update(String table, String key, HashMap<String, ByteIterator> values) { delay(); - return 0; + return Status.OK; } /** @@ -143,9 +143,9 @@ public class GoodBadUglyDB extends DB { * @param values A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ - public int insert(String table, String key, HashMap<String, ByteIterator> values) { + public Status insert(String table, String key, HashMap<String, ByteIterator> values) { delay(); - return 0; + return Status.OK; } /** @@ -155,8 +155,8 @@ public class GoodBadUglyDB extends DB { * @param key The record key of the record to delete. * @return Zero on success, a non-zero error code on error */ - public int delete(String table, String key) { + public Status delete(String table, String key) { delay(); - return 0; + return Status.OK; } } diff --git a/core/src/main/java/com/yahoo/ycsb/Status.java b/core/src/main/java/com/yahoo/ycsb/Status.java new file mode 100644 index 0000000000000000000000000000000000000000..bc32b86c65d273d76bb702b6ae27b22b4d2cd609 --- /dev/null +++ b/core/src/main/java/com/yahoo/ycsb/Status.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2015 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. + */ + +package com.yahoo.ycsb; + +/** + * The result of an operation. + */ +public class Status { + private final String name; + private final String description; + + + /** + * @param name A short name for the status. + * @param description A description of the status. + */ + public Status(String name, String description) { + super(); + this.name = name; + this.description = description; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + @Override + public String toString() { + return "Status [name=" + name + ", description=" + description + "]"; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((description == null) ? 0 : description.hashCode()); + result = prime * result + ((name == null) ? 0 : name.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Status other = (Status) obj; + if (description == null) { + if (other.description != null) + return false; + } else if (!description.equals(other.description)) + return false; + if (name == null) { + if (other.name != null) + return false; + } else if (!name.equals(other.name)) + return false; + return true; + } + + public static final Status OK = new Status("OK", "The operation completed successfully."); + public static final Status ERROR = new Status("ERROR", "The operation failed."); + public static final Status NOT_FOUND = new Status("NOT_FOUND", "The requested record was not found."); + public static final Status NOT_IMPLEMENTED = new Status("NOT_IMPLEMENTED", "The operation is not implemented for the current binding."); + public static final Status UNEXPECTED_STATE = new Status("UNEXPECTED_STATE", "The operation reported success, but the result was not as expected."); + public static final Status BAD_REQUEST = new Status("BAD_REQUEST", "The request was not valid."); + public static final Status FORBIDDEN = new Status("FORBIDDEN", "The operation is forbidden."); + public static final Status SERVICE_UNAVAILABLE = new Status("SERVICE_UNAVAILABLE", "Dependant service for the current binding is not available."); + +} + diff --git a/core/src/main/java/com/yahoo/ycsb/StringByteIterator.java b/core/src/main/java/com/yahoo/ycsb/StringByteIterator.java index 84465cba3ef0482bea716c3daf2cf7ca45463961..bcc602effacf0eafc0196ade64712290ea7a5e5c 100644 --- a/core/src/main/java/com/yahoo/ycsb/StringByteIterator.java +++ b/core/src/main/java/com/yahoo/ycsb/StringByteIterator.java @@ -29,7 +29,7 @@ public class StringByteIterator extends ByteIterator { * String values into ByteIterators. */ public static void putAllAsByteIterators(Map<String, ByteIterator> out, Map<String, String> in) { - for(String s: in.keySet()) { out.put(s, new StringByteIterator(in.get(s))); } + for(Map.Entry<String, String> entry : in.entrySet()) { out.put(entry.getKey(), new StringByteIterator(entry.getValue())); } } /** @@ -37,7 +37,7 @@ public class StringByteIterator extends ByteIterator { * ByteIterator values into Strings. */ public static void putAllAsStrings(Map<String, String> out, Map<String, ByteIterator> in) { - for(String s: in.keySet()) { out.put(s, in.get(s).toString()); } + for(Map.Entry<String, ByteIterator> entry : in.entrySet()) { out.put(entry.getKey(), entry.getValue().toString()); } } /** @@ -48,8 +48,8 @@ public class StringByteIterator extends ByteIterator { HashMap<String, ByteIterator> ret = new HashMap<String,ByteIterator>(); - for(String s: m.keySet()) { - ret.put(s, new StringByteIterator(m.get(s))); + for(Map.Entry<String, String> entry : m.entrySet()) { + ret.put(entry.getKey(), new StringByteIterator(entry.getValue())); } return ret; } @@ -61,8 +61,8 @@ public class StringByteIterator extends ByteIterator { public static HashMap<String, String> getStringMap(Map<String, ByteIterator> m) { HashMap<String, String> ret = new HashMap<String,String>(); - for(String s: m.keySet()) { - ret.put(s, m.get(s).toString());; + for(Map.Entry<String, ByteIterator> entry : m.entrySet()) { + ret.put(entry.getKey(), entry.getValue().toString()); } return ret; } diff --git a/core/src/main/java/com/yahoo/ycsb/generator/AcknowledgedCounterGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/AcknowledgedCounterGenerator.java new file mode 100644 index 0000000000000000000000000000000000000000..3015c51a08f76c05b1d747b5ba38699c63b275a0 --- /dev/null +++ b/core/src/main/java/com/yahoo/ycsb/generator/AcknowledgedCounterGenerator.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2015 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. + */ +package com.yahoo.ycsb.generator; + +import java.util.concurrent.locks.ReentrantLock; + +/** + * A CounterGenerator that reports generated integers via lastInt() + * only after they have been acknowledged. + */ +public class AcknowledgedCounterGenerator extends CounterGenerator +{ + /** The size of the window of pending id ack's. 2^20 = {@value} */ + static final int WINDOW_SIZE = Integer.rotateLeft(1, 20); + + /** The mask to use to turn an id into a slot in {@link #window}. */ + private static final int WINDOW_MASK = WINDOW_SIZE - 1; + + private final ReentrantLock lock; + private final boolean[] window; + private volatile int limit; + + /** + * Create a counter that starts at countstart. + */ + public AcknowledgedCounterGenerator(int countstart) + { + super(countstart); + lock = new ReentrantLock(); + window = new boolean[WINDOW_SIZE]; + limit = countstart - 1; + } + + /** + * In this generator, the highest acknowledged counter value + * (as opposed to the highest generated counter value). + */ + @Override + public Integer lastValue() + { + return limit; + } + + /** + * Make a generated counter value available via lastInt(). + */ + public void acknowledge(int value) + { + final int currentSlot = (value & WINDOW_MASK); + if (window[currentSlot] == true) { + throw new RuntimeException("Too many unacknowledged insertion keys."); + } + + window[currentSlot] = true; + + if (lock.tryLock()) { + // move a contiguous sequence from the window + // over to the "limit" variable + try { + // Only loop through the entire window at most once. + int beforeFirstSlot = (limit & WINDOW_MASK); + int index; + for (index = limit + 1; index != beforeFirstSlot; ++index) { + int slot = (index & WINDOW_MASK); + if (!window[slot]) { + break; + } + + window[slot] = false; + } + + limit = index - 1; + } finally { + lock.unlock(); + } + } + } +} diff --git a/core/src/main/java/com/yahoo/ycsb/generator/ConstantIntegerGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/ConstantIntegerGenerator.java index 94dd3a6ae414f0ef40d20ba5f87d448a2af30a27..f3a634d6e9d099e9a4fba81036c06d3709d89bc0 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/ConstantIntegerGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/ConstantIntegerGenerator.java @@ -22,7 +22,7 @@ package com.yahoo.ycsb.generator; * @author sears * */ -public class ConstantIntegerGenerator extends IntegerGenerator { +public class ConstantIntegerGenerator extends NumberGenerator { private final int i; /** * @param i The integer that this generator will always return. @@ -32,7 +32,7 @@ public class ConstantIntegerGenerator extends IntegerGenerator { } @Override - public int nextInt() { + public Integer nextValue() { return i; } diff --git a/core/src/main/java/com/yahoo/ycsb/generator/CounterGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/CounterGenerator.java index df37b2398c5f0f46e886d7df7367398f68d86b90..7ba7382df22e734e438e460f516dc2c74c7db8da 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/CounterGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/CounterGenerator.java @@ -22,9 +22,9 @@ import java.util.concurrent.atomic.AtomicInteger; /** * Generates a sequence of integers 0, 1, ... */ -public class CounterGenerator extends IntegerGenerator +public class CounterGenerator extends NumberGenerator { - final AtomicInteger counter; + private final AtomicInteger counter; /** * Create a counter that starts at countstart @@ -32,23 +32,18 @@ public class CounterGenerator extends IntegerGenerator public CounterGenerator(int countstart) { counter=new AtomicInteger(countstart); - setLastInt(counter.get()-1); } - /** - * If the generator returns numeric (integer) values, return the next value as an int. Default is to return -1, which - * is appropriate for generators that do not return numeric values. - */ - public int nextInt() + @Override + public Integer nextValue() { - int ret = counter.getAndIncrement(); - setLastInt(ret); - return ret; + return counter.getAndIncrement(); } + @Override - public int lastInt() + public Integer lastValue() { - return counter.get() - 1; + return counter.get() - 1; } @Override public double mean() { diff --git a/core/src/main/java/com/yahoo/ycsb/generator/DiscreteGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/DiscreteGenerator.java index c28f3ae771e1bbe667902e925bf0a16f0bdf8fe3..398c44c1e4d296b5f922d4aad2c7e31d39c9bb44 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/DiscreteGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/DiscreteGenerator.java @@ -17,42 +17,42 @@ package com.yahoo.ycsb.generator; -import java.util.Vector; -import java.util.Random; +import java.util.ArrayList; +import java.util.Collection; +import static java.util.Objects.requireNonNull; import com.yahoo.ycsb.Utils; -import com.yahoo.ycsb.WorkloadException; /** * Generates a distribution by choosing from a discrete set of values. */ -public class DiscreteGenerator extends Generator +public class DiscreteGenerator extends Generator<String> { - class Pair + private static class Pair { - public double _weight; - public String _value; + private double _weight; + private String _value; Pair(double weight, String value) { _weight=weight; - _value=value; + _value = requireNonNull(value); } } - Vector<Pair> _values; - String _lastvalue; + private final Collection<Pair> _values = new ArrayList<>(); + private String _lastvalue; public DiscreteGenerator() { - _values=new Vector<Pair>(); _lastvalue=null; } /** * Generate the next string in the distribution. */ - public String nextString() + @Override + public String nextValue() { double sum=0; @@ -65,31 +65,17 @@ public class DiscreteGenerator extends Generator for (Pair p : _values) { - if (val<p._weight/sum) + double pw = p._weight / sum; + if (val < pw) { return p._value; } - val-=p._weight/sum; + val -= pw; } - //should never get here. - System.out.println("oops. should not get here."); + throw new AssertionError("oops. should not get here."); - System.exit(0); - - return null; - } - - /** - * If the generator returns numeric (integer) values, return the next value as an int. Default is to return -1, which - * is appropriate for generators that do not return numeric values. - * - * @throws WorkloadException if this generator does not support integer values - */ - public int nextInt() throws WorkloadException - { - throw new WorkloadException("DiscreteGenerator does not support nextInt()"); } /** @@ -97,11 +83,12 @@ public class DiscreteGenerator extends Generator * Calling lastString() should not advance the distribution or have any side effects. If nextString() has not yet * been called, lastString() should return something reasonable. */ - public String lastString() + @Override + public String lastValue() { if (_lastvalue==null) { - _lastvalue=nextString(); + _lastvalue=nextValue(); } return _lastvalue; } diff --git a/core/src/main/java/com/yahoo/ycsb/generator/ExponentialGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/ExponentialGenerator.java index de1a2760c4b02b308666dbc7ceaefb9cc8805cfd..03318edc1c391019cb55beb41be0b1e3def00ae1 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/ExponentialGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/ExponentialGenerator.java @@ -17,20 +17,18 @@ package com.yahoo.ycsb.generator; -import java.util.Random; - import com.yahoo.ycsb.Utils; /** * A generator of an exponential distribution. It produces a sequence - * of time intervals (integers) according to an exponential + * of time intervals according to an exponential * distribution. Smaller intervals are more frequent than larger * ones, and there is no bound on the length of an interval. When you * construct an instance of this class, you specify a parameter gamma, * which corresponds to the rate at which events occur. * Alternatively, 1/gamma is the average length of an interval. */ -public class ExponentialGenerator extends IntegerGenerator +public class ExponentialGenerator extends NumberGenerator { // What percentage of the readings should be within the most recent exponential.frac portion of the dataset? public static final String EXPONENTIAL_PERCENTILE_PROPERTY="exponential.percentile"; @@ -43,7 +41,7 @@ public class ExponentialGenerator extends IntegerGenerator /** * The exponential constant to use. */ - double _gamma; + private double _gamma; /******************************* Constructors **************************************/ @@ -62,27 +60,16 @@ public class ExponentialGenerator extends IntegerGenerator /****************************************************************************************/ - /** - * Generate the next item. this distribution will be skewed toward lower integers; e.g. 0 will - * be the most popular, 1 the next most popular, etc. - * @param itemcount The number of items in the distribution. - * @return The next item in the sequence. - */ - @Override - public int nextInt() - { - return (int)nextLong(); - } /** - * Generate the next item as a long. - * - * @param itemcount The number of items in the distribution. - * @return The next item in the sequence. - */ - public long nextLong() + * Generate the next item as a long. This distribution will be skewed toward lower values; e.g. 0 will + * be the most popular, 1 the next most popular, etc. + * @return The next item in the sequence. + */ + @Override + public Double nextValue() { - return (long) (-Math.log(Utils.random().nextDouble()) / _gamma); + return -Math.log(Utils.random().nextDouble()) / _gamma; } @Override @@ -93,7 +80,7 @@ public class ExponentialGenerator extends IntegerGenerator ExponentialGenerator e = new ExponentialGenerator(90, 100); int j = 0; for(int i = 0; i < 1000; i++) { - if(e.nextInt() < 100) { + if(e.nextValue() < 100) { j++; } } diff --git a/core/src/main/java/com/yahoo/ycsb/generator/FileGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/FileGenerator.java index e39ffedceadf7586b70cb9c854c3d00523577f2a..ca10a1cb1bcd17dc4a2d339254850f2d59d425d3 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/FileGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/FileGenerator.java @@ -15,57 +15,48 @@ package com.yahoo.ycsb.generator; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStreamReader; +import java.io.FileReader; import java.io.BufferedReader; import java.io.IOException; +import java.io.Reader; /** * A generator, whose sequence is the lines of a file. */ -public class FileGenerator extends Generator +public class FileGenerator extends Generator<String> { - String filename; - String current; - BufferedReader reader; + private final String filename; + private String current; + private BufferedReader reader; /** * Create a FileGenerator with the given file. * @param _filename The file to read lines from. */ - public FileGenerator(String _filename) + public FileGenerator(String _filename) { - try { - filename = _filename; - File file = new File(filename); - FileInputStream in = new FileInputStream(file); - reader = new BufferedReader(new InputStreamReader(in)); - } catch(IOException e) { - System.err.println("Exception: " + e); - } + filename = _filename; + reloadFile(); } /** * Return the next string of the sequence, ie the next line of the file. */ - public synchronized String nextString() + @Override + public synchronized String nextValue() { try { return current = reader.readLine(); - } catch(NullPointerException e) { - System.err.println("NullPointerException: " + filename + ':' + current); - throw e; } catch(IOException e) { - System.err.println("Exception: " + e); - return null; + throw new RuntimeException(e); } } /** * Return the previous read line. */ - public String lastString() + @Override + public String lastValue() { return current; } @@ -73,16 +64,12 @@ public class FileGenerator extends Generator /** * Reopen the file to reuse values. */ - public synchronized void reloadFile() - { - try { + public synchronized void reloadFile() { + try (Reader r = reader) { System.err.println("Reload " + filename); - reader.close(); - File file = new File(filename); - FileInputStream in = new FileInputStream(file); - reader = new BufferedReader(new InputStreamReader(in)); - } catch(IOException e) { - System.err.println("Exception: " + e); - } + reader = new BufferedReader(new FileReader(filename)); + } catch (IOException e) { + throw new RuntimeException(e); + } } } diff --git a/core/src/main/java/com/yahoo/ycsb/generator/Generator.java b/core/src/main/java/com/yahoo/ycsb/generator/Generator.java index a0d2f2e6e70a54329dc2bee6be0008958edf62fd..73e5ca1a814895d14d5d4e9acc0f1b3e6697b46f 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/Generator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/Generator.java @@ -18,20 +18,30 @@ package com.yahoo.ycsb.generator; /** - * An expression that generates a sequence of string values, following some distribution (Uniform, Zipfian, Sequential, etc.) + * An expression that generates a sequence of values, following some distribution (Uniform, Zipfian, Sequential, etc.) */ -public abstract class Generator +public abstract class Generator<V> { /** - * Generate the next string in the distribution. + * Generate the next value in the distribution. */ - public abstract String nextString(); + public abstract V nextValue(); /** - * Return the previous string generated by the distribution; e.g., returned from the last nextString() call. - * Calling lastString() should not advance the distribution or have any side effects. If nextString() has not yet - * been called, lastString() should return something reasonable. + * Return the previous value generated by the distribution; e.g., returned from the last {@link Generator#nextValue()} call. + * Calling {@link #lastValue()} should not advance the distribution or have any side effects. If {@link #nextValue()} has not yet + * been called, {@link #lastValue()} should return something reasonable. */ - public abstract String lastString(); + public abstract V lastValue(); + + public final String nextString() { + V ret = nextValue(); + return ret == null ? null : ret.toString(); + } + + public final String lastString() { + V ret = lastValue(); + return ret == null ? null : ret.toString(); + } } diff --git a/core/src/main/java/com/yahoo/ycsb/generator/HistogramGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/HistogramGenerator.java index aba42c47b0c060a92b667c7d6808f3b608c37dac..55a2e8d9f78a050c21d237b0da840a9bad191b0c 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/HistogramGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/HistogramGenerator.java @@ -19,10 +19,8 @@ import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; -import java.util.Random; - import com.yahoo.ycsb.Utils; -import com.yahoo.ycsb.generator.IntegerGenerator; +import com.yahoo.ycsb.generator.NumberGenerator; /** * Generate integers according to a histogram distribution. The histogram @@ -38,44 +36,43 @@ import com.yahoo.ycsb.generator.IntegerGenerator; * @author snjones * */ -public class HistogramGenerator extends IntegerGenerator { +public class HistogramGenerator extends NumberGenerator { - long block_size; - long[] buckets; - long area; - long weighted_area = 0; - double mean_size = 0; + private final long block_size; + private final long[] buckets; + private long area; + private long weighted_area = 0; + private double mean_size = 0; public HistogramGenerator(String histogramfile) throws IOException { - BufferedReader in = new BufferedReader(new FileReader(histogramfile)); - String str; - String[] line; - - ArrayList<Integer> a = new ArrayList<Integer>(); - - str = in.readLine(); - if(str == null) { - throw new IOException("Empty input file!\n"); - } - line = str.split("\t"); - if(line[0].compareTo("BlockSize") != 0) { - throw new IOException("First line of histogram is not the BlockSize!\n"); - } - block_size = Integer.parseInt(line[1]); - - while((str = in.readLine()) != null){ - // [0] is the bucket, [1] is the value - line = str.split("\t"); - - a.add(Integer.parseInt(line[0]), Integer.parseInt(line[1])); - } - buckets = new long[a.size()]; - for(int i = 0; i < a.size(); i++) { - buckets[i] = a.get(i); - } - - in.close(); - init(); + try (BufferedReader in = new BufferedReader(new FileReader(histogramfile))) { + String str; + String[] line; + + ArrayList<Integer> a = new ArrayList<Integer>(); + + str = in.readLine(); + if(str == null) { + throw new IOException("Empty input file!\n"); + } + line = str.split("\t"); + if(line[0].compareTo("BlockSize") != 0) { + throw new IOException("First line of histogram is not the BlockSize!\n"); + } + block_size = Integer.parseInt(line[1]); + + while((str = in.readLine()) != null){ + // [0] is the bucket, [1] is the value + line = str.split("\t"); + + a.add(Integer.parseInt(line[0]), Integer.parseInt(line[1])); + } + buckets = new long[a.size()]; + for(int i = 0; i < a.size(); i++) { + buckets[i] = a.get(i); + } + } + init(); } public HistogramGenerator(long[] buckets, int block_size) { @@ -89,22 +86,22 @@ public class HistogramGenerator extends IntegerGenerator { weighted_area = i * buckets[i]; } // calculate average file size - mean_size = ((double)block_size) * ((double)weighted_area) / (double)(area); + mean_size = ((double)block_size) * ((double)weighted_area) / (area); } @Override - public int nextInt() { + public Long nextValue() { int number = Utils.random().nextInt((int)area); int i; for(i = 0; i < (buckets.length - 1); i++){ number -= buckets[i]; if(number <= 0){ - return (int)((i+1)*block_size); + return (i+1)*block_size; } } - return (int)(i * block_size); + return i * block_size; } @Override diff --git a/core/src/main/java/com/yahoo/ycsb/generator/HotspotIntegerGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/HotspotIntegerGenerator.java index 969ae7706d781b48e50f2289db602eb666a761d9..fafe8ff4e7d090fcc13a42fd046c3181122db730 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/HotspotIntegerGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/HotspotIntegerGenerator.java @@ -31,7 +31,7 @@ import com.yahoo.ycsb.Utils; * @author sudipto * */ -public class HotspotIntegerGenerator extends IntegerGenerator { +public class HotspotIntegerGenerator extends NumberGenerator { private final int lowerBound; private final int upperBound; @@ -75,7 +75,7 @@ public class HotspotIntegerGenerator extends IntegerGenerator { } @Override - public int nextInt() { + public Integer nextValue() { int value = 0; Random random = Utils.random(); if (random.nextDouble() < hotOpnFraction) { @@ -85,7 +85,7 @@ public class HotspotIntegerGenerator extends IntegerGenerator { // Choose a value from the cold set. value = lowerBound + hotInterval + random.nextInt(coldInterval); } - setLastInt(value); + setLastValue(value); return value; } diff --git a/core/src/main/java/com/yahoo/ycsb/generator/IntegerGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/NumberGenerator.java similarity index 67% rename from core/src/main/java/com/yahoo/ycsb/generator/IntegerGenerator.java rename to core/src/main/java/com/yahoo/ycsb/generator/NumberGenerator.java index 13d36cd1f1f423e7cd97b36789e2e02152d1ef09..59d89341044202b0dfa75582149f7956b3471b01 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/IntegerGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/NumberGenerator.java @@ -18,55 +18,29 @@ package com.yahoo.ycsb.generator; /** - * A generator that is capable of generating ints as well as strings + * A generator that is capable of generating numeric values * * @author cooperb * */ -public abstract class IntegerGenerator extends Generator +public abstract class NumberGenerator extends Generator<Number> { - int lastint; + private Number lastVal; /** - * Set the last value generated. IntegerGenerator subclasses must use this call - * to properly set the last string value, or the lastString() and lastInt() calls won't work. + * Set the last value generated. NumberGenerator subclasses must use this call + * to properly set the last value, or the {@link #lastValue()} calls won't work. */ - protected void setLastInt(int last) + protected void setLastValue(Number last) { - lastint=last; + lastVal=last; } + - /** - * Return the next value as an int. When overriding this method, be sure to call setLastString() properly, or the lastString() call won't work. - */ - public abstract int nextInt(); - - /** - * Generate the next string in the distribution. - */ - public String nextString() - { - return ""+nextInt(); - } - - /** - * Return the previous string generated by the distribution; e.g., returned from the last nextString() call. - * Calling lastString() should not advance the distribution or have any side effects. If nextString() has not yet - * been called, lastString() should return something reasonable. - */ @Override - public String lastString() - { - return ""+lastInt(); - } - - /** - * Return the previous int generated by the distribution. This call is unique to IntegerGenerator subclasses, and assumes - * IntegerGenerator subclasses always return ints for nextInt() (e.g. not arbitrary strings). - */ - public int lastInt() + public Number lastValue() { - return lastint; + return lastVal; } /** * Return the expected value (mean) of the values this generator will return. diff --git a/core/src/main/java/com/yahoo/ycsb/generator/ScrambledZipfianGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/ScrambledZipfianGenerator.java index 8b62c4c2bacef2c2c094c9c54b6a55e8ed8e7af9..8918c37117f618bc42009a35a83b1e0f5e57441d 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/ScrambledZipfianGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/ScrambledZipfianGenerator.java @@ -28,14 +28,14 @@ import com.yahoo.ycsb.Utils; * Unlike @ZipfianGenerator, this class scatters the "popular" items across the itemspace. Use this, instead of @ZipfianGenerator, if you * don't want the head of the distribution (the popular items) clustered together. */ -public class ScrambledZipfianGenerator extends IntegerGenerator +public class ScrambledZipfianGenerator extends NumberGenerator { public static final double ZETAN=26.46902820178302; public static final double USED_ZIPFIAN_CONSTANT=0.99; public static final long ITEM_COUNT=10000000000L; - ZipfianGenerator gen; - long _min,_max,_itemcount; + private ZipfianGenerator gen; + private final long _min,_max,_itemcount; /******************************* Constructors **************************************/ @@ -94,22 +94,15 @@ public class ScrambledZipfianGenerator extends IntegerGenerator /**************************************************************************************************/ - /** - * Return the next int in the sequence. - */ - @Override - public int nextInt() { - return (int)nextLong(); - } - /** * Return the next long in the sequence. */ - public long nextLong() + @Override + public Long nextValue() { - long ret=gen.nextLong(); + long ret=gen.nextValue(); ret=_min+Utils.FNVhash64(ret)%_itemcount; - setLastInt((int)ret); + setLastValue(ret); return ret; } @@ -123,7 +116,7 @@ public class ScrambledZipfianGenerator extends IntegerGenerator for (int i=0; i<1000000; i++) { - System.out.println(""+gen.nextInt()); + System.out.println(""+gen.nextValue()); } } @@ -132,6 +125,6 @@ public class ScrambledZipfianGenerator extends IntegerGenerator */ @Override public double mean() { - return ((double)(((long)_min) +(long)_max))/2.0; + return ((_min) +_max)/2.0; } } diff --git a/core/src/main/java/com/yahoo/ycsb/generator/SkewedLatestGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/SkewedLatestGenerator.java index 376eb7775c6b7cf6c44549728d4a03a4d47916b6..f52f3c44cd2471476e55acb5c53bb159d949eea6 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/SkewedLatestGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/SkewedLatestGenerator.java @@ -20,27 +20,28 @@ package com.yahoo.ycsb.generator; /** * Generate a popularity distribution of items, skewed to favor recent items significantly more than older items. */ -public class SkewedLatestGenerator extends IntegerGenerator +public class SkewedLatestGenerator extends NumberGenerator { - CounterGenerator _basis; - ZipfianGenerator _zipfian; + private CounterGenerator _basis; + private final ZipfianGenerator _zipfian; public SkewedLatestGenerator(CounterGenerator basis) { _basis=basis; - _zipfian=new ZipfianGenerator(_basis.lastInt()); - nextInt(); + _zipfian=new ZipfianGenerator(_basis.lastValue()); + nextValue(); } /** * Generate the next string in the distribution, skewed Zipfian favoring the items most recently returned by the basis generator. */ - public int nextInt() + @Override + public Long nextValue() { - int max=_basis.lastInt(); - int nextint=max-_zipfian.nextInt(max); - setLastInt(nextint); - return nextint; + long max=_basis.lastValue(); + long next=max-_zipfian.nextLong(max); + setLastValue(next); + return next; } public static void main(String[] args) diff --git a/core/src/main/java/com/yahoo/ycsb/generator/UniformGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/UniformGenerator.java index 43b9d3905568dd80837adb5229749aa1879e6757..5567225c3dd830e9c7c930c39ee50f515ac079ef 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/UniformGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/UniformGenerator.java @@ -17,26 +17,27 @@ package com.yahoo.ycsb.generator; -import java.util.Vector; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; /** - * An expression that generates a random integer in the specified range + * An expression that generates a random value in the specified range */ -public class UniformGenerator extends Generator +public class UniformGenerator extends Generator<String> { - Vector<String> _values; - String _laststring; - UniformIntegerGenerator _gen; + private final List<String> _values; + private String _laststring; + private final UniformIntegerGenerator _gen; /** * Creates a generator that will return strings from the specified set uniformly randomly */ - @SuppressWarnings( "unchecked" ) - public UniformGenerator(Vector<String> values) + public UniformGenerator(Collection<String> values) { - _values=(Vector<String>)values.clone(); + _values= new ArrayList<>(values); _laststring=null; _gen=new UniformIntegerGenerator(0,values.size()-1); } @@ -44,9 +45,10 @@ public class UniformGenerator extends Generator /** * Generate the next string in the distribution. */ - public String nextString() + @Override + public String nextValue() { - _laststring=_values.elementAt(_gen.nextInt()); + _laststring = _values.get(_gen.nextValue()); return _laststring; } @@ -55,11 +57,12 @@ public class UniformGenerator extends Generator * Calling lastString() should not advance the distribution or have any side effects. If nextString() has not yet * been called, lastString() should return something reasonable. */ - public String lastString() + @Override + public String lastValue() { if (_laststring==null) { - nextString(); + nextValue(); } return _laststring; } diff --git a/core/src/main/java/com/yahoo/ycsb/generator/UniformIntegerGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/UniformIntegerGenerator.java index fa6af1316ca3d156653d9b362f1f59debd451a97..3e2c99d9044ea8ac2e2e06dbcf70afdbade5d1ae 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/UniformIntegerGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/UniformIntegerGenerator.java @@ -17,16 +17,14 @@ package com.yahoo.ycsb.generator; -import java.util.Random; - import com.yahoo.ycsb.Utils; /** * Generates integers randomly uniform from an interval. */ -public class UniformIntegerGenerator extends IntegerGenerator +public class UniformIntegerGenerator extends NumberGenerator { - int _lb,_ub,_interval; + private final int _lb,_ub,_interval; /** * Creates a generator that will return integers uniformly randomly from the interval [lb,ub] inclusive (that is, lb and ub are possible values) @@ -42,16 +40,16 @@ public class UniformIntegerGenerator extends IntegerGenerator } @Override - public int nextInt() + public Integer nextValue() { int ret=Utils.random().nextInt(_interval)+_lb; - setLastInt(ret); + setLastValue(ret); return ret; } @Override public double mean() { - return ((double)((long)(_lb + (long)_ub))) / 2.0; + return ((_lb + (long)_ub)) / 2.0; } } diff --git a/core/src/main/java/com/yahoo/ycsb/generator/ZipfianGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/ZipfianGenerator.java index 017fa05e5723766bc5fbd12ffd950a0eb32a09c3..3bd445f75c657067477e4d2b4428735ac33758f8 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/ZipfianGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/ZipfianGenerator.java @@ -17,8 +17,6 @@ package com.yahoo.ycsb.generator; -import java.util.Random; - import com.yahoo.ycsb.Utils; /** @@ -39,34 +37,34 @@ import com.yahoo.ycsb.Utils; * * The algorithm used here is from "Quickly Generating Billion-Record Synthetic Databases", Jim Gray et al, SIGMOD 1994. */ -public class ZipfianGenerator extends IntegerGenerator +public class ZipfianGenerator extends NumberGenerator { public static final double ZIPFIAN_CONSTANT=0.99; /** * Number of items. */ - long items; + private final long items; /** * Min item to generate. */ - long base; + private final long base; /** * The zipfian constant to use. */ - double zipfianconstant; + private final double zipfianconstant; /** * Computed parameters for generating the distribution. */ - double alpha,zetan,eta,theta,zeta2theta; + private double alpha,zetan,eta,theta,zeta2theta; /** * The number of items used to compute zetan the last time. */ - long countforzeta; + private long countforzeta; /** * Flag to prevent problems. If you increase the number of items the zipfian generator is allowed to choose from, this code will incrementally compute a new zeta @@ -76,7 +74,7 @@ public class ZipfianGenerator extends IntegerGenerator * did the second thread think there were only 1000 items? maybe it read the item count before the first thread incremented it. So this flag allows you to say if you really do * want that recomputation. If true, then the code will recompute zeta if the itemcount goes down. If false, the code will assume itemcount only goes up, and never recompute. */ - boolean allowitemcountdecrease=false; + private boolean allowitemcountdecrease=false; /******************************* Constructors **************************************/ @@ -148,7 +146,7 @@ public class ZipfianGenerator extends IntegerGenerator eta=(1-Math.pow(2.0/items,1-theta))/(1-zeta2theta/zetan); //System.out.println("XXXX 3 XXXX"); - nextInt(); + nextValue(); //System.out.println("XXXX 4 XXXX"); } @@ -219,16 +217,6 @@ public class ZipfianGenerator extends IntegerGenerator /****************************************************************************************/ - /** - * Generate the next item. this distribution will be skewed toward lower integers; e.g. 0 will - * be the most popular, 1 the next most popular, etc. - * @param itemcount The number of items in the distribution. - * @return The next item in the sequence. - */ - public int nextInt(int itemcount) - { - return (int)nextLong(itemcount); - } /** * Generate the next item as a long. @@ -236,7 +224,7 @@ public class ZipfianGenerator extends IntegerGenerator * @param itemcount The number of items in the distribution. * @return The next item in the sequence. */ - public long nextLong(long itemcount) + long nextLong(long itemcount) { //from "Quickly Generating Billion-Record Synthetic Databases", Jim Gray et al, SIGMOD 1994 @@ -285,7 +273,7 @@ public class ZipfianGenerator extends IntegerGenerator } long ret=base+(long)((itemcount) * Math.pow(eta*u - eta + 1, alpha)); - setLastInt((int)ret); + setLastValue(ret); return ret; } @@ -295,17 +283,7 @@ public class ZipfianGenerator extends IntegerGenerator * popular items scattered throughout the item space, use ScrambledZipfianGenerator instead. */ @Override - public int nextInt() - { - return (int)nextLong(items); - } - - /** - * Return the next value, skewed by the Zipfian distribution. The 0th item will be the most popular, followed by the 1st, followed - * by the 2nd, etc. (Or, if min != 0, the min-th item is the most popular, the min+1th item the next most popular, etc.) If you want the - * popular items scattered throughout the item space, use ScrambledZipfianGenerator instead. - */ - public long nextLong() + public Long nextValue() { return nextLong(items); } diff --git a/core/src/main/java/com/yahoo/ycsb/measurements/Measurements.java b/core/src/main/java/com/yahoo/ycsb/measurements/Measurements.java index faa81ba04d564cde80061f5d1635cebd2180cbd5..fe1e9cc16707ee8b3dce8855f2a0d4a95995c85c 100644 --- a/core/src/main/java/com/yahoo/ycsb/measurements/Measurements.java +++ b/core/src/main/java/com/yahoo/ycsb/measurements/Measurements.java @@ -17,24 +17,36 @@ package com.yahoo.ycsb.measurements; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; + import java.io.IOException; import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; -import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; - /** * Collects latency measurements, and reports them when requested. * * @author cooperb * */ -public class Measurements -{ +public class Measurements { + /** + * All supported measurement types are defined in this enum. + * + */ + public enum MeasurementType { + HISTOGRAM, + HDRHISTOGRAM, + HDRHISTOGRAM_AND_HISTOGRAM, + HDRHISTOGRAM_AND_RAW, + TIMESERIES, + RAW + } public static final String MEASUREMENT_TYPE_PROPERTY = "measurementtype"; - - private static final String MEASUREMENT_TYPE_PROPERTY_DEFAULT = "histogram"; + private static final String MEASUREMENT_TYPE_PROPERTY_DEFAULT = "hdrhistogram"; + public static final String MEASUREMENT_INTERVAL = "measurement.interval"; private static final String MEASUREMENT_INTERVAL_DEFAULT = "op"; @@ -60,7 +72,7 @@ public class Measurements final ConcurrentHashMap<String,OneMeasurement> _opToMesurementMap; final ConcurrentHashMap<String,OneMeasurement> _opToIntendedMesurementMap; - final int _measurementType; + final MeasurementType _measurementType; final int _measurementInterval; private Properties _props; @@ -77,19 +89,27 @@ public class Measurements String mTypeString = _props.getProperty(MEASUREMENT_TYPE_PROPERTY, MEASUREMENT_TYPE_PROPERTY_DEFAULT); if (mTypeString.equals("histogram")) { - _measurementType = 0; + _measurementType = MeasurementType.HISTOGRAM; } else if (mTypeString.equals("hdrhistogram")) { - _measurementType = 1; + _measurementType = MeasurementType.HDRHISTOGRAM; } else if (mTypeString.equals("hdrhistogram+histogram")) { - _measurementType = 2; + _measurementType = MeasurementType.HDRHISTOGRAM_AND_HISTOGRAM; + } + else if (mTypeString.equals("hdrhistogram+raw")) + { + _measurementType = MeasurementType.HDRHISTOGRAM_AND_RAW; } else if (mTypeString.equals("timeseries")) { - _measurementType = 3; + _measurementType = MeasurementType.TIMESERIES; + } + else if (mTypeString.equals("raw")) + { + _measurementType = MeasurementType.RAW; } else { throw new IllegalArgumentException("unknown "+MEASUREMENT_TYPE_PROPERTY+"="+mTypeString); @@ -117,16 +137,24 @@ public class Measurements { switch (_measurementType) { - case 0: + case HISTOGRAM: return new OneMeasurementHistogram(name, _props); - case 1: + case HDRHISTOGRAM: return new OneMeasurementHdrHistogram(name, _props); - case 2: + case HDRHISTOGRAM_AND_HISTOGRAM: return new TwoInOneMeasurement(name, new OneMeasurementHdrHistogram("Hdr"+name, _props), new OneMeasurementHistogram("Bucket"+name, _props)); - default: + case HDRHISTOGRAM_AND_RAW: + return new TwoInOneMeasurement(name, + new OneMeasurementHdrHistogram("Hdr"+name, _props), + new OneMeasurementHistogram("Raw"+name, _props)); + case TIMESERIES: return new OneMeasurementTimeSeries(name, _props); + case RAW: + return new OneMeasurementRaw(name, _props); + default: + throw new AssertionError("Impossible to be here. Dead code reached. Bugs?"); } } @@ -146,7 +174,7 @@ public class Measurements ThreadLocal<StartTimeHolder> tlIntendedStartTime = new ThreadLocal<Measurements.StartTimeHolder>() { protected StartTimeHolder initialValue() { return new StartTimeHolder(); - }; + } }; public void setIntendedStartTimeNs(long time) { @@ -237,12 +265,12 @@ public class Measurements /** * Report a return code for a single DB operation. */ - public void reportReturnCode(String operation, int code) + public void reportStatus(final String operation, final Status status) { OneMeasurement m = _measurementInterval==1 ? getOpIntendedMeasurement(operation) : getOpMeasurement(operation); - m.reportReturnCode(code); + m.reportStatus(status); } /** diff --git a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurement.java b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurement.java index 45c6a561375363a59a8d490a902c4e13b5ab2b74..8d4d22da2754712d95c91e352012cd3c15f0f783 100644 --- a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurement.java +++ b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurement.java @@ -17,20 +17,21 @@ package com.yahoo.ycsb.measurements; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; + import java.io.IOException; -import java.util.concurrent.ConcurrentHashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; -import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; - /** * A single measured metric (such as READ LATENCY) */ public abstract class OneMeasurement { - String _name; - final ConcurrentHashMap<Integer, AtomicInteger> returncodes; + private final String _name; + private final ConcurrentHashMap<Status, AtomicInteger> _returncodes; public String getName() { return _name; @@ -41,7 +42,7 @@ public abstract class OneMeasurement { */ public OneMeasurement(String _name) { this._name = _name; - this.returncodes = new ConcurrentHashMap<Integer, AtomicInteger>(); + this._returncodes = new ConcurrentHashMap<Status, AtomicInteger>(); } public abstract void measure(int latency); @@ -51,12 +52,11 @@ public abstract class OneMeasurement { /** * No need for synchronization, using CHM to deal with that */ - public void reportReturnCode(int code) { - Integer Icode = code; - AtomicInteger counter = returncodes.get(Icode); + public void reportStatus(Status status) { + AtomicInteger counter = _returncodes.get(status); if (counter == null) { - AtomicInteger other = returncodes.putIfAbsent(Icode, counter = new AtomicInteger()); + AtomicInteger other = _returncodes.putIfAbsent(status, counter = new AtomicInteger()); if (other != null) { counter = other; } @@ -73,4 +73,9 @@ public abstract class OneMeasurement { */ public abstract void exportMeasurements(MeasurementsExporter exporter) throws IOException; + protected final void exportStatusCounts(MeasurementsExporter exporter) throws IOException { + for (Map.Entry<Status, AtomicInteger> entry : _returncodes.entrySet()) { + exporter.write(getName(), "Return=" + entry.getKey().getName(), entry.getValue().get()); + } + } } diff --git a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHdrHistogram.java b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHdrHistogram.java index 4754825f35888ee2e36c7193bc322f4a3c08c659..a88c2b81a97f297f0e8295e7bf7cf36fcd6c6f8c 100644 --- a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHdrHistogram.java +++ b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHdrHistogram.java @@ -23,8 +23,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; import java.text.DecimalFormat; -import java.util.Map; -import java.util.Properties; +import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import org.HdrHistogram.Histogram; @@ -34,8 +33,8 @@ import org.HdrHistogram.Recorder; import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; /** - * Take measurements and maintain a HdrHistogram of a given metric, such as - * READ LATENCY. + * Take measurements and maintain a HdrHistogram of a given metric, such as READ + * LATENCY. * * @author nitsanw * @@ -49,8 +48,21 @@ public class OneMeasurementHdrHistogram extends OneMeasurement { final Recorder histogram; Histogram totalHistogram; + /** + * The name of the property for deciding what percentile values to output. + */ + public static final String PERCENTILES_PROPERTY = "hdrhistogram.percentiles"; + + /** + * The default value for the hdrhistogram.percentiles property. + */ + public static final String PERCENTILES_PROPERTY_DEFAULT = "95,99"; + + List<Integer> percentiles; + public OneMeasurementHdrHistogram(String name, Properties props) { super(name); + percentiles = getPercentileValues(props.getProperty(PERCENTILES_PROPERTY, PERCENTILES_PROPERTY_DEFAULT)); boolean shouldLog = Boolean.parseBoolean(props.getProperty("hdrhistogram.fileoutput", "false")); if (!shouldLog) { log = null; @@ -92,7 +104,7 @@ public class OneMeasurementHdrHistogram extends OneMeasurement { public void exportMeasurements(MeasurementsExporter exporter) throws IOException { // accumulate the last interval which was not caught by status thread Histogram intervalHistogram = getIntervalHistogramAndAccumulate(); - if(histogramLogWriter != null) { + if (histogramLogWriter != null) { histogramLogWriter.outputIntervalHistogram(intervalHistogram); // we can close now log.close(); @@ -101,49 +113,88 @@ public class OneMeasurementHdrHistogram extends OneMeasurement { exporter.write(getName(), "AverageLatency(us)", totalHistogram.getMean()); exporter.write(getName(), "MinLatency(us)", totalHistogram.getMinValue()); exporter.write(getName(), "MaxLatency(us)", totalHistogram.getMaxValue()); - exporter.write(getName(), "95thPercentileLatency(ms)", totalHistogram.getValueAtPercentile(90)/1000); - exporter.write(getName(), "99thPercentileLatency(ms)", totalHistogram.getValueAtPercentile(99)/1000); - for (Map.Entry<Integer, AtomicInteger> entry : returncodes.entrySet()) { - exporter.write(getName(), "Return=" + entry.getKey(), entry.getValue().get()); + for (Integer percentile: percentiles) { + exporter.write(getName(), ordinal(percentile) + "PercentileLatency(us)", totalHistogram.getValueAtPercentile(percentile)); } + + exportStatusCounts(exporter); } - /** - * This is called periodically from the StatusThread. There's a single StatusThread per Client process. - * We optionally serialize the interval to log on this opportunity. - * @see com.yahoo.ycsb.measurements.OneMeasurement#getSummary() - */ - @Override - public String getSummary() { - Histogram intervalHistogram = getIntervalHistogramAndAccumulate(); - // we use the summary interval as the histogram file interval. - if(histogramLogWriter != null) { - histogramLogWriter.outputIntervalHistogram(intervalHistogram); - } + /** + * This is called periodically from the StatusThread. There's a single + * StatusThread per Client process. We optionally serialize the interval to + * log on this opportunity. + * + * @see com.yahoo.ycsb.measurements.OneMeasurement#getSummary() + */ + @Override + public String getSummary() { + Histogram intervalHistogram = getIntervalHistogramAndAccumulate(); + // we use the summary interval as the histogram file interval. + if (histogramLogWriter != null) { + histogramLogWriter.outputIntervalHistogram(intervalHistogram); + } - DecimalFormat d = new DecimalFormat("#.##"); - return "[" + getName() + - ": Count=" + intervalHistogram.getTotalCount() + - ", Max=" + intervalHistogram.getMaxValue() + - ", Min=" + intervalHistogram.getMinValue() + - ", Avg=" + d.format(intervalHistogram.getMean()) + - ", 90=" + d.format(intervalHistogram.getValueAtPercentile(90)) + - ", 99=" + d.format(intervalHistogram.getValueAtPercentile(99)) + - ", 99.9=" + d.format(intervalHistogram.getValueAtPercentile(99.9)) + - ", 99.99=" + d.format(intervalHistogram.getValueAtPercentile(99.99)) +"]"; - } + DecimalFormat d = new DecimalFormat("#.##"); + return "[" + getName() + ": Count=" + intervalHistogram.getTotalCount() + ", Max=" + + intervalHistogram.getMaxValue() + ", Min=" + intervalHistogram.getMinValue() + ", Avg=" + + d.format(intervalHistogram.getMean()) + ", 90=" + d.format(intervalHistogram.getValueAtPercentile(90)) + + ", 99=" + d.format(intervalHistogram.getValueAtPercentile(99)) + ", 99.9=" + + d.format(intervalHistogram.getValueAtPercentile(99.9)) + ", 99.99=" + + d.format(intervalHistogram.getValueAtPercentile(99.99)) + "]"; + } - private Histogram getIntervalHistogramAndAccumulate() { - Histogram intervalHistogram = histogram.getIntervalHistogram(); - // add this to the total time histogram. - if (totalHistogram == null) { - totalHistogram = intervalHistogram; - } - else { - totalHistogram.add(intervalHistogram); + private Histogram getIntervalHistogramAndAccumulate() { + Histogram intervalHistogram = histogram.getIntervalHistogram(); + // add this to the total time histogram. + if (totalHistogram == null) { + totalHistogram = intervalHistogram; + } else { + totalHistogram.add(intervalHistogram); + } + return intervalHistogram; + } + + /** + * Helper method to parse the given percentile value string + * + * @param percentileString - comma delimited string of Integer values + * @return An Integer List of percentile values + */ + private List<Integer> getPercentileValues(String percentileString) { + List<Integer> percentileValues = new ArrayList<Integer>(); + + try { + for (String rawPercentile: percentileString.split(",")) { + percentileValues.add(Integer.parseInt(rawPercentile)); + } + } catch(Exception e) { + // If the given hdrhistogram.percentiles value is unreadable for whatever reason, + // then calculate and return the default set. + System.err.println("[WARN] Couldn't read " + PERCENTILES_PROPERTY + " value: '" + percentileString + + "', the default of '" + PERCENTILES_PROPERTY_DEFAULT + "' will be used."); + e.printStackTrace(); + return getPercentileValues(PERCENTILES_PROPERTY_DEFAULT); } - return intervalHistogram; - } + return percentileValues; + } + + /** + * Helper method to find the ordinal of any number. eg 1 -> 1st + * @param i + * @return ordinal string + */ + private String ordinal(int i) { + String[] suffixes = new String[] { "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th" }; + switch (i % 100) { + case 11: + case 12: + case 13: + return i + "th"; + default: + return i + suffixes[i % 10]; + } + } } diff --git a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHistogram.java b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHistogram.java index d8305b30f32d7f730d78457600441d5f3414e88f..6e2ed0be5a4dcf241e913637e0f9c48e9593af8f 100644 --- a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHistogram.java +++ b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHistogram.java @@ -38,12 +38,40 @@ public class OneMeasurementHistogram extends OneMeasurement public static final String BUCKETS="histogram.buckets"; public static final String BUCKETS_DEFAULT="1000"; + + /** + * Specify the range of latencies to track in the histogram. + */ int _buckets; + + /** + * Groups operations in discrete blocks of 1ms width. + */ int[] histogram; + + /** + * Counts all operations outside the histogram's range. + */ int histogramoverflow; + + /** + * The total number of reported operations. + */ int operations; + + /** + * The sum of each latency measurement over all operations. + * Calculated in ms. + */ long totallatency; + /** + * The sum of each latency measurement squared over all operations. + * Used to calculate variance of latency. + * Calculated in ms. + */ + double totalsquaredlatency; + //keep a windowed version of these stats for printing status int windowoperations; long windowtotallatency; @@ -59,6 +87,7 @@ public class OneMeasurementHistogram extends OneMeasurement histogramoverflow=0; operations=0; totallatency=0; + totalsquaredlatency=0; windowoperations=0; windowtotallatency=0; min=-1; @@ -70,6 +99,7 @@ public class OneMeasurementHistogram extends OneMeasurement */ public synchronized void measure(int latency) { + //latency reported in us and collected in bucket by ms. if (latency/1000>=_buckets) { histogramoverflow++; @@ -79,9 +109,10 @@ public class OneMeasurementHistogram extends OneMeasurement histogram[latency/1000]++; } operations++; - totallatency+=latency; + totallatency += latency; + totalsquaredlatency += ((double)latency) * ((double)latency); windowoperations++; - windowtotallatency+=latency; + windowtotallatency += latency; if ( (min<0) || (latency<min) ) { @@ -97,8 +128,11 @@ public class OneMeasurementHistogram extends OneMeasurement @Override public void exportMeasurements(MeasurementsExporter exporter) throws IOException { + double mean = totallatency/((double)operations); + double variance = totalsquaredlatency/((double)operations) - (mean * mean); exporter.write(getName(), "Operations", operations); - exporter.write(getName(), "AverageLatency(us)", (((double)totallatency)/((double)operations))); + exporter.write(getName(), "AverageLatency(us)", mean); + exporter.write(getName(), "LatencyVariance(us)", variance); exporter.write(getName(), "MinLatency(us)", min); exporter.write(getName(), "MaxLatency(us)", max); @@ -109,19 +143,17 @@ public class OneMeasurementHistogram extends OneMeasurement opcounter+=histogram[i]; if ( (!done95th) && (((double)opcounter)/((double)operations)>=0.95) ) { - exporter.write(getName(), "95thPercentileLatency(ms)", i); + exporter.write(getName(), "95thPercentileLatency(us)", i*1000); done95th=true; } if (((double)opcounter)/((double)operations)>=0.99) { - exporter.write(getName(), "99thPercentileLatency(ms)", i); + exporter.write(getName(), "99thPercentileLatency(us)", i*1000); break; } } - for (Map.Entry<Integer, AtomicInteger> entry : returncodes.entrySet()) { - exporter.write(getName(), "Return=" + entry.getKey(), entry.getValue().get()); - } + exportStatusCounts(exporter); for (int i=0; i<_buckets; i++) { diff --git a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementRaw.java b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementRaw.java new file mode 100644 index 0000000000000000000000000000000000000000..15c3f18304b5a3cd21e88b5f59afc82801da863c --- /dev/null +++ b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementRaw.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2015 Google Inc. 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. + */ + +package com.yahoo.ycsb.measurements; + +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.Properties; +import java.util.LinkedList; +import java.util.Collections; +import java.util.Comparator; +import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; + +/** + * Record a series of measurements as raw data points without down sampling, + * optionally write to an output file when configured. + * + * @author stfeng + * + */ +public class OneMeasurementRaw extends OneMeasurement { + /** + * One raw data point, two fields: timestamp (ms) when the datapoint is + * inserted, and the value. + */ + class RawDataPoint { + private final long timestamp; + private final int value; + + public RawDataPoint(int value) { + this.timestamp = System.currentTimeMillis(); + this.value = value; + } + + public long timeStamp() { + return timestamp; + } + + public int value() { + return value; + } + } + + class RawDataPointComparator implements Comparator<RawDataPoint> { + @Override + public int compare(RawDataPoint p1, RawDataPoint p2){ + if (p1.value() < p2.value()){ + return -1; + } else if (p1.value() == p2.value()) { + return 0; + } else { + return 1; + } + } + } + + /** + * Optionally, user can configure an output file to save the raw data points. + * Default is none, raw results will be written to stdout. + * + */ + public static final String OUTPUT_FILE_PATH = "measurement.raw.output_file"; + public static final String OUTPUT_FILE_PATH_DEFAULT = ""; + + /** + * Optionally, user can request to not output summary stats. This is useful + * if the user chains the raw measurement type behind the HdrHistogram type + * which already outputs summary stats. But even in that case, the user may + * still want this class to compute summary stats for them, especially if + * they want accurate computation of percentiles (because percentils computed + * by histogram classes are still approximations). + */ + public static final String NO_SUMMARY_STATS = "measurement.raw.no_summary"; + public static final String NO_SUMMARY_STATS_DEFAULT = "false"; + + private String outputFilePath = ""; + private final PrintStream outputStream; + + private boolean noSummaryStats = false; + + private LinkedList<RawDataPoint> measurements; + private long totalLatency = 0; + + // A window of stats to print summary for at the next getSummary() call. + // It's supposed to be a one line summary, so we will just print count and + // average. + private int windowOperations = 0; + private long windowTotalLatency = 0; + + public OneMeasurementRaw(String name, Properties props) { + super(name); + + outputFilePath = props.getProperty(OUTPUT_FILE_PATH, + OUTPUT_FILE_PATH_DEFAULT); + if (!outputFilePath.isEmpty()) { + System.out.println("Raw data measurement: will output to result file: " + + outputFilePath); + + try { + outputStream = new PrintStream( + new FileOutputStream(outputFilePath, true), + true); + } catch (FileNotFoundException e) { + throw new RuntimeException("Failed to open raw data output file", e); + } + + } else{ + System.out.println("Raw data measurement: will output to stdout."); + outputStream = System.out; + + } + + noSummaryStats = Boolean.parseBoolean(props.getProperty(NO_SUMMARY_STATS, + NO_SUMMARY_STATS_DEFAULT)); + + measurements = new LinkedList<RawDataPoint>(); + } + + @Override + public synchronized void measure(int latency) { + totalLatency += latency; + windowTotalLatency += latency; + windowOperations++; + + measurements.add(new RawDataPoint(latency)); + } + + @Override + public void exportMeasurements(MeasurementsExporter exporter) + throws IOException { + // Output raw data points first then print out a summary of percentiles to + // stdout. + + outputStream.println(getName() + + " latency raw data: op, timestamp(ms), latency(us)"); + for (RawDataPoint point : measurements) { + outputStream.println( + String.format("%s,%d,%d", getName(), point.timeStamp(), + point.value())); + } + if (outputStream != System.out) { + outputStream.close(); + } + + int totalOps = measurements.size(); + exporter.write(getName(), "Total Operations", totalOps); + if (totalOps > 0 && !noSummaryStats) { + exporter.write(getName(), + "Below is a summary of latency in microseconds:", -1); + exporter.write(getName(), "Average", + (double)totalLatency / (double)totalOps); + + Collections.sort(measurements, new RawDataPointComparator()); + + exporter.write(getName(), "Min", measurements.get(0).value()); + exporter.write( + getName(), "Max", measurements.get(totalOps - 1).value()); + exporter.write( + getName(), "p1", measurements.get((int)(totalOps*0.01)).value()); + exporter.write( + getName(), "p5", measurements.get((int)(totalOps*0.05)).value()); + exporter.write( + getName(), "p50", measurements.get((int)(totalOps*0.5)).value()); + exporter.write( + getName(), "p90", measurements.get((int)(totalOps*0.9)).value()); + exporter.write( + getName(), "p95", measurements.get((int)(totalOps*0.95)).value()); + exporter.write( + getName(), "p99", measurements.get((int)(totalOps*0.99)).value()); + exporter.write(getName(), "p99.9", + measurements.get((int)(totalOps*0.999)).value()); + exporter.write(getName(), "p99.99", + measurements.get((int)(totalOps*0.9999)).value()); + } + + exportStatusCounts(exporter); + } + + @Override + public synchronized String getSummary() { + if (windowOperations == 0) { + return ""; + } + + String toReturn = String.format("%s count: %d, average latency(us): %.2f", + getName(), windowOperations, + (double)windowTotalLatency / (double)windowOperations); + + windowTotalLatency=0; + windowOperations=0; + + return toReturn; + } +} diff --git a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.java b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.java index d4871660ac8dd8051c1756238e819f04da1af996..5e8dea01f8d1324c93e151d11476480d15ccefbd 100644 --- a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.java +++ b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.java @@ -76,7 +76,7 @@ public class OneMeasurementTimeSeries extends OneMeasurement _measurements=new Vector<SeriesUnit>(); } - void checkEndOfUnit(boolean forceend) + synchronized void checkEndOfUnit(boolean forceend) { long now=System.currentTimeMillis(); @@ -125,24 +125,18 @@ public class OneMeasurementTimeSeries extends OneMeasurement @Override - public void exportMeasurements(MeasurementsExporter exporter) throws IOException - { + public void exportMeasurements(MeasurementsExporter exporter) throws IOException { checkEndOfUnit(true); exporter.write(getName(), "Operations", operations); - exporter.write(getName(), "AverageLatency(us)", (((double)totallatency)/((double)operations))); + exporter.write(getName(), "AverageLatency(us)", (((double) totallatency) / ((double) operations))); exporter.write(getName(), "MinLatency(us)", min); exporter.write(getName(), "MaxLatency(us)", max); - //TODO: 95th and 99th percentile latency - + // TODO: 95th and 99th percentile latency - for (Map.Entry<Integer, AtomicInteger> entry : returncodes.entrySet()) { - exporter.write(getName(), "Return=" + entry.getKey(), entry.getValue().get()); - } - - for (SeriesUnit unit : _measurements) - { + exportStatusCounts(exporter); + for (SeriesUnit unit : _measurements) { exporter.write(getName(), Long.toString(unit.time), unit.average); } } diff --git a/core/src/main/java/com/yahoo/ycsb/measurements/TwoInOneMeasurement.java b/core/src/main/java/com/yahoo/ycsb/measurements/TwoInOneMeasurement.java index 0a191e4edccd9730c9eced2f8c2e9b94fe4052d0..37a385bb177c002171025a7d74e8dec743f6d99f 100644 --- a/core/src/main/java/com/yahoo/ycsb/measurements/TwoInOneMeasurement.java +++ b/core/src/main/java/com/yahoo/ycsb/measurements/TwoInOneMeasurement.java @@ -17,11 +17,12 @@ package com.yahoo.ycsb.measurements; -import java.io.IOException; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; import org.HdrHistogram.Recorder; -import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; +import java.io.IOException; /** * delegates to 2 measurement instances. @@ -40,10 +41,11 @@ public class TwoInOneMeasurement extends OneMeasurement { /** * No need for synchronization, using CHM to deal with that * - * @see com.yahoo.ycsb.OneMeasurement#reportReturnCode(int) + * @see com.yahoo.ycsb.OneMeasurement#reportStatus(int) */ - public void reportReturnCode(int code) { - thing1.reportReturnCode(code); + @Override + public void reportStatus(final Status status) { + thing1.reportStatus(status); } /** @@ -52,6 +54,7 @@ public class TwoInOneMeasurement extends OneMeasurement { * * @see com.yahoo.ycsb.OneMeasurement#measure(int) */ + @Override public void measure(int latencyInMicros) { thing1.measure(latencyInMicros); thing2.measure(latencyInMicros); diff --git a/core/src/main/java/com/yahoo/ycsb/workloads/ConstantOccupancyWorkload.java b/core/src/main/java/com/yahoo/ycsb/workloads/ConstantOccupancyWorkload.java index 6a5e7d025d93e21be5ebb099965437abda3c7cd8..3f367c7a624a1184ef2aaf4abc145b04e5540d20 100644 --- a/core/src/main/java/com/yahoo/ycsb/workloads/ConstantOccupancyWorkload.java +++ b/core/src/main/java/com/yahoo/ycsb/workloads/ConstantOccupancyWorkload.java @@ -20,7 +20,7 @@ import java.util.Properties; import com.yahoo.ycsb.WorkloadException; import com.yahoo.ycsb.Client; -import com.yahoo.ycsb.generator.IntegerGenerator; +import com.yahoo.ycsb.generator.NumberGenerator; /** * A disk-fragmenting workload. @@ -45,12 +45,11 @@ import com.yahoo.ycsb.generator.IntegerGenerator; * */ public class ConstantOccupancyWorkload extends CoreWorkload { - long disksize; - long storageages; - IntegerGenerator objectsizes; + private long disksize; + private long storageages; double occupancy; - long object_count; + private long object_count; public static final String STORAGE_AGE_PROPERTY = "storageages"; public static final long STORAGE_AGE_PROPERTY_DEFAULT = 10; @@ -64,26 +63,26 @@ public class ConstantOccupancyWorkload extends CoreWorkload { @Override public void init(Properties p) throws WorkloadException { - disksize = Long.parseLong( p.getProperty(DISK_SIZE_PROPERTY, DISK_SIZE_PROPERTY_DEFAULT+"")); - storageages = Long.parseLong( p.getProperty(STORAGE_AGE_PROPERTY, STORAGE_AGE_PROPERTY_DEFAULT+"")); - occupancy = Double.parseDouble(p.getProperty(OCCUPANCY_PROPERTY, OCCUPANCY_PROPERTY_DEFAULT+"")); + disksize = Long.parseLong( p.getProperty(DISK_SIZE_PROPERTY, String.valueOf(DISK_SIZE_PROPERTY_DEFAULT))); + storageages = Long.parseLong( p.getProperty(STORAGE_AGE_PROPERTY, String.valueOf(STORAGE_AGE_PROPERTY_DEFAULT))); + occupancy = Double.parseDouble(p.getProperty(OCCUPANCY_PROPERTY, String.valueOf(OCCUPANCY_PROPERTY_DEFAULT))); if(p.getProperty(Client.RECORD_COUNT_PROPERTY) != null || p.getProperty(Client.INSERT_COUNT_PROPERTY) != null || p.getProperty(Client.OPERATION_COUNT_PROPERTY) != null) { System.err.println("Warning: record, insert or operation count was set prior to initting ConstantOccupancyWorkload. Overriding old values."); } - IntegerGenerator g = CoreWorkload.getFieldLengthGenerator(p); + NumberGenerator g = CoreWorkload.getFieldLengthGenerator(p); double fieldsize = g.mean(); int fieldcount = Integer.parseInt(p.getProperty(FIELD_COUNT_PROPERTY, FIELD_COUNT_PROPERTY_DEFAULT)); - object_count = (long)(occupancy * ((double)disksize / (fieldsize * (double)fieldcount))); + object_count = (long)(occupancy * (disksize / (fieldsize * fieldcount))); if(object_count == 0) { throw new IllegalStateException("Object count was zero. Perhaps disksize is too low?"); } - p.setProperty(Client.RECORD_COUNT_PROPERTY, object_count+""); - p.setProperty(Client.OPERATION_COUNT_PROPERTY, (storageages*object_count)+""); - p.setProperty(Client.INSERT_COUNT_PROPERTY, object_count+""); + p.setProperty(Client.RECORD_COUNT_PROPERTY, String.valueOf(object_count)); + p.setProperty(Client.OPERATION_COUNT_PROPERTY, String.valueOf(storageages*object_count)); + p.setProperty(Client.INSERT_COUNT_PROPERTY, String.valueOf(object_count)); super.init(p); } diff --git a/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java b/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java index b4a477b40e8371eca90a8da07b2a4b7aaae9ac59..ad127d8b464aaf059f08495834b7cd257afde8bc 100644 --- a/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java +++ b/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java @@ -1,11 +1,11 @@ /** - * Copyright (c) 2010 Yahoo! Inc. All rights reserved. - * + * Copyright (c) 2010 Yahoo! Inc. 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 + * 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, @@ -20,14 +20,14 @@ package com.yahoo.ycsb.workloads; import java.util.Properties; import com.yahoo.ycsb.*; +import com.yahoo.ycsb.generator.AcknowledgedCounterGenerator; import com.yahoo.ycsb.generator.CounterGenerator; import com.yahoo.ycsb.generator.DiscreteGenerator; import com.yahoo.ycsb.generator.ExponentialGenerator; -import com.yahoo.ycsb.generator.Generator; import com.yahoo.ycsb.generator.ConstantIntegerGenerator; import com.yahoo.ycsb.generator.HotspotIntegerGenerator; import com.yahoo.ycsb.generator.HistogramGenerator; -import com.yahoo.ycsb.generator.IntegerGenerator; +import com.yahoo.ycsb.generator.NumberGenerator; import com.yahoo.ycsb.generator.ScrambledZipfianGenerator; import com.yahoo.ycsb.generator.SkewedLatestGenerator; import com.yahoo.ycsb.generator.UniformIntegerGenerator; @@ -43,115 +43,127 @@ import java.util.Map; import java.util.ArrayList; /** - * The core benchmark scenario. Represents a set of clients doing simple CRUD operations. The relative - * proportion of different kinds of operations, and other properties of the workload, are controlled - * by parameters specified at runtime. - * + * The core benchmark scenario. Represents a set of clients doing simple CRUD operations. The + * relative proportion of different kinds of operations, and other properties of the workload, + * are controlled by parameters specified at runtime. + * * Properties to control the client: * <UL> * <LI><b>fieldcount</b>: the number of fields in a record (default: 10) * <LI><b>fieldlength</b>: the size of each field (default: 100) * <LI><b>readallfields</b>: should reads read all fields (true) or just one (false) (default: true) - * <LI><b>writeallfields</b>: should updates and read/modify/writes update all fields (true) or just one (false) (default: false) + * <LI><b>writeallfields</b>: should updates and read/modify/writes update all fields (true) or just + * one (false) (default: false) * <LI><b>readproportion</b>: what proportion of operations should be reads (default: 0.95) * <LI><b>updateproportion</b>: what proportion of operations should be updates (default: 0.05) * <LI><b>insertproportion</b>: what proportion of operations should be inserts (default: 0) * <LI><b>scanproportion</b>: what proportion of operations should be scans (default: 0) - * <LI><b>readmodifywriteproportion</b>: what proportion of operations should be read a record, modify it, write it back (default: 0) - * <LI><b>requestdistribution</b>: what distribution should be used to select the records to operate on - uniform, zipfian, hotspot, or latest (default: uniform) + * <LI><b>readmodifywriteproportion</b>: what proportion of operations should be read a record, + * modify it, write it back (default: 0) + * <LI><b>requestdistribution</b>: what distribution should be used to select the records to operate + * on - uniform, zipfian, hotspot, or latest (default: uniform) * <LI><b>maxscanlength</b>: for scans, what is the maximum number of records to scan (default: 1000) - * <LI><b>scanlengthdistribution</b>: for scans, what distribution should be used to choose the number of records to scan, for each scan, between 1 and maxscanlength (default: uniform) - * <LI><b>insertorder</b>: should records be inserted in order by key ("ordered"), or in hashed order ("hashed") (default: hashed) - * </ul> + * <LI><b>scanlengthdistribution</b>: for scans, what distribution should be used to choose the + * number of records to scan, for each scan, between 1 and maxscanlength (default: uniform) + * <LI><b>insertorder</b>: should records be inserted in order by key ("ordered"), or in hashed + * order ("hashed") (default: hashed) + * </ul> */ -public class CoreWorkload extends Workload -{ - - /** - * The name of the database table to run queries against. - */ - public static final String TABLENAME_PROPERTY="table"; - - /** - * The default name of the database table to run queries against. - */ - public static final String TABLENAME_PROPERTY_DEFAULT="usertable"; - - public static String table; - - - /** - * The name of the property for the number of fields in a record. - */ - public static final String FIELD_COUNT_PROPERTY="fieldcount"; - - /** - * Default number of fields in a record. - */ - public static final String FIELD_COUNT_PROPERTY_DEFAULT="10"; - - int fieldcount; - - private List<String> fieldnames; - - /** - * The name of the property for the field length distribution. Options are "uniform", "zipfian" (favoring short records), "constant", and "histogram". - * - * If "uniform", "zipfian" or "constant", the maximum field length will be that specified by the fieldlength property. If "histogram", then the - * histogram will be read from the filename specified in the "fieldlengthhistogram" property. - */ - public static final String FIELD_LENGTH_DISTRIBUTION_PROPERTY="fieldlengthdistribution"; - /** - * The default field length distribution. - */ - public static final String FIELD_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT = "constant"; - - /** - * The name of the property for the length of a field in bytes. - */ - public static final String FIELD_LENGTH_PROPERTY="fieldlength"; - /** - * The default maximum length of a field in bytes. - */ - public static final String FIELD_LENGTH_PROPERTY_DEFAULT="100"; - - /** - * The name of a property that specifies the filename containing the field length histogram (only used if fieldlengthdistribution is "histogram"). - */ - public static final String FIELD_LENGTH_HISTOGRAM_FILE_PROPERTY = "fieldlengthhistogram"; - /** - * The default filename containing a field length histogram. - */ - public static final String FIELD_LENGTH_HISTOGRAM_FILE_PROPERTY_DEFAULT = "hist.txt"; - - /** - * Generator object that produces field lengths. The value of this depends on the properties that start with "FIELD_LENGTH_". - */ - IntegerGenerator fieldlengthgenerator; - - /** - * The name of the property for deciding whether to read one field (false) or all fields (true) of a record. - */ - public static final String READ_ALL_FIELDS_PROPERTY="readallfields"; - - /** - * The default value for the readallfields property. - */ - public static final String READ_ALL_FIELDS_PROPERTY_DEFAULT="true"; - - boolean readallfields; - - /** - * The name of the property for deciding whether to write one field (false) or all fields (true) of a record. - */ - public static final String WRITE_ALL_FIELDS_PROPERTY="writeallfields"; - - /** - * The default value for the writeallfields property. - */ - public static final String WRITE_ALL_FIELDS_PROPERTY_DEFAULT="false"; - - boolean writeallfields; +public class CoreWorkload extends Workload { + /** + * The name of the database table to run queries against. + */ + public static final String TABLENAME_PROPERTY = "table"; + + /** + * The default name of the database table to run queries against. + */ + public static final String TABLENAME_PROPERTY_DEFAULT = "usertable"; + + public static String table; + + + /** + * The name of the property for the number of fields in a record. + */ + public static final String FIELD_COUNT_PROPERTY = "fieldcount"; + + /** + * Default number of fields in a record. + */ + public static final String FIELD_COUNT_PROPERTY_DEFAULT = "10"; + + int fieldcount; + + private List<String> fieldnames; + + /** + * The name of the property for the field length distribution. Options are "uniform", "zipfian" + * (favoring short records), "constant", and "histogram". + * + * If "uniform", "zipfian" or "constant", the maximum field length will be that specified by the + * fieldlength property. If "histogram", then the + * histogram will be read from the filename specified in the "fieldlengthhistogram" property. + */ + public static final String FIELD_LENGTH_DISTRIBUTION_PROPERTY = "fieldlengthdistribution"; + + /** + * The default field length distribution. + */ + public static final String FIELD_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT = "constant"; + + /** + * The name of the property for the length of a field in bytes. + */ + public static final String FIELD_LENGTH_PROPERTY = "fieldlength"; + + /** + * The default maximum length of a field in bytes. + */ + public static final String FIELD_LENGTH_PROPERTY_DEFAULT = "100"; + + /** + * The name of a property that specifies the filename containing the field length histogram (only + * used if fieldlengthdistribution is "histogram"). + */ + public static final String FIELD_LENGTH_HISTOGRAM_FILE_PROPERTY = "fieldlengthhistogram"; + + /** + * The default filename containing a field length histogram. + */ + public static final String FIELD_LENGTH_HISTOGRAM_FILE_PROPERTY_DEFAULT = "hist.txt"; + + /** + * Generator object that produces field lengths. The value of this depends on the properties that + * start with "FIELD_LENGTH_". + */ + NumberGenerator fieldlengthgenerator; + + /** + * The name of the property for deciding whether to read one field (false) or all fields (true) of + * a record. + */ + public static final String READ_ALL_FIELDS_PROPERTY = "readallfields"; + + /** + * The default value for the readallfields property. + */ + public static final String READ_ALL_FIELDS_PROPERTY_DEFAULT = "true"; + + boolean readallfields; + + /** + * The name of the property for deciding whether to write one field (false) or all fields (true) + * of a record. + */ + public static final String WRITE_ALL_FIELDS_PROPERTY = "writeallfields"; + + /** + * The default value for the writeallfields property. + */ + public static final String WRITE_ALL_FIELDS_PROPERTY_DEFAULT = "false"; + + boolean writeallfields; /** @@ -159,7 +171,7 @@ public class CoreWorkload extends Workload * data against the formation template to ensure data integrity. */ public static final String DATA_INTEGRITY_PROPERTY = "dataintegrity"; - + /** * The default value for the dataintegrity property. */ @@ -172,346 +184,361 @@ public class CoreWorkload extends Workload private boolean dataintegrity; /** - * Response values for data integrity checks. - * Need to be multiples of 1000 to match bucket offsets of - * measurements/OneMeasurementHistogram.java. - */ - private final int DATA_INT_MATCH = 0; - private final int DATA_INT_DEVIATE = 1000; - private final int DATA_INT_UNEXPECTED_NULL = 2000; - - - /** - * The name of the property for the proportion of transactions that are reads. - */ - public static final String READ_PROPORTION_PROPERTY="readproportion"; - - /** - * The default proportion of transactions that are reads. - */ - public static final String READ_PROPORTION_PROPERTY_DEFAULT="0.95"; - - /** - * The name of the property for the proportion of transactions that are updates. - */ - public static final String UPDATE_PROPORTION_PROPERTY="updateproportion"; - - /** - * The default proportion of transactions that are updates. - */ - public static final String UPDATE_PROPORTION_PROPERTY_DEFAULT="0.05"; - - /** - * The name of the property for the proportion of transactions that are inserts. - */ - public static final String INSERT_PROPORTION_PROPERTY="insertproportion"; - - /** - * The default proportion of transactions that are inserts. - */ - public static final String INSERT_PROPORTION_PROPERTY_DEFAULT="0.0"; - - /** - * The name of the property for the proportion of transactions that are scans. - */ - public static final String SCAN_PROPORTION_PROPERTY="scanproportion"; - - /** - * The default proportion of transactions that are scans. - */ - public static final String SCAN_PROPORTION_PROPERTY_DEFAULT="0.0"; - - /** - * The name of the property for the proportion of transactions that are read-modify-write. - */ - public static final String READMODIFYWRITE_PROPORTION_PROPERTY="readmodifywriteproportion"; - - /** - * The default proportion of transactions that are scans. - */ - public static final String READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT="0.0"; - - /** - * The name of the property for the the distribution of requests across the keyspace. Options are "uniform", "zipfian" and "latest" - */ - public static final String REQUEST_DISTRIBUTION_PROPERTY="requestdistribution"; - - /** - * The default distribution of requests across the keyspace - */ - public static final String REQUEST_DISTRIBUTION_PROPERTY_DEFAULT="uniform"; - - /** - * The name of the property for the max scan length (number of records) - */ - public static final String MAX_SCAN_LENGTH_PROPERTY="maxscanlength"; - - /** - * The default max scan length. - */ - public static final String MAX_SCAN_LENGTH_PROPERTY_DEFAULT="1000"; - - /** - * The name of the property for the scan length distribution. Options are "uniform" and "zipfian" (favoring short scans) - */ - public static final String SCAN_LENGTH_DISTRIBUTION_PROPERTY="scanlengthdistribution"; - - /** - * The default max scan length. - */ - public static final String SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT="uniform"; - - /** - * The name of the property for the order to insert records. Options are "ordered" or "hashed" - */ - public static final String INSERT_ORDER_PROPERTY="insertorder"; - - /** - * Default insert order. - */ - public static final String INSERT_ORDER_PROPERTY_DEFAULT="hashed"; - - /** + * The name of the property for the proportion of transactions that are reads. + */ + public static final String READ_PROPORTION_PROPERTY = "readproportion"; + + /** + * The default proportion of transactions that are reads. + */ + public static final String READ_PROPORTION_PROPERTY_DEFAULT = "0.95"; + + /** + * The name of the property for the proportion of transactions that are updates. + */ + public static final String UPDATE_PROPORTION_PROPERTY = "updateproportion"; + + /** + * The default proportion of transactions that are updates. + */ + public static final String UPDATE_PROPORTION_PROPERTY_DEFAULT = "0.05"; + + /** + * The name of the property for the proportion of transactions that are inserts. + */ + public static final String INSERT_PROPORTION_PROPERTY = "insertproportion"; + + /** + * The default proportion of transactions that are inserts. + */ + public static final String INSERT_PROPORTION_PROPERTY_DEFAULT = "0.0"; + + /** + * The name of the property for the proportion of transactions that are scans. + */ + public static final String SCAN_PROPORTION_PROPERTY = "scanproportion"; + + /** + * The default proportion of transactions that are scans. + */ + public static final String SCAN_PROPORTION_PROPERTY_DEFAULT = "0.0"; + + /** + * The name of the property for the proportion of transactions that are read-modify-write. + */ + public static final String READMODIFYWRITE_PROPORTION_PROPERTY = "readmodifywriteproportion"; + + /** + * The default proportion of transactions that are scans. + */ + public static final String READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT = "0.0"; + + /** + * The name of the property for the the distribution of requests across the keyspace. Options are + * "uniform", "zipfian" and "latest" + */ + public static final String REQUEST_DISTRIBUTION_PROPERTY = "requestdistribution"; + + /** + * The default distribution of requests across the keyspace + */ + public static final String REQUEST_DISTRIBUTION_PROPERTY_DEFAULT = "uniform"; + + /** + * The name of the property for the max scan length (number of records) + */ + public static final String MAX_SCAN_LENGTH_PROPERTY = "maxscanlength"; + + /** + * The default max scan length. + */ + public static final String MAX_SCAN_LENGTH_PROPERTY_DEFAULT = "1000"; + + /** + * The name of the property for the scan length distribution. Options are "uniform" and "zipfian" + * (favoring short scans) + */ + public static final String SCAN_LENGTH_DISTRIBUTION_PROPERTY = "scanlengthdistribution"; + + /** + * The default max scan length. + */ + public static final String SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT = "uniform"; + + /** + * The name of the property for the order to insert records. Options are "ordered" or "hashed" + */ + public static final String INSERT_ORDER_PROPERTY = "insertorder"; + + /** + * Default insert order. + */ + public static final String INSERT_ORDER_PROPERTY_DEFAULT = "hashed"; + + /** * Percentage data items that constitute the hot set. */ public static final String HOTSPOT_DATA_FRACTION = "hotspotdatafraction"; - + /** * Default value of the size of the hot set. */ public static final String HOTSPOT_DATA_FRACTION_DEFAULT = "0.2"; - + /** * Percentage operations that access the hot set. */ public static final String HOTSPOT_OPN_FRACTION = "hotspotopnfraction"; - + /** * Default value of the percentage operations accessing the hot set. */ public static final String HOTSPOT_OPN_FRACTION_DEFAULT = "0.8"; - - IntegerGenerator keysequence; - - DiscreteGenerator operationchooser; - - IntegerGenerator keychooser; - - Generator fieldchooser; - - CounterGenerator transactioninsertkeysequence; - - IntegerGenerator scanlength; - - boolean orderedinserts; - - int recordcount; - - private Measurements _measurements = Measurements.getMeasurements(); - - protected static IntegerGenerator getFieldLengthGenerator(Properties p) throws WorkloadException{ - IntegerGenerator fieldlengthgenerator; - String fieldlengthdistribution = p.getProperty(FIELD_LENGTH_DISTRIBUTION_PROPERTY, FIELD_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT); - int fieldlength=Integer.parseInt(p.getProperty(FIELD_LENGTH_PROPERTY,FIELD_LENGTH_PROPERTY_DEFAULT)); - String fieldlengthhistogram = p.getProperty(FIELD_LENGTH_HISTOGRAM_FILE_PROPERTY, FIELD_LENGTH_HISTOGRAM_FILE_PROPERTY_DEFAULT); - if(fieldlengthdistribution.compareTo("constant") == 0) { - fieldlengthgenerator = new ConstantIntegerGenerator(fieldlength); - } else if(fieldlengthdistribution.compareTo("uniform") == 0) { - fieldlengthgenerator = new UniformIntegerGenerator(1, fieldlength); - } else if(fieldlengthdistribution.compareTo("zipfian") == 0) { - fieldlengthgenerator = new ZipfianGenerator(1, fieldlength); - } else if(fieldlengthdistribution.compareTo("histogram") == 0) { - try { - fieldlengthgenerator = new HistogramGenerator(fieldlengthhistogram); - } catch(IOException e) { - throw new WorkloadException("Couldn't read field length histogram file: "+fieldlengthhistogram, e); - } - } else { - throw new WorkloadException("Unknown field length distribution \""+fieldlengthdistribution+"\""); - } - return fieldlengthgenerator; - } - - /** - * Initialize the scenario. - * Called once, in the main client thread, before any operations are started. - */ - public void init(Properties p) throws WorkloadException - { - table = p.getProperty(TABLENAME_PROPERTY,TABLENAME_PROPERTY_DEFAULT); - - fieldcount=Integer.parseInt(p.getProperty(FIELD_COUNT_PROPERTY,FIELD_COUNT_PROPERTY_DEFAULT)); + + /** + * How many times to retry when insertion of a single item to a DB fails. + */ + public static final String INSERTION_RETRY_LIMIT = "core_workload_insertion_retry_limit"; + public static final String INSERTION_RETRY_LIMIT_DEFAULT = "0"; + + /** + * On average, how long to wait between the retries, in seconds. + */ + public static final String INSERTION_RETRY_INTERVAL = "core_workload_insertion_retry_interval"; + public static final String INSERTION_RETRY_INTERVAL_DEFAULT = "3"; + + NumberGenerator keysequence; + + DiscreteGenerator operationchooser; + + NumberGenerator keychooser; + + NumberGenerator fieldchooser; + + AcknowledgedCounterGenerator transactioninsertkeysequence; + + NumberGenerator scanlength; + + boolean orderedinserts; + + int recordcount; + + int insertionRetryLimit; + int insertionRetryInterval; + + private Measurements _measurements = Measurements.getMeasurements(); + + protected static NumberGenerator getFieldLengthGenerator(Properties p) throws WorkloadException { + NumberGenerator fieldlengthgenerator; + String fieldlengthdistribution = p.getProperty( + FIELD_LENGTH_DISTRIBUTION_PROPERTY, FIELD_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT); + int fieldlength = + Integer.parseInt(p.getProperty(FIELD_LENGTH_PROPERTY, FIELD_LENGTH_PROPERTY_DEFAULT)); + String fieldlengthhistogram = p.getProperty( + FIELD_LENGTH_HISTOGRAM_FILE_PROPERTY, FIELD_LENGTH_HISTOGRAM_FILE_PROPERTY_DEFAULT); + if (fieldlengthdistribution.compareTo("constant") == 0) { + fieldlengthgenerator = new ConstantIntegerGenerator(fieldlength); + } else if (fieldlengthdistribution.compareTo("uniform") == 0) { + fieldlengthgenerator = new UniformIntegerGenerator(1, fieldlength); + } else if (fieldlengthdistribution.compareTo("zipfian") == 0) { + fieldlengthgenerator = new ZipfianGenerator(1, fieldlength); + } else if (fieldlengthdistribution.compareTo("histogram") == 0) { + try { + fieldlengthgenerator = new HistogramGenerator(fieldlengthhistogram); + } catch (IOException e) { + throw new WorkloadException( + "Couldn't read field length histogram file: " + fieldlengthhistogram, e); + } + } else { + throw new WorkloadException( + "Unknown field length distribution \"" + fieldlengthdistribution + "\""); + } + return fieldlengthgenerator; + } + + /** + * Initialize the scenario. + * Called once, in the main client thread, before any operations are started. + */ + @Override + public void init(Properties p) throws WorkloadException { + table = p.getProperty(TABLENAME_PROPERTY, TABLENAME_PROPERTY_DEFAULT); + + fieldcount = + Integer.parseInt(p.getProperty(FIELD_COUNT_PROPERTY, FIELD_COUNT_PROPERTY_DEFAULT)); fieldnames = new ArrayList<String>(); for (int i = 0; i < fieldcount; i++) { - fieldnames.add("field" + i); + fieldnames.add("field" + i); } - fieldlengthgenerator = CoreWorkload.getFieldLengthGenerator(p); - - double readproportion=Double.parseDouble(p.getProperty(READ_PROPORTION_PROPERTY,READ_PROPORTION_PROPERTY_DEFAULT)); - double updateproportion=Double.parseDouble(p.getProperty(UPDATE_PROPORTION_PROPERTY,UPDATE_PROPORTION_PROPERTY_DEFAULT)); - double insertproportion=Double.parseDouble(p.getProperty(INSERT_PROPORTION_PROPERTY,INSERT_PROPORTION_PROPERTY_DEFAULT)); - double scanproportion=Double.parseDouble(p.getProperty(SCAN_PROPORTION_PROPERTY,SCAN_PROPORTION_PROPERTY_DEFAULT)); - double readmodifywriteproportion=Double.parseDouble(p.getProperty(READMODIFYWRITE_PROPORTION_PROPERTY,READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT)); - recordcount=Integer.parseInt(p.getProperty(Client.RECORD_COUNT_PROPERTY, Client.DEFAULT_RECORD_COUNT)); - if(recordcount == 0) - recordcount = Integer.MAX_VALUE; - String requestdistrib=p.getProperty(REQUEST_DISTRIBUTION_PROPERTY,REQUEST_DISTRIBUTION_PROPERTY_DEFAULT); - int maxscanlength=Integer.parseInt(p.getProperty(MAX_SCAN_LENGTH_PROPERTY,MAX_SCAN_LENGTH_PROPERTY_DEFAULT)); - String scanlengthdistrib=p.getProperty(SCAN_LENGTH_DISTRIBUTION_PROPERTY,SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT); - - int insertstart=Integer.parseInt(p.getProperty(INSERT_START_PROPERTY,INSERT_START_PROPERTY_DEFAULT)); - - readallfields=Boolean.parseBoolean(p.getProperty(READ_ALL_FIELDS_PROPERTY,READ_ALL_FIELDS_PROPERTY_DEFAULT)); - writeallfields=Boolean.parseBoolean(p.getProperty(WRITE_ALL_FIELDS_PROPERTY,WRITE_ALL_FIELDS_PROPERTY_DEFAULT)); - - dataintegrity = Boolean.parseBoolean(p.getProperty(DATA_INTEGRITY_PROPERTY, DATA_INTEGRITY_PROPERTY_DEFAULT)); - //Confirm that fieldlengthgenerator returns a constant if data - //integrity check requested. - if (dataintegrity && !(p.getProperty(FIELD_LENGTH_DISTRIBUTION_PROPERTY, FIELD_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT)).equals("constant")) - { + fieldlengthgenerator = CoreWorkload.getFieldLengthGenerator(p); + + double readproportion = Double.parseDouble( + p.getProperty(READ_PROPORTION_PROPERTY, READ_PROPORTION_PROPERTY_DEFAULT)); + double updateproportion = Double.parseDouble( + p.getProperty(UPDATE_PROPORTION_PROPERTY, UPDATE_PROPORTION_PROPERTY_DEFAULT)); + double insertproportion = Double.parseDouble( + p.getProperty(INSERT_PROPORTION_PROPERTY, INSERT_PROPORTION_PROPERTY_DEFAULT)); + double scanproportion = Double.parseDouble( + p.getProperty(SCAN_PROPORTION_PROPERTY, SCAN_PROPORTION_PROPERTY_DEFAULT)); + double readmodifywriteproportion = Double.parseDouble(p.getProperty( + READMODIFYWRITE_PROPORTION_PROPERTY, READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT)); + recordcount = + Integer.parseInt(p.getProperty(Client.RECORD_COUNT_PROPERTY, Client.DEFAULT_RECORD_COUNT)); + if (recordcount == 0) + recordcount = Integer.MAX_VALUE; + String requestdistrib = + p.getProperty(REQUEST_DISTRIBUTION_PROPERTY, REQUEST_DISTRIBUTION_PROPERTY_DEFAULT); + int maxscanlength = + Integer.parseInt(p.getProperty(MAX_SCAN_LENGTH_PROPERTY, MAX_SCAN_LENGTH_PROPERTY_DEFAULT)); + String scanlengthdistrib = + p.getProperty(SCAN_LENGTH_DISTRIBUTION_PROPERTY, SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT); + + int insertstart = + Integer.parseInt(p.getProperty(INSERT_START_PROPERTY, INSERT_START_PROPERTY_DEFAULT)); + + readallfields = Boolean.parseBoolean( + p.getProperty(READ_ALL_FIELDS_PROPERTY, READ_ALL_FIELDS_PROPERTY_DEFAULT)); + writeallfields = Boolean.parseBoolean( + p.getProperty(WRITE_ALL_FIELDS_PROPERTY, WRITE_ALL_FIELDS_PROPERTY_DEFAULT)); + + dataintegrity = Boolean.parseBoolean( + p.getProperty(DATA_INTEGRITY_PROPERTY, DATA_INTEGRITY_PROPERTY_DEFAULT)); + // Confirm that fieldlengthgenerator returns a constant if data + // integrity check requested. + if (dataintegrity + && !(p.getProperty( + FIELD_LENGTH_DISTRIBUTION_PROPERTY, + FIELD_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT)).equals("constant")) { System.err.println("Must have constant field size to check data integrity."); System.exit(-1); } - if (p.getProperty(INSERT_ORDER_PROPERTY,INSERT_ORDER_PROPERTY_DEFAULT).compareTo("hashed")==0) - { - orderedinserts=false; - } - else if (requestdistrib.compareTo("exponential")==0) - { - double percentile = Double.parseDouble(p.getProperty(ExponentialGenerator.EXPONENTIAL_PERCENTILE_PROPERTY, - ExponentialGenerator.EXPONENTIAL_PERCENTILE_DEFAULT)); - double frac = Double.parseDouble(p.getProperty(ExponentialGenerator.EXPONENTIAL_FRAC_PROPERTY, - ExponentialGenerator.EXPONENTIAL_FRAC_DEFAULT)); - keychooser = new ExponentialGenerator(percentile, recordcount*frac); - } - else - { - orderedinserts=true; - } - - keysequence=new CounterGenerator(insertstart); - operationchooser=new DiscreteGenerator(); - if (readproportion>0) - { - operationchooser.addValue(readproportion,"READ"); - } - - if (updateproportion>0) - { - operationchooser.addValue(updateproportion,"UPDATE"); - } - - if (insertproportion>0) - { - operationchooser.addValue(insertproportion,"INSERT"); - } - - if (scanproportion>0) - { - operationchooser.addValue(scanproportion,"SCAN"); - } - - if (readmodifywriteproportion>0) - { - operationchooser.addValue(readmodifywriteproportion,"READMODIFYWRITE"); - } - - transactioninsertkeysequence=new CounterGenerator(recordcount); - if (requestdistrib.compareTo("uniform")==0) - { - keychooser=new UniformIntegerGenerator(0,recordcount-1); - } - else if (requestdistrib.compareTo("zipfian")==0) - { - //it does this by generating a random "next key" in part by taking the modulus over the number of keys - //if the number of keys changes, this would shift the modulus, and we don't want that to change which keys are popular - //so we'll actually construct the scrambled zipfian generator with a keyspace that is larger than exists at the beginning - //of the test. that is, we'll predict the number of inserts, and tell the scrambled zipfian generator the number of existing keys - //plus the number of predicted keys as the total keyspace. then, if the generator picks a key that hasn't been inserted yet, will - //just ignore it and pick another key. this way, the size of the keyspace doesn't change from the perspective of the scrambled zipfian generator - - int opcount=Integer.parseInt(p.getProperty(Client.OPERATION_COUNT_PROPERTY)); - int expectednewkeys=(int)(((double)opcount)*insertproportion*2.0); //2 is fudge factor - - keychooser=new ScrambledZipfianGenerator(recordcount+expectednewkeys); - } - else if (requestdistrib.compareTo("latest")==0) - { - keychooser=new SkewedLatestGenerator(transactioninsertkeysequence); - } - else if (requestdistrib.equals("hotspot")) - { - double hotsetfraction = Double.parseDouble(p.getProperty( - HOTSPOT_DATA_FRACTION, HOTSPOT_DATA_FRACTION_DEFAULT)); - double hotopnfraction = Double.parseDouble(p.getProperty( - HOTSPOT_OPN_FRACTION, HOTSPOT_OPN_FRACTION_DEFAULT)); - keychooser = new HotspotIntegerGenerator(0, recordcount - 1, - hotsetfraction, hotopnfraction); + if (p.getProperty(INSERT_ORDER_PROPERTY, INSERT_ORDER_PROPERTY_DEFAULT).compareTo("hashed") + == 0) { + orderedinserts = false; + } else if (requestdistrib.compareTo("exponential") == 0) { + double percentile = Double.parseDouble(p.getProperty( + ExponentialGenerator.EXPONENTIAL_PERCENTILE_PROPERTY, + ExponentialGenerator.EXPONENTIAL_PERCENTILE_DEFAULT)); + double frac = Double.parseDouble(p.getProperty( + ExponentialGenerator.EXPONENTIAL_FRAC_PROPERTY, + ExponentialGenerator.EXPONENTIAL_FRAC_DEFAULT)); + keychooser = new ExponentialGenerator(percentile, recordcount * frac); + } else { + orderedinserts = true; + } + + keysequence = new CounterGenerator(insertstart); + operationchooser = new DiscreteGenerator(); + if (readproportion > 0) { + operationchooser.addValue(readproportion, "READ"); + } + + if (updateproportion > 0) { + operationchooser.addValue(updateproportion, "UPDATE"); + } + + if (insertproportion > 0) { + operationchooser.addValue(insertproportion, "INSERT"); + } + + if (scanproportion > 0) { + operationchooser.addValue(scanproportion, "SCAN"); + } + + if (readmodifywriteproportion > 0) { + operationchooser.addValue(readmodifywriteproportion, "READMODIFYWRITE"); + } + + transactioninsertkeysequence = new AcknowledgedCounterGenerator(recordcount); + if (requestdistrib.compareTo("uniform") == 0) { + keychooser = new UniformIntegerGenerator(0, recordcount - 1); + } else if (requestdistrib.compareTo("zipfian") == 0) { + // it does this by generating a random "next key" in part by taking the modulus over the + // number of keys. + // If the number of keys changes, this would shift the modulus, and we don't want that to + // change which keys are popular so we'll actually construct the scrambled zipfian generator + // with a keyspace that is larger than exists at the beginning of the test. that is, we'll predict + // the number of inserts, and tell the scrambled zipfian generator the number of existing keys + // plus the number of predicted keys as the total keyspace. then, if the generator picks a key + // that hasn't been inserted yet, will just ignore it and pick another key. this way, the size of + // the keyspace doesn't change from the perspective of the scrambled zipfian generator + + int opcount = Integer.parseInt(p.getProperty(Client.OPERATION_COUNT_PROPERTY)); + int expectednewkeys = (int) ((opcount) * insertproportion * 2.0); // 2 is fudge factor + + keychooser = new ScrambledZipfianGenerator(recordcount + expectednewkeys); + } else if (requestdistrib.compareTo("latest") == 0) { + keychooser = new SkewedLatestGenerator(transactioninsertkeysequence); + } else if (requestdistrib.equals("hotspot")) { + double hotsetfraction = + Double.parseDouble(p.getProperty(HOTSPOT_DATA_FRACTION, HOTSPOT_DATA_FRACTION_DEFAULT)); + double hotopnfraction = + Double.parseDouble(p.getProperty(HOTSPOT_OPN_FRACTION, HOTSPOT_OPN_FRACTION_DEFAULT)); + keychooser = new HotspotIntegerGenerator(0, recordcount - 1, hotsetfraction, hotopnfraction); + } else { + throw new WorkloadException("Unknown request distribution \"" + requestdistrib + "\""); + } + + fieldchooser = new UniformIntegerGenerator(0, fieldcount - 1); + + if (scanlengthdistrib.compareTo("uniform") == 0) { + scanlength = new UniformIntegerGenerator(1, maxscanlength); + } else if (scanlengthdistrib.compareTo("zipfian") == 0) { + scanlength = new ZipfianGenerator(1, maxscanlength); + } else { + throw new WorkloadException( + "Distribution \"" + scanlengthdistrib + "\" not allowed for scan length"); + } + + insertionRetryLimit = Integer.parseInt(p.getProperty( + INSERTION_RETRY_LIMIT, INSERTION_RETRY_LIMIT_DEFAULT)); + + insertionRetryInterval = Integer.parseInt(p.getProperty( + INSERTION_RETRY_INTERVAL, INSERTION_RETRY_INTERVAL_DEFAULT)); + } + + public String buildKeyName(long keynum) { + if (!orderedinserts) { + keynum = Utils.hash(keynum); } - else - { - throw new WorkloadException("Unknown request distribution \""+requestdistrib+"\""); - } - - fieldchooser=new UniformIntegerGenerator(0,fieldcount-1); - - if (scanlengthdistrib.compareTo("uniform")==0) - { - scanlength=new UniformIntegerGenerator(1,maxscanlength); - } - else if (scanlengthdistrib.compareTo("zipfian")==0) - { - scanlength=new ZipfianGenerator(1,maxscanlength); - } - else - { - throw new WorkloadException("Distribution \""+scanlengthdistrib+"\" not allowed for scan length"); - } - } - - public String buildKeyName(long keynum) { - if (!orderedinserts) - { - keynum=Utils.hash(keynum); - } - return "user"+keynum; - } - + return "user" + keynum; + } + /** * Builds a value for a randomly chosen field. */ private HashMap<String, ByteIterator> buildSingleValue(String key) { - HashMap<String,ByteIterator> value = new HashMap<String,ByteIterator>(); + HashMap<String, ByteIterator> value = new HashMap<String, ByteIterator>(); - String fieldkey = fieldnames.get(Integer.parseInt(fieldchooser.nextString())); + String fieldkey = fieldnames.get(fieldchooser.nextValue().intValue()); ByteIterator data; if (dataintegrity) { data = new StringByteIterator(buildDeterministicValue(key, fieldkey)); } else { - //fill with random data - data = new RandomByteIterator(fieldlengthgenerator.nextInt()); + // fill with random data + data = new RandomByteIterator(fieldlengthgenerator.nextValue().longValue()); } - value.put(fieldkey,data); + value.put(fieldkey, data); - return value; + return value; } /** * Builds values for all fields. */ - private HashMap<String, ByteIterator> buildValues(String key) { - HashMap<String,ByteIterator> values = new HashMap<String,ByteIterator>(); + private HashMap<String, ByteIterator> buildValues(String key) { + HashMap<String, ByteIterator> values = new HashMap<String, ByteIterator>(); for (String fieldkey : fieldnames) { ByteIterator data; if (dataintegrity) { data = new StringByteIterator(buildDeterministicValue(key, fieldkey)); } else { - //fill with random data - data = new RandomByteIterator(fieldlengthgenerator.nextInt()); + // fill with random data + data = new RandomByteIterator(fieldlengthgenerator.nextValue().longValue()); } - values.put(fieldkey,data); + values.put(fieldkey, data); } return values; } @@ -520,7 +547,7 @@ public class CoreWorkload extends Workload * Build a deterministic value given the key information. */ private String buildDeterministicValue(String key, String fieldkey) { - int size = fieldlengthgenerator.nextInt(); + int size = fieldlengthgenerator.nextValue().intValue(); StringBuilder sb = new StringBuilder(size); sb.append(key); sb.append(':'); @@ -534,234 +561,244 @@ public class CoreWorkload extends Workload return sb.toString(); } - /** - * Do one insert operation. Because it will be called concurrently from multiple client threads, this - * function must be thread safe. However, avoid synchronized, or the threads will block waiting for each - * other, and it will be difficult to reach the target throughput. Ideally, this function would have no side - * effects other than DB operations. - */ - public boolean doInsert(DB db, Object threadstate) - { - int keynum=keysequence.nextInt(); - String dbkey = buildKeyName(keynum); - HashMap<String, ByteIterator> values = buildValues(dbkey); - if (db.insert(table,dbkey,values) == 0) - return true; - else - return false; - } - - /** - * Do one transaction operation. Because it will be called concurrently from multiple client threads, this - * function must be thread safe. However, avoid synchronized, or the threads will block waiting for each - * other, and it will be difficult to reach the target throughput. Ideally, this function would have no side - * effects other than DB operations. - */ - public boolean doTransaction(DB db, Object threadstate) - { - String op=operationchooser.nextString(); - - if (op.compareTo("READ")==0) - { - doTransactionRead(db); - } - else if (op.compareTo("UPDATE")==0) - { - doTransactionUpdate(db); - } - else if (op.compareTo("INSERT")==0) - { - doTransactionInsert(db); - } - else if (op.compareTo("SCAN")==0) - { - doTransactionScan(db); - } - else - { - doTransactionReadModifyWrite(db); - } - - return true; - } + /** + * Do one insert operation. Because it will be called concurrently from multiple client threads, + * this function must be thread safe. However, avoid synchronized, or the threads will block waiting + * for each other, and it will be difficult to reach the target throughput. Ideally, this function would + * have no side effects other than DB operations. + */ + @Override + public boolean doInsert(DB db, Object threadstate) { + int keynum = keysequence.nextValue().intValue(); + String dbkey = buildKeyName(keynum); + HashMap<String, ByteIterator> values = buildValues(dbkey); + + Status status; + int numOfRetries = 0; + do { + status = db.insert(table, dbkey, values); + if (status == Status.OK) { + break; + } + // Retry if configured. Without retrying, the load process will fail + // even if one single insertion fails. User can optionally configure + // an insertion retry limit (default is 0) to enable retry. + if (++numOfRetries <= insertionRetryLimit) { + System.err.println("Retrying insertion, retry count: " + numOfRetries); + try { + // Sleep for a random number between [0.8, 1.2)*insertionRetryInterval. + int sleepTime = (int) (1000 * insertionRetryInterval * (0.8 + 0.4 * Math.random())); + Thread.sleep(sleepTime); + } catch (InterruptedException e) { + break; + } + + } else { + System.err.println("Error inserting, not retrying any more. number of attempts: " + numOfRetries + + "Insertion Retry Limit: " + insertionRetryLimit); + break; + + } + } while (true); + + return (status == Status.OK); + } + + /** + * Do one transaction operation. Because it will be called concurrently from multiple client + * threads, this function must be thread safe. However, avoid synchronized, or the threads will block waiting + * for each other, and it will be difficult to reach the target throughput. Ideally, this function would + * have no side effects other than DB operations. + */ + @Override + public boolean doTransaction(DB db, Object threadstate) { + switch (operationchooser.nextString()) { + + case "READ": + doTransactionRead(db); + break; + case "UPDATE": + doTransactionUpdate(db); + break; + case "INSERT": + doTransactionInsert(db); + break; + case "SCAN": + doTransactionScan(db); + break; + default: + doTransactionReadModifyWrite(db); + } + + return true; + } /** * Results are reported in the first three buckets of the histogram under - * the label "VERIFY". + * the label "VERIFY". * Bucket 0 means the expected data was returned. * Bucket 1 means incorrect data was returned. - * Bucket 2 means null data was returned when some data was expected. + * Bucket 2 means null data was returned when some data was expected. */ - protected void verifyRow(String key, HashMap<String,ByteIterator> cells) { - int matchType = DATA_INT_MATCH; + protected void verifyRow(String key, HashMap<String, ByteIterator> cells) { + Status verifyStatus = Status.OK; + long startTime = System.nanoTime(); if (!cells.isEmpty()) { for (Map.Entry<String, ByteIterator> entry : cells.entrySet()) { - if (!entry.getValue().toString().equals( - buildDeterministicValue(key, entry.getKey()))) { - matchType = DATA_INT_DEVIATE; + if (!entry.getValue().toString().equals(buildDeterministicValue(key, entry.getKey()))) { + verifyStatus = Status.UNEXPECTED_STATE; break; } } } else { - //This assumes that null data is never valid - matchType = DATA_INT_UNEXPECTED_NULL; + // This assumes that null data is never valid + verifyStatus = Status.ERROR; } - Measurements.getMeasurements().measure("VERIFY", matchType); + long endTime = System.nanoTime(); + _measurements.measure("VERIFY", (int) (endTime - startTime) / 1000); + _measurements.reportStatus("VERIFY", verifyStatus); } - int nextKeynum() { - int keynum; - if(keychooser instanceof ExponentialGenerator) { - do - { - keynum=transactioninsertkeysequence.lastInt() - keychooser.nextInt(); - } - while(keynum < 0); - } else { - do - { - keynum=keychooser.nextInt(); - } - while (keynum > transactioninsertkeysequence.lastInt()); - } - return keynum; + int nextKeynum() { + int keynum; + if (keychooser instanceof ExponentialGenerator) { + do { + keynum = transactioninsertkeysequence.lastValue() - keychooser.nextValue().intValue(); + } while (keynum < 0); + } else { + do { + keynum = keychooser.nextValue().intValue(); + } while (keynum > transactioninsertkeysequence.lastValue()); } + return keynum; + } + + public void doTransactionRead(DB db) { + // choose a random key + int keynum = nextKeynum(); - public void doTransactionRead(DB db) - { - //choose a random key - int keynum = nextKeynum(); - - String keyname = buildKeyName(keynum); - - HashSet<String> fields=null; + String keyname = buildKeyName(keynum); - if (!readallfields) - { - //read a random field - String fieldname=fieldnames.get(Integer.parseInt(fieldchooser.nextString())); + HashSet<String> fields = null; - fields=new HashSet<String>(); - fields.add(fieldname); - } + if (!readallfields) { + // read a random field + String fieldname = fieldnames.get(fieldchooser.nextValue().intValue()); - HashMap<String,ByteIterator> cells = - new HashMap<String,ByteIterator>(); - db.read(table,keyname,fields,cells); + fields = new HashSet<String>(); + fields.add(fieldname); + } else if (dataintegrity) { + // pass the full field list if dataintegrity is on for verification + fields = new HashSet<String>(fieldnames); + } + + HashMap<String, ByteIterator> cells = new HashMap<String, ByteIterator>(); + db.read(table, keyname, fields, cells); if (dataintegrity) { verifyRow(keyname, cells); } - } - - public void doTransactionReadModifyWrite(DB db) - { - //choose a random key - int keynum = nextKeynum(); - - String keyname = buildKeyName(keynum); - - HashSet<String> fields=null; - - if (!readallfields) - { - //read a random field - String fieldname=fieldnames.get(Integer.parseInt(fieldchooser.nextString())); - - fields=new HashSet<String>(); - fields.add(fieldname); - } - - HashMap<String,ByteIterator> values; - - if (writeallfields) - { - //new data for all the fields - values = buildValues(keyname); - } - else - { - //update a random field - values = buildSingleValue(keyname); - } - - //do the transaction - - HashMap<String,ByteIterator> cells = - new HashMap<String,ByteIterator>(); - - - long ist=_measurements.getIntendedtartTimeNs(); - long st = System.nanoTime(); - db.read(table,keyname,fields,cells); - - db.update(table,keyname,values); - - long en=System.nanoTime(); + } + + public void doTransactionReadModifyWrite(DB db) { + // choose a random key + int keynum = nextKeynum(); + + String keyname = buildKeyName(keynum); + + HashSet<String> fields = null; + + if (!readallfields) { + // read a random field + String fieldname = fieldnames.get(fieldchooser.nextValue().intValue()); + + fields = new HashSet<String>(); + fields.add(fieldname); + } + + HashMap<String, ByteIterator> values; + + if (writeallfields) { + // new data for all the fields + values = buildValues(keyname); + } else { + // update a random field + values = buildSingleValue(keyname); + } + + // do the transaction + + HashMap<String, ByteIterator> cells = new HashMap<String, ByteIterator>(); + + + long ist = _measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + db.read(table, keyname, fields, cells); + + db.update(table, keyname, values); + + long en = System.nanoTime(); if (dataintegrity) { verifyRow(keyname, cells); } - _measurements .measure("READ-MODIFY-WRITE", (int)((en-st)/1000)); - _measurements .measureIntended("READ-MODIFY-WRITE", (int)((en-ist)/1000)); - } - - public void doTransactionScan(DB db) - { - //choose a random key - int keynum = nextKeynum(); - - String startkeyname = buildKeyName(keynum); - - //choose a random scan length - int len=scanlength.nextInt(); - - HashSet<String> fields=null; - - if (!readallfields) - { - //read a random field - String fieldname=fieldnames.get(Integer.parseInt(fieldchooser.nextString())); - - fields=new HashSet<String>(); - fields.add(fieldname); - } - - db.scan(table,startkeyname,len,fields,new Vector<HashMap<String,ByteIterator>>()); - } - - public void doTransactionUpdate(DB db) - { - //choose a random key - int keynum = nextKeynum(); - - String keyname=buildKeyName(keynum); - - HashMap<String,ByteIterator> values; - - if (writeallfields) - { - //new data for all the fields - values = buildValues(keyname); - } - else - { - //update a random field - values = buildSingleValue(keyname); - } - - db.update(table,keyname,values); - } - - public void doTransactionInsert(DB db) - { - //choose the next key - int keynum=transactioninsertkeysequence.nextInt(); - - String dbkey = buildKeyName(keynum); - - HashMap<String, ByteIterator> values = buildValues(dbkey); - db.insert(table,dbkey,values); - } + _measurements.measure("READ-MODIFY-WRITE", (int) ((en - st) / 1000)); + _measurements.measureIntended("READ-MODIFY-WRITE", (int) ((en - ist) / 1000)); + } + + public void doTransactionScan(DB db) { + // choose a random key + int keynum = nextKeynum(); + + String startkeyname = buildKeyName(keynum); + + // choose a random scan length + int len = scanlength.nextValue().intValue(); + + HashSet<String> fields = null; + + if (!readallfields) { + // read a random field + String fieldname = fieldnames.get(fieldchooser.nextValue().intValue()); + + fields = new HashSet<String>(); + fields.add(fieldname); + } + + db.scan(table, startkeyname, len, fields, new Vector<HashMap<String, ByteIterator>>()); + } + + public void doTransactionUpdate(DB db) { + // choose a random key + int keynum = nextKeynum(); + + String keyname = buildKeyName(keynum); + + HashMap<String, ByteIterator> values; + + if (writeallfields) { + // new data for all the fields + values = buildValues(keyname); + } else { + // update a random field + values = buildSingleValue(keyname); + } + + db.update(table, keyname, values); + } + + public void doTransactionInsert(DB db) { + // choose the next key + int keynum = transactioninsertkeysequence.nextValue(); + + try { + String dbkey = buildKeyName(keynum); + + HashMap<String, ByteIterator> values = buildValues(dbkey); + db.insert(table, dbkey, values); + } finally { + transactioninsertkeysequence.acknowledge(keynum); + } + } } diff --git a/core/src/test/java/com/yahoo/ycsb/generator/AcknowledgedCounterGeneratorTest.java b/core/src/test/java/com/yahoo/ycsb/generator/AcknowledgedCounterGeneratorTest.java new file mode 100644 index 0000000000000000000000000000000000000000..f4aa88b4f06a8c2b958e3a16bca5f2ae5f675d8f --- /dev/null +++ b/core/src/test/java/com/yahoo/ycsb/generator/AcknowledgedCounterGeneratorTest.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2015 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. + */ +package com.yahoo.ycsb.generator; + +import java.util.Random; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.BlockingQueue; + +import org.testng.annotations.Test; + +/** + * Tests for the AcknowledgedCounterGenerator class. + */ +public class AcknowledgedCounterGeneratorTest { + + /** + * Test that advancing past {@link Integer#MAX_VALUE} works. + */ + @Test + public void testIncrementPastIntegerMaxValue() { + final long toTry = AcknowledgedCounterGenerator.WINDOW_SIZE * 3; + + AcknowledgedCounterGenerator generator = + new AcknowledgedCounterGenerator(Integer.MAX_VALUE - 1000); + + Random rand = new Random(System.currentTimeMillis()); + BlockingQueue<Integer> pending = new ArrayBlockingQueue<Integer>(1000); + for (long i = 0; i < toTry; ++i) { + int value = generator.nextValue(); + + while (!pending.offer(value)) { + + Integer first = pending.poll(); + + // Don't always advance by one. + if (rand.nextBoolean()) { + generator.acknowledge(first); + } else { + Integer second = pending.poll(); + pending.add(first); + generator.acknowledge(second); + } + } + } + + } +} diff --git a/core/src/test/java/com/yahoo/ycsb/generator/TestZipfianGenerator.java b/core/src/test/java/com/yahoo/ycsb/generator/TestZipfianGenerator.java index 4b7cc2a43ec606dc000684e8e0a907da0a50bb7e..77a77586d58b7021e96da4aad5c83e9b53f03e07 100644 --- a/core/src/test/java/com/yahoo/ycsb/generator/TestZipfianGenerator.java +++ b/core/src/test/java/com/yahoo/ycsb/generator/TestZipfianGenerator.java @@ -30,7 +30,7 @@ public class TestZipfianGenerator { ZipfianGenerator zipfian = new ZipfianGenerator(min, max); for (int i = 0; i < 10000; i++) { - long rnd = zipfian.nextLong(); + long rnd = zipfian.nextValue(); assertFalse(rnd < min); assertFalse(rnd > max); } diff --git a/core/src/test/java/com/yahoo/ycsb/measurements/exporter/TestMeasurementsExporter.java b/core/src/test/java/com/yahoo/ycsb/measurements/exporter/TestMeasurementsExporter.java index 2b33aec39948c022db54bfeb67c80fe0290cd3e1..4aff0941709468e4005e755f37feae5eb1489dc3 100644 --- a/core/src/test/java/com/yahoo/ycsb/measurements/exporter/TestMeasurementsExporter.java +++ b/core/src/test/java/com/yahoo/ycsb/measurements/exporter/TestMeasurementsExporter.java @@ -32,7 +32,9 @@ import static org.testng.AssertJUnit.assertTrue; public class TestMeasurementsExporter { @Test public void testJSONArrayMeasurementsExporter() throws IOException { - Measurements mm = new Measurements(new Properties()); + Properties props = new Properties(); + props.put(Measurements.MEASUREMENT_TYPE_PROPERTY, "histogram"); + Measurements mm = new Measurements(props); ByteArrayOutputStream out = new ByteArrayOutputStream(); JSONArrayMeasurementsExporter export = new JSONArrayMeasurementsExporter(out); @@ -40,7 +42,7 @@ public class TestMeasurementsExporter { long max = 100000; ZipfianGenerator zipfian = new ZipfianGenerator(min, max); for (int i = 0; i < 1000; i++) { - int rnd = zipfian.nextInt(); + int rnd = zipfian.nextValue().intValue(); mm.measure("UPDATE", rnd); } mm.exportMeasurements(export); @@ -50,7 +52,7 @@ public class TestMeasurementsExporter { JsonNode json = mapper.readTree(out.toString("UTF-8")); assertTrue(json.isArray()); assertEquals(json.get(0).get("measurement").asText(), "Operations"); - assertEquals(json.get(3).get("measurement").asText(), "MaxLatency(us)"); - assertEquals(json.get(11).get("measurement").asText(), "5"); + assertEquals(json.get(4).get("measurement").asText(), "MaxLatency(us)"); + assertEquals(json.get(11).get("measurement").asText(), "4"); } } diff --git a/couchbase/README.md b/couchbase/README.md index 4004cb7f0521d6c760144b85ba1c8ba18346285b..efe16baccaade5b212a886094d267f40d36190ab 100644 --- a/couchbase/README.md +++ b/couchbase/README.md @@ -1,5 +1,5 @@ <!-- -Copyright (c) 2015 YCSB contributors. All rights reserved. +Copyright (c) 2015 - 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 @@ -51,6 +51,13 @@ Please see the general instructions in the `doc` folder if you are not sure how bin/ycsb run couchbase -s -P workloads/workloada -p couchbase.useJson=false ``` +## Scans in the CouchbaseClient +The scan operation in the CouchbaseClient requires a Couchbase View to be created manually. To do this: +1. Go to the Couchbase UI, then to Views +2. Create a new development view, specify a ddoc and view name, use these in your YCSB properties. See Configuration Options below. +3. The default map code is sufficient. +4. Save, and publish this View. + ## Configuration Options Since no setup is the same and the goal of YCSB is to deliver realistic benchmarks, here are some setups that you can tune. Note that if you need more flexibility (let's say a custom transcoder), you still need to extend this driver and implement the facilities on your own. @@ -59,9 +66,11 @@ You can set the following properties (with the default settings applied): - couchbase.url=http://127.0.0.1:8091/pools => The connection URL from one server. - couchbase.bucket=default => The bucket name to use. - couchbase.password= => The password of the bucket. - - couchbase.checkFutures=true => If the futures should be inspected (makes ops sync). - couchbase.persistTo=0 => Observe Persistence ("PersistTo" constraint). - couchbase.replicateTo=0 => Observe Replication ("ReplicateTo" constraint). + - couchbase.ddoc => The ddoc name used for scanning + - couchbase.view => The view name used for scanning + - couchbase.stale => How to deal with stale values in View Query for scanning. (OK, FALSE, UPDATE_AFTER) - couchbase.json=true => Use json or java serialization as target format. diff --git a/couchbase/pom.xml b/couchbase/pom.xml index 21eb546276554702b00772fac8b0a6d1978151fa..fb2d5d9809dcaee055d96091a5ea1db6ba6f6927 100644 --- a/couchbase/pom.xml +++ b/couchbase/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2015 YCSB contributors. All rights reserved. +Copyright (c) 2015-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 @@ -15,13 +15,14 @@ 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"> +<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.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> @@ -31,7 +32,7 @@ LICENSE file. <dependencies> <dependency> - <groupId>couchbase</groupId> + <groupId>com.couchbase.client</groupId> <artifactId>couchbase-client</artifactId> <version>${couchbase.version}</version> </dependency> @@ -51,12 +52,4 @@ LICENSE file. <artifactId>slf4j-api</artifactId> </dependency> </dependencies> - - <repositories> - <repository> - <id>couchbase</id> - <name>Couchbase Maven Repository</name> - <url>http://files.couchbase.com/maven2/</url> - </repository> - </repositories> </project> diff --git a/couchbase/src/main/java/com/yahoo/ycsb/db/CouchbaseClient.java b/couchbase/src/main/java/com/yahoo/ycsb/db/CouchbaseClient.java index 6b072536be1f3c375a0f2053802478045b52c216..4a829202c1d3de52fc8a015249a610fb9534ffb0 100644 --- a/couchbase/src/main/java/com/yahoo/ycsb/db/CouchbaseClient.java +++ b/couchbase/src/main/java/com/yahoo/ycsb/db/CouchbaseClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013 Yahoo! Inc. 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 @@ -17,6 +17,7 @@ package com.yahoo.ycsb.db; +import com.couchbase.client.protocol.views.*; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonNode; @@ -25,38 +26,32 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; import com.yahoo.ycsb.StringByteIterator; + import net.spy.memcached.PersistTo; import net.spy.memcached.ReplicateTo; import net.spy.memcached.internal.OperationFuture; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.StringWriter; import java.io.Writer; import java.net.URI; -import java.util.*; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; /** * A class that wraps the CouchbaseClient to allow it to be interfaced with YCSB. * This class extends {@link DB} and implements the database interface used by YCSB client. - * - * <p> The following options must be passed when using this database client. - * - * <ul> - * <li><b>couchbase.url=http://127.0.0.1:8091/pools</b> The connection URL from one server.</li> - * <li><b>couchbase.bucket=default</b> The bucket name to use./li> - * <li><b>couchbase.password=</b> The password of the bucket.</li> - * <li><b>couchbase.checkFutures=true</b> If the futures should be inspected (makes ops sync).</li> - * <li><b>couchbase.persistTo=0</b> Observe Persistence ("PersistTo" constraint)</li> - * <li><b>couchbase.replicateTo=0</b> Observe Replication ("ReplicateTo" constraint)</li> - * <li><b>couchbase.json=true</b> Use json or java serialization as target format.</li> - * </ul> - * - * @author Michael Nitschinger */ public class CouchbaseClient extends DB { - public static final String URL_PROPERTY = "couchbase.url"; public static final String BUCKET_PROPERTY = "couchbase.bucket"; public static final String PASSWORD_PROPERTY = "couchbase.password"; @@ -64,9 +59,13 @@ public class CouchbaseClient extends DB { public static final String PERSIST_PROPERTY = "couchbase.persistTo"; public static final String REPLICATE_PROPERTY = "couchbase.replicateTo"; public static final String JSON_PROPERTY = "couchbase.json"; + public static final String DESIGN_DOC_PROPERTY = "couchbase.ddoc"; + public static final String VIEW_PROPERTY = "couchbase.view"; + public static final String STALE_PROPERTY = "couchbase.stale"; + public static final String SCAN_PROPERTY = "scanproportion"; - public static final int OK = 0; - public static final int FAILURE = 1; + public static final String STALE_PROPERTY_DEFAULT = Stale.OK.name(); + public static final String SCAN_PROPERTY_DEFAULT = "0.0"; protected static final ObjectMapper JSON_MAPPER = new ObjectMapper(); @@ -75,6 +74,10 @@ public class CouchbaseClient extends DB { private ReplicateTo replicateTo; private boolean checkFutures; private boolean useJson; + private String designDoc; + private String viewName; + private Stale stale; + private View view; private final Logger log = LoggerFactory.getLogger(getClass()); @Override @@ -91,19 +94,30 @@ public class CouchbaseClient extends DB { persistTo = parsePersistTo(props.getProperty(PERSIST_PROPERTY, "0")); replicateTo = parseReplicateTo(props.getProperty(REPLICATE_PROPERTY, "0")); + designDoc = getProperties().getProperty(DESIGN_DOC_PROPERTY); + viewName = getProperties().getProperty(VIEW_PROPERTY); + stale = Stale.valueOf(getProperties().getProperty(STALE_PROPERTY, STALE_PROPERTY_DEFAULT).toUpperCase()); + + Double scanproportion = Double.valueOf(props.getProperty(SCAN_PROPERTY, SCAN_PROPERTY_DEFAULT)); + Properties systemProperties = System.getProperties(); systemProperties.put("net.spy.log.LoggerImpl", "net.spy.memcached.compat.log.SLF4JLogger"); System.setProperties(systemProperties); try { - client = new com.couchbase.client.CouchbaseClient( - Arrays.asList(new URI(url)), - bucket, - password - ); + client = new com.couchbase.client.CouchbaseClient(Arrays.asList(new URI(url)), bucket, password); } catch (Exception e) { throw new DBException("Could not create CouchbaseClient object.", e); } + + if (scanproportion > 0) { + try { + view = client.getView(designDoc, viewName); + } catch (Exception e) { + throw new DBException(String.format("%s=%s and %s=%s provided, unable to connect to view.", + DESIGN_DOC_PROPERTY, designDoc, VIEW_PROPERTY, viewName), e.getCause()); + } + } } /** @@ -117,12 +131,16 @@ public class CouchbaseClient extends DB { int value = Integer.parseInt(property); switch (value) { - case 0: return ReplicateTo.ZERO; - case 1: return ReplicateTo.ONE; - case 2: return ReplicateTo.TWO; - case 3: return ReplicateTo.THREE; - default: - throw new DBException(REPLICATE_PROPERTY + " must be between 0 and 3"); + case 0: + return ReplicateTo.ZERO; + case 1: + return ReplicateTo.ONE; + case 2: + return ReplicateTo.TWO; + case 3: + return ReplicateTo.THREE; + default: + throw new DBException(REPLICATE_PROPERTY + " must be between 0 and 3"); } } @@ -137,13 +155,18 @@ public class CouchbaseClient extends DB { int value = Integer.parseInt(property); switch (value) { - case 0: return PersistTo.ZERO; - case 1: return PersistTo.ONE; - case 2: return PersistTo.TWO; - case 3: return PersistTo.THREE; - case 4: return PersistTo.FOUR; - default: - throw new DBException(PERSIST_PROPERTY + " must be between 0 and 4"); + case 0: + return PersistTo.ZERO; + case 1: + return PersistTo.ONE; + case 2: + return PersistTo.TWO; + case 3: + return PersistTo.THREE; + case 4: + return PersistTo.FOUR; + default: + throw new DBException(PERSIST_PROPERTY + " must be between 0 and 4"); } } @@ -156,85 +179,83 @@ public class CouchbaseClient extends DB { } @Override - public int read(final String table, final String key, final Set<String> fields, - final HashMap<String, ByteIterator> result) { + public Status read(final String table, final String key, final Set<String> fields, + final HashMap<String, ByteIterator> result) { String formattedKey = formatKey(table, key); try { Object loaded = client.get(formattedKey); if (loaded == null) { - return FAILURE; + return Status.ERROR; } decode(loaded, fields, result); - return OK; + return Status.OK; } catch (Exception e) { if (log.isErrorEnabled()) { log.error("Could not read value for key " + formattedKey, e); } - return FAILURE; + return Status.ERROR; } } - /** - * Scan is currently not implemented. - * - * @param table The name of the table - * @param startkey The record key of the first record to read. - * @param recordcount The number of records to read - * @param fields The list of fields to read, or null for all of them - * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record - * @return FAILURE, because not implemented yet. - */ @Override - public int scan(final String table, final String startkey, final int recordcount, - final Set<String> fields, final Vector<HashMap<String, ByteIterator>> result) { - return FAILURE; + public Status scan(final String table, final String startkey, final int recordcount, final Set<String> fields, + final Vector<HashMap<String, ByteIterator>> result) { + try { + Query query = new Query().setRangeStart(startkey) + .setLimit(recordcount) + .setIncludeDocs(true) + .setStale(stale); + ViewResponse response = client.query(view, query); + + for (ViewRow row : response) { + HashMap<String, ByteIterator> rowMap = new HashMap(); + decode(row.getDocument(), fields, rowMap); + result.add(rowMap); + } + + return Status.OK; + } catch (Exception e) { + log.error(e.getMessage()); + } + + return Status.ERROR; } @Override - public int update(final String table, final String key, final HashMap<String, ByteIterator> values) { + public Status update(final String table, final String key, final HashMap<String, ByteIterator> values) { String formattedKey = formatKey(table, key); try { - final OperationFuture<Boolean> future = client.replace( - formattedKey, - encode(values), - persistTo, - replicateTo - ); + final OperationFuture<Boolean> future = client.replace(formattedKey, encode(values), persistTo, replicateTo); return checkFutureStatus(future); } catch (Exception e) { if (log.isErrorEnabled()) { log.error("Could not update value for key " + formattedKey, e); } - return FAILURE; + return Status.ERROR; } } @Override - public int insert(final String table, final String key, final HashMap<String, ByteIterator> values) { + public Status insert(final String table, final String key, final HashMap<String, ByteIterator> values) { String formattedKey = formatKey(table, key); try { - final OperationFuture<Boolean> future = client.add( - formattedKey, - encode(values), - persistTo, - replicateTo - ); + final OperationFuture<Boolean> future = client.add(formattedKey, encode(values), persistTo, replicateTo); return checkFutureStatus(future); } catch (Exception e) { if (log.isErrorEnabled()) { log.error("Could not insert value for key " + formattedKey, e); } - return FAILURE; + return Status.ERROR; } } @Override - public int delete(final String table, final String key) { + public Status delete(final String table, final String key) { String formattedKey = formatKey(table, key); try { @@ -244,7 +265,7 @@ public class CouchbaseClient extends DB { if (log.isErrorEnabled()) { log.error("Could not delete value for key " + formattedKey, e); } - return FAILURE; + return Status.ERROR; } } @@ -265,11 +286,11 @@ public class CouchbaseClient extends DB { * @param future the future to potentially verify. * @return the status of the future result. */ - private int checkFutureStatus(final OperationFuture<?> future) { + private Status checkFutureStatus(final OperationFuture<?> future) { if (checkFutures) { - return future.getStatus().isSuccess() ? OK : FAILURE; + return future.getStatus().isSuccess() ? Status.OK : Status.ERROR; } else { - return OK; + return Status.OK; } } @@ -280,12 +301,11 @@ public class CouchbaseClient extends DB { * @param fields the fields to check. * @param dest the result passed back to the ycsb core. */ - private void decode(final Object source, final Set<String> fields, - final HashMap<String, ByteIterator> dest) { + private void decode(final Object source, final Set<String> fields, final HashMap<String, ByteIterator> dest) { if (useJson) { try { JsonNode json = JSON_MAPPER.readTree((String) source); - boolean checkFields = fields != null && fields.size() > 0; + boolean checkFields = fields != null && !fields.isEmpty(); for (Iterator<Map.Entry<String, JsonNode>> jsonFields = json.fields(); jsonFields.hasNext();) { Map.Entry<String, JsonNode> jsonField = jsonFields.next(); String name = jsonField.getKey(); @@ -334,6 +354,4 @@ public class CouchbaseClient extends DB { } return writer.toString(); } - - } diff --git a/couchbase/src/main/java/com/yahoo/ycsb/db/package-info.java b/couchbase/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..d1bf90412761b1742de1c35b1068e05c92460337 --- /dev/null +++ b/couchbase/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2015 - 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. + */ + +/** + * The YCSB binding for <a href="http://www.couchbase.com/">Couchbase</a>. + */ +package com.yahoo.ycsb.db; + diff --git a/distribution/pom.xml b/distribution/pom.xml index 893265b6d15a08773eab48cd24dd68dfd6723551..9f17c43ec211d41997c04f763bd2918647f00726 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>root</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> </parent> <artifactId>ycsb</artifactId> @@ -76,7 +76,22 @@ LICENSE file. </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> - <artifactId>hbase-binding</artifactId> + <artifactId>googledatastore-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>hbase094-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>hbase098-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>hbase10-binding</artifactId> <version>${project.version}</version> </dependency> <dependency> @@ -94,11 +109,26 @@ LICENSE file. <artifactId>jdbc-binding</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>kudu-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>memcached-binding</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> <artifactId>mongodb-binding</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>nosqldb-binding</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> <artifactId>orientdb-binding</artifactId> @@ -109,6 +139,16 @@ LICENSE file. <artifactId>redis-binding</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>s3-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>solr-binding</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> <artifactId>tarantool-binding</artifactId> @@ -133,6 +173,7 @@ LICENSE file. <descriptor>src/main/assembly/distribution.xml</descriptor> </descriptors> <appendAssemblyId>false</appendAssemblyId> + <tarLongFileMode>posix</tarLongFileMode> </configuration> <executions> <execution> diff --git a/doc/javadoc/allclasses-frame.html b/doc/javadoc/allclasses-frame.html deleted file mode 100644 index 082b089272b0f7b5af864828df968b1f64e50096..0000000000000000000000000000000000000000 --- a/doc/javadoc/allclasses-frame.html +++ /dev/null @@ -1,89 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -All Classes -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> - - -</HEAD> - -<BODY BGCOLOR="white"> -<FONT size="+1" CLASS="FrameHeadingFont"> -<B>All Classes</B></FONT> -<BR> - -<TABLE BORDER="0" WIDTH="100%" SUMMARY=""> -<TR> -<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb" target="classFrame">BasicDB</A> -<BR> -<A HREF="com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db" target="classFrame">CassandraClient5</A> -<BR> -<A HREF="com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db" target="classFrame">CassandraClient6</A> -<BR> -<A HREF="com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db" target="classFrame">CassandraClient7</A> -<BR> -<A HREF="com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb" target="classFrame">Client</A> -<BR> -<A HREF="com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb" target="classFrame">CommandLine</A> -<BR> -<A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads" target="classFrame">CoreWorkload</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/CounterGenerator.html" title="class in com.yahoo.ycsb.generator" target="classFrame">CounterGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb" target="classFrame">DB</A> -<BR> -<A HREF="com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb" target="classFrame">DBException</A> -<BR> -<A HREF="com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb" target="classFrame">DBFactory</A> -<BR> -<A HREF="com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb" target="classFrame">DBWrapper</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/DiscreteGenerator.html" title="class in com.yahoo.ycsb.generator" target="classFrame">DiscreteGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/Generator.html" title="class in com.yahoo.ycsb.generator" target="classFrame">Generator</A> -<BR> -<A HREF="com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db" target="classFrame">HBaseClient</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/IntegerGenerator.html" title="class in com.yahoo.ycsb.generator" target="classFrame">IntegerGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/measurements/Measurements.html" title="class in com.yahoo.ycsb.measurements" target="classFrame">Measurements</A> -<BR> -<A HREF="com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db" target="classFrame">MongoDbClient</A> -<BR> -<A HREF="com/yahoo/ycsb/measurements/OneMeasurement.html" title="class in com.yahoo.ycsb.measurements" target="classFrame">OneMeasurement</A> -<BR> -<A HREF="com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements" target="classFrame">OneMeasurementHistogram</A> -<BR> -<A HREF="com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements" target="classFrame">OneMeasurementTimeSeries</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator" target="classFrame">ScrambledZipfianGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb.generator" target="classFrame">SkewedLatestGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/UniformGenerator.html" title="class in com.yahoo.ycsb.generator" target="classFrame">UniformGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/UniformIntegerGenerator.html" title="class in com.yahoo.ycsb.generator" target="classFrame">UniformIntegerGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb" target="classFrame">UnknownDBException</A> -<BR> -<A HREF="com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb" target="classFrame">Utils</A> -<BR> -<A HREF="com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb" target="classFrame">Workload</A> -<BR> -<A HREF="com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb" target="classFrame">WorkloadException</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator" target="classFrame">ZipfianGenerator</A> -<BR> -</FONT></TD> -</TR> -</TABLE> - -</BODY> -</HTML> diff --git a/doc/javadoc/allclasses-noframe.html b/doc/javadoc/allclasses-noframe.html deleted file mode 100644 index 3946613595a18929ad0590cc857c7c295e5fb5b9..0000000000000000000000000000000000000000 --- a/doc/javadoc/allclasses-noframe.html +++ /dev/null @@ -1,89 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -All Classes -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> - - -</HEAD> - -<BODY BGCOLOR="white"> -<FONT size="+1" CLASS="FrameHeadingFont"> -<B>All Classes</B></FONT> -<BR> - -<TABLE BORDER="0" WIDTH="100%" SUMMARY=""> -<TR> -<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<BR> -<A HREF="com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<BR> -<A HREF="com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<BR> -<A HREF="com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<BR> -<A HREF="com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb">Client</A> -<BR> -<A HREF="com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb">CommandLine</A> -<BR> -<A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/CounterGenerator.html" title="class in com.yahoo.ycsb.generator">CounterGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> -<BR> -<A HREF="com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A> -<BR> -<A HREF="com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb">DBFactory</A> -<BR> -<A HREF="com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/DiscreteGenerator.html" title="class in com.yahoo.ycsb.generator">DiscreteGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/Generator.html" title="class in com.yahoo.ycsb.generator">Generator</A> -<BR> -<A HREF="com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/IntegerGenerator.html" title="class in com.yahoo.ycsb.generator">IntegerGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/measurements/Measurements.html" title="class in com.yahoo.ycsb.measurements">Measurements</A> -<BR> -<A HREF="com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db">MongoDbClient</A> -<BR> -<A HREF="com/yahoo/ycsb/measurements/OneMeasurement.html" title="class in com.yahoo.ycsb.measurements">OneMeasurement</A> -<BR> -<A HREF="com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementHistogram</A> -<BR> -<A HREF="com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementTimeSeries</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ScrambledZipfianGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb.generator">SkewedLatestGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/UniformGenerator.html" title="class in com.yahoo.ycsb.generator">UniformGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/UniformIntegerGenerator.html" title="class in com.yahoo.ycsb.generator">UniformIntegerGenerator</A> -<BR> -<A HREF="com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb">UnknownDBException</A> -<BR> -<A HREF="com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A> -<BR> -<A HREF="com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A> -<BR> -<A HREF="com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A> -<BR> -<A HREF="com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<BR> -</FONT></TD> -</TR> -</TABLE> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/BasicDB.html b/doc/javadoc/com/yahoo/ycsb/BasicDB.html deleted file mode 100644 index 2d27db6ff1e704b4989112408c689b630b256b8f..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/BasicDB.html +++ /dev/null @@ -1,511 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:52 PDT 2010 --> -<TITLE> -BasicDB -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="BasicDB"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV CLASS - <A HREF="../../../com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/BasicDB.html" target="_top"><B>FRAMES</B></A> - <A HREF="BasicDB.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class BasicDB</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.DB</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.BasicDB</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>BasicDB</B><DT>extends <A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></DL> -</PRE> - -<P> -Basic DB that just prints out the requested operations, instead of doing them against a database. -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html#SIMULATE_DELAY">SIMULATE_DELAY</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html#SIMULATE_DELAY_DEFAULT">SIMULATE_DELAY_DEFAULT</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html#VERBOSE">VERBOSE</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html#VERBOSE_DEFAULT">VERBOSE_DEFAULT</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html#BasicDB()">BasicDB</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html#delete(java.lang.String, java.lang.String)">delete</A></B>(java.lang.String table, - java.lang.String key)</CODE> - -<BR> - Delete a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html#init()">init</A></B>()</CODE> - -<BR> - Initialize any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Insert a record in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</CODE> - -<BR> - Read a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</CODE> - -<BR> - Perform a range scan for a set of records in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Update a record in the database.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.DB"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#cleanup()">cleanup</A>, <A HREF="../../../com/yahoo/ycsb/DB.html#getProperties()">getProperties</A>, <A HREF="../../../com/yahoo/ycsb/DB.html#setProperties(java.util.Properties)">setProperties</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="VERBOSE"><!-- --></A><H3> -VERBOSE</H3> -<PRE> -public static final java.lang.String <B>VERBOSE</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.BasicDB.VERBOSE">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="VERBOSE_DEFAULT"><!-- --></A><H3> -VERBOSE_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>VERBOSE_DEFAULT</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.BasicDB.VERBOSE_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="SIMULATE_DELAY"><!-- --></A><H3> -SIMULATE_DELAY</H3> -<PRE> -public static final java.lang.String <B>SIMULATE_DELAY</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.BasicDB.SIMULATE_DELAY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="SIMULATE_DELAY_DEFAULT"><!-- --></A><H3> -SIMULATE_DELAY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>SIMULATE_DELAY_DEFAULT</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.BasicDB.SIMULATE_DELAY_DEFAULT">Constant Field Values</A></DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="BasicDB()"><!-- --></A><H3> -BasicDB</H3> -<PRE> -public <B>BasicDB</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="init()"><!-- --></A><H3> -init</H3> -<PRE> -public void <B>init</B>()</PRE> -<DL> -<DD>Initialize any state for this DB. - Called once per DB instance; there is one DB instance per client thread. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#init()">init</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><!-- --></A><H3> -read</H3> -<PRE> -public int <B>read</B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</PRE> -<DL> -<DD>Read a record from the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to read.<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A HashMap of field/value pairs for the result -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><!-- --></A><H3> -scan</H3> -<PRE> -public int <B>scan</B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</PRE> -<DL> -<DD>Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>startkey</CODE> - The record key of the first record to read.<DD><CODE>recordcount</CODE> - The number of records to read<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A Vector of HashMaps, where each HashMap is a set field/value pairs for one record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="update(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -update</H3> -<PRE> -public int <B>update</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key, overwriting any existing values with the same field name. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to write.<DD><CODE>values</CODE> - A HashMap of field/value pairs to update in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="insert(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -insert</H3> -<PRE> -public int <B>insert</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to insert.<DD><CODE>values</CODE> - A HashMap of field/value pairs to insert in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="delete(java.lang.String, java.lang.String)"><!-- --></A><H3> -delete</H3> -<PRE> -public int <B>delete</B>(java.lang.String table, - java.lang.String key)</PRE> -<DL> -<DD>Delete a record from the database. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#delete(java.lang.String, java.lang.String)">delete</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to delete. -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV CLASS - <A HREF="../../../com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/BasicDB.html" target="_top"><B>FRAMES</B></A> - <A HREF="BasicDB.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/Client.html b/doc/javadoc/com/yahoo/ycsb/Client.html deleted file mode 100644 index 4855a52c66a37afa64c7d5c7480af26efd1c1b35..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/Client.html +++ /dev/null @@ -1,386 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:52 PDT 2010 --> -<TITLE> -Client -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Client"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/Client.html" target="_top"><B>FRAMES</B></A> - <A HREF="Client.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class Client</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.Client</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>Client</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -Main class for executing YCSB. -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Client.html#INSERT_COUNT_PROPERTY">INSERT_COUNT_PROPERTY</A></B></CODE> - -<BR> - Indicates how many inserts to do, if less than recordcount.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Client.html#OPERATION_COUNT_PROPERTY">OPERATION_COUNT_PROPERTY</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Client.html#RECORD_COUNT_PROPERTY">RECORD_COUNT_PROPERTY</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Client.html#WORKLOAD_PROPERTY">WORKLOAD_PROPERTY</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Client.html#Client()">Client</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static boolean</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Client.html#checkRequiredProperties(java.util.Properties)">checkRequiredProperties</A></B>(java.util.Properties props)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Client.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Client.html#usageMessage()">usageMessage</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="OPERATION_COUNT_PROPERTY"><!-- --></A><H3> -OPERATION_COUNT_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>OPERATION_COUNT_PROPERTY</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.Client.OPERATION_COUNT_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="RECORD_COUNT_PROPERTY"><!-- --></A><H3> -RECORD_COUNT_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>RECORD_COUNT_PROPERTY</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.Client.RECORD_COUNT_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="WORKLOAD_PROPERTY"><!-- --></A><H3> -WORKLOAD_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>WORKLOAD_PROPERTY</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.Client.WORKLOAD_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="INSERT_COUNT_PROPERTY"><!-- --></A><H3> -INSERT_COUNT_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>INSERT_COUNT_PROPERTY</B></PRE> -<DL> -<DD>Indicates how many inserts to do, if less than recordcount. Useful for partitioning - the load among multiple servers, if the client is the bottleneck. Additionally, workloads - should support the "insertstart" property, which tells them which record to start at. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.Client.INSERT_COUNT_PROPERTY">Constant Field Values</A></DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="Client()"><!-- --></A><H3> -Client</H3> -<PRE> -public <B>Client</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="usageMessage()"><!-- --></A><H3> -usageMessage</H3> -<PRE> -public static void <B>usageMessage</B>()</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="checkRequiredProperties(java.util.Properties)"><!-- --></A><H3> -checkRequiredProperties</H3> -<PRE> -public static boolean <B>checkRequiredProperties</B>(java.util.Properties props)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/Client.html" target="_top"><B>FRAMES</B></A> - <A HREF="Client.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/CounterGenerator.html b/doc/javadoc/com/yahoo/ycsb/CounterGenerator.html deleted file mode 100644 index d3d1f681e23e0a70e5404aec45a54a49b1fe7f40..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/CounterGenerator.html +++ /dev/null @@ -1,270 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -CounterGenerator -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.CounterGenerator class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="CounterGenerator"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/CounterGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="CounterGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class CounterGenerator</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.Generator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.IntegerGenerator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.CounterGenerator</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>CounterGenerator</B><DT>extends <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></DL> -</PRE> - -<P> -Generates a sequence of integers 0, 1, ... -<P> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/CounterGenerator.html#CounterGenerator(int)">CounterGenerator</A></B>(int countstart)</CODE> - -<BR> - Create a counter that starts at countstart</TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/CounterGenerator.html#nextInt()">nextInt</A></B>()</CODE> - -<BR> - If the generator returns numeric (integer) values, return the next value as an int.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.IntegerGenerator"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastInt()">lastInt</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastString()">lastString</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextString()">nextString</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#setLastInt(int)">setLastInt</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="CounterGenerator(int)"><!-- --></A><H3> -CounterGenerator</H3> -<PRE> -public <B>CounterGenerator</B>(int countstart)</PRE> -<DL> -<DD>Create a counter that starts at countstart -<P> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="nextInt()"><!-- --></A><H3> -nextInt</H3> -<PRE> -public int <B>nextInt</B>()</PRE> -<DL> -<DD>If the generator returns numeric (integer) values, return the next value as an int. Default is to return -1, which - is appropriate for generators that do not return numeric values. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextInt()">nextInt</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/CounterGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="CounterGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/DB.html b/doc/javadoc/com/yahoo/ycsb/DB.html deleted file mode 100644 index 199b464fc75b792c8c996382e419ca7ddd135b35..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/DB.html +++ /dev/null @@ -1,482 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:52 PDT 2010 --> -<TITLE> -DB -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="DB"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/DB.html" target="_top"><B>FRAMES</B></A> - <A HREF="DB.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class DB</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.DB</B> -</PRE> -<DL> -<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A>, <A HREF="../../../com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A>, <A HREF="../../../com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A>, <A HREF="../../../com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A>, <A HREF="../../../com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A>, <A HREF="../../../com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A>, <A HREF="../../../com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db">MongoDbClient</A></DD> -</DL> -<HR> -<DL> -<DT><PRE>public abstract class <B>DB</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -A layer for accessing a database to be benchmarked. Each thread in the client - will be given its own instance of whatever DB class is to be used in the test. - This class should be constructed using a no-argument constructor, so we can - load it dynamically. Any argument-based initialization should be - done by init(). - - Note that YCSB does not make any use of the return codes returned by this class. - Instead, it keeps a count of the return values and presents them to the user. - - The semantics of methods such as insert, update and delete vary from database - to database. In particular, operations may or may not be durable once these - methods commit, and some systems may return 'success' regardless of whether - or not a tuple with a matching key existed before the call. Rather than dictate - the exact semantics of these methods, we recommend you either implement them - to match the database's default semantics, or the semantics of your - target application. For the sake of comparison between experiments we also - recommend you explain the semantics you chose when presenting performance results. -<P> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DB.html#DB()">DB</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DB.html#cleanup()">cleanup</A></B>()</CODE> - -<BR> - Cleanup any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DB.html#delete(java.lang.String, java.lang.String)">delete</A></B>(java.lang.String table, - java.lang.String key)</CODE> - -<BR> - Delete a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.util.Properties</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DB.html#getProperties()">getProperties</A></B>()</CODE> - -<BR> - Get the set of properties for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DB.html#init()">init</A></B>()</CODE> - -<BR> - Initialize any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Insert a record in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</CODE> - -<BR> - Read a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</CODE> - -<BR> - Perform a range scan for a set of records in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DB.html#setProperties(java.util.Properties)">setProperties</A></B>(java.util.Properties p)</CODE> - -<BR> - Set the properties for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DB.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Update a record in the database.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="DB()"><!-- --></A><H3> -DB</H3> -<PRE> -public <B>DB</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="setProperties(java.util.Properties)"><!-- --></A><H3> -setProperties</H3> -<PRE> -public void <B>setProperties</B>(java.util.Properties p)</PRE> -<DL> -<DD>Set the properties for this DB. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="getProperties()"><!-- --></A><H3> -getProperties</H3> -<PRE> -public java.util.Properties <B>getProperties</B>()</PRE> -<DL> -<DD>Get the set of properties for this DB. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="init()"><!-- --></A><H3> -init</H3> -<PRE> -public void <B>init</B>() - throws <A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Initialize any state for this DB. - Called once per DB instance; there is one DB instance per client thread. -<P> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="cleanup()"><!-- --></A><H3> -cleanup</H3> -<PRE> -public void <B>cleanup</B>() - throws <A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Cleanup any state for this DB. - Called once per DB instance; there is one DB instance per client thread. -<P> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><!-- --></A><H3> -read</H3> -<PRE> -public abstract int <B>read</B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</PRE> -<DL> -<DD>Read a record from the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to read.<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A HashMap of field/value pairs for the result -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error or "not found".</DL> -</DD> -</DL> -<HR> - -<A NAME="scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><!-- --></A><H3> -scan</H3> -<PRE> -public abstract int <B>scan</B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</PRE> -<DL> -<DD>Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>startkey</CODE> - The record key of the first record to read.<DD><CODE>recordcount</CODE> - The number of records to read<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A Vector of HashMaps, where each HashMap is a set field/value pairs for one record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes.</DL> -</DD> -</DL> -<HR> - -<A NAME="update(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -update</H3> -<PRE> -public abstract int <B>update</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key, overwriting any existing values with the same field name. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to write.<DD><CODE>values</CODE> - A HashMap of field/value pairs to update in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes.</DL> -</DD> -</DL> -<HR> - -<A NAME="insert(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -insert</H3> -<PRE> -public abstract int <B>insert</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to insert.<DD><CODE>values</CODE> - A HashMap of field/value pairs to insert in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes.</DL> -</DD> -</DL> -<HR> - -<A NAME="delete(java.lang.String, java.lang.String)"><!-- --></A><H3> -delete</H3> -<PRE> -public abstract int <B>delete</B>(java.lang.String table, - java.lang.String key)</PRE> -<DL> -<DD>Delete a record from the database. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to delete. -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes.</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/DB.html" target="_top"><B>FRAMES</B></A> - <A HREF="DB.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/DBException.html b/doc/javadoc/com/yahoo/ycsb/DBException.html deleted file mode 100644 index 72e533856ab42b4047553d3bdca26a15588ef329..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/DBException.html +++ /dev/null @@ -1,286 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:52 PDT 2010 --> -<TITLE> -DBException -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="DBException"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/DBException.html" target="_top"><B>FRAMES</B></A> - <A HREF="DBException.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_java.lang.Throwable">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class DBException</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.lang.Throwable - <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.lang.Exception - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.DBException</B> -</PRE> -<DL> -<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD> -</DL> -<HR> -<DL> -<DT><PRE>public class <B>DBException</B><DT>extends java.lang.Exception</DL> -</PRE> - -<P> -Something bad happened while interacting with the database. -<P> - -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#com.yahoo.ycsb.DBException">Serialized Form</A></DL> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBException.html#DBException()">DBException</A></B>()</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBException.html#DBException(java.lang.String)">DBException</A></B>(java.lang.String message)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBException.html#DBException(java.lang.String, java.lang.Throwable)">DBException</A></B>(java.lang.String message, - java.lang.Throwable cause)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBException.html#DBException(java.lang.Throwable)">DBException</A></B>(java.lang.Throwable cause)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Throwable"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Throwable</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="DBException(java.lang.String)"><!-- --></A><H3> -DBException</H3> -<PRE> -public <B>DBException</B>(java.lang.String message)</PRE> -<DL> -</DL> -<HR> - -<A NAME="DBException()"><!-- --></A><H3> -DBException</H3> -<PRE> -public <B>DBException</B>()</PRE> -<DL> -</DL> -<HR> - -<A NAME="DBException(java.lang.String, java.lang.Throwable)"><!-- --></A><H3> -DBException</H3> -<PRE> -public <B>DBException</B>(java.lang.String message, - java.lang.Throwable cause)</PRE> -<DL> -</DL> -<HR> - -<A NAME="DBException(java.lang.Throwable)"><!-- --></A><H3> -DBException</H3> -<PRE> -public <B>DBException</B>(java.lang.Throwable cause)</PRE> -<DL> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/DBException.html" target="_top"><B>FRAMES</B></A> - <A HREF="DBException.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_java.lang.Throwable">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/DBFactory.html b/doc/javadoc/com/yahoo/ycsb/DBFactory.html deleted file mode 100644 index 6c54102f13970f5b725e7f6c35e26e8f1778d573..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/DBFactory.html +++ /dev/null @@ -1,259 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:52 PDT 2010 --> -<TITLE> -DBFactory -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="DBFactory"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/DBFactory.html" target="_top"><B>FRAMES</B></A> - <A HREF="DBFactory.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class DBFactory</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.DBFactory</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>DBFactory</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -Creates a DB layer by dynamically classloading the specified DB class. -<P> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBFactory.html#DBFactory()">DBFactory</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static <A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBFactory.html#newDB(java.lang.String, java.util.Properties)">newDB</A></B>(java.lang.String dbname, - java.util.Properties properties)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="DBFactory()"><!-- --></A><H3> -DBFactory</H3> -<PRE> -public <B>DBFactory</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="newDB(java.lang.String, java.util.Properties)"><!-- --></A><H3> -newDB</H3> -<PRE> -public static <A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> <B>newDB</B>(java.lang.String dbname, - java.util.Properties properties) - throws <A HREF="../../../com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb">UnknownDBException</A></PRE> -<DL> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb">UnknownDBException</A></CODE></DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/DBFactory.html" target="_top"><B>FRAMES</B></A> - <A HREF="DBFactory.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/DBWrapper.html b/doc/javadoc/com/yahoo/ycsb/DBWrapper.html deleted file mode 100644 index 168c837d9961ec598720b527a5c020913f14edcb..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/DBWrapper.html +++ /dev/null @@ -1,491 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:52 PDT 2010 --> -<TITLE> -DBWrapper -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="DBWrapper"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/DBWrapper.html" target="_top"><B>FRAMES</B></A> - <A HREF="DBWrapper.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class DBWrapper</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.DB</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.DBWrapper</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>DBWrapper</B><DT>extends <A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></DL> -</PRE> - -<P> -Wrapper around a "real" DB that measures latencies and counts return codes. -<P> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBWrapper.html#DBWrapper(com.yahoo.ycsb.DB)">DBWrapper</A></B>(<A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBWrapper.html#cleanup()">cleanup</A></B>()</CODE> - -<BR> - Cleanup any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBWrapper.html#delete(java.lang.String, java.lang.String)">delete</A></B>(java.lang.String table, - java.lang.String key)</CODE> - -<BR> - Delete a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.util.Properties</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBWrapper.html#getProperties()">getProperties</A></B>()</CODE> - -<BR> - Get the set of properties for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBWrapper.html#init()">init</A></B>()</CODE> - -<BR> - Initialize any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBWrapper.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Insert a record in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBWrapper.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</CODE> - -<BR> - Read a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBWrapper.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</CODE> - -<BR> - Perform a range scan for a set of records in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBWrapper.html#setProperties(java.util.Properties)">setProperties</A></B>(java.util.Properties p)</CODE> - -<BR> - Set the properties for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DBWrapper.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Update a record in the database.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="DBWrapper(com.yahoo.ycsb.DB)"><!-- --></A><H3> -DBWrapper</H3> -<PRE> -public <B>DBWrapper</B>(<A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="setProperties(java.util.Properties)"><!-- --></A><H3> -setProperties</H3> -<PRE> -public void <B>setProperties</B>(java.util.Properties p)</PRE> -<DL> -<DD>Set the properties for this DB. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#setProperties(java.util.Properties)">setProperties</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="getProperties()"><!-- --></A><H3> -getProperties</H3> -<PRE> -public java.util.Properties <B>getProperties</B>()</PRE> -<DL> -<DD>Get the set of properties for this DB. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#getProperties()">getProperties</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="init()"><!-- --></A><H3> -init</H3> -<PRE> -public void <B>init</B>() - throws <A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Initialize any state for this DB. - Called once per DB instance; there is one DB instance per client thread. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#init()">init</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="cleanup()"><!-- --></A><H3> -cleanup</H3> -<PRE> -public void <B>cleanup</B>() - throws <A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Cleanup any state for this DB. - Called once per DB instance; there is one DB instance per client thread. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#cleanup()">cleanup</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><!-- --></A><H3> -read</H3> -<PRE> -public int <B>read</B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</PRE> -<DL> -<DD>Read a record from the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to read.<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A HashMap of field/value pairs for the result -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><!-- --></A><H3> -scan</H3> -<PRE> -public int <B>scan</B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</PRE> -<DL> -<DD>Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>startkey</CODE> - The record key of the first record to read.<DD><CODE>recordcount</CODE> - The number of records to read<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A Vector of HashMaps, where each HashMap is a set field/value pairs for one record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="update(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -update</H3> -<PRE> -public int <B>update</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key, overwriting any existing values with the same field name. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to write.<DD><CODE>values</CODE> - A HashMap of field/value pairs to update in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="insert(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -insert</H3> -<PRE> -public int <B>insert</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to insert.<DD><CODE>values</CODE> - A HashMap of field/value pairs to insert in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="delete(java.lang.String, java.lang.String)"><!-- --></A><H3> -delete</H3> -<PRE> -public int <B>delete</B>(java.lang.String table, - java.lang.String key)</PRE> -<DL> -<DD>Delete a record from the database. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/DB.html#delete(java.lang.String, java.lang.String)">delete</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to delete. -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/DBWrapper.html" target="_top"><B>FRAMES</B></A> - <A HREF="DBWrapper.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/DiscreteGenerator.html b/doc/javadoc/com/yahoo/ycsb/DiscreteGenerator.html deleted file mode 100644 index 5cd28b8eecee22ae2ae264cb59c4cdf01c884452..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/DiscreteGenerator.html +++ /dev/null @@ -1,329 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -DiscreteGenerator -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.DiscreteGenerator class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="DiscreteGenerator"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/DiscreteGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="DiscreteGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class DiscreteGenerator</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.Generator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.DiscreteGenerator</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>DiscreteGenerator</B><DT>extends <A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">Generator</A></DL> -</PRE> - -<P> -Generates a distribution by choosing from a discrete set of values. -<P> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DiscreteGenerator.html#DiscreteGenerator()">DiscreteGenerator</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DiscreteGenerator.html#addValue(double, java.lang.String)">addValue</A></B>(double weight, - java.lang.String value)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DiscreteGenerator.html#lastString()">lastString</A></B>()</CODE> - -<BR> - Return the previous string generated by the distribution; e.g., returned from the last nextString() call.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DiscreteGenerator.html#nextInt()">nextInt</A></B>()</CODE> - -<BR> - If the generator returns numeric (integer) values, return the next value as an int.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/DiscreteGenerator.html#nextString()">nextString</A></B>()</CODE> - -<BR> - Generate the next string in the distribution.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="DiscreteGenerator()"><!-- --></A><H3> -DiscreteGenerator</H3> -<PRE> -public <B>DiscreteGenerator</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="nextString()"><!-- --></A><H3> -nextString</H3> -<PRE> -public java.lang.String <B>nextString</B>()</PRE> -<DL> -<DD>Generate the next string in the distribution. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/Generator.html#nextString()">nextString</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">Generator</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="nextInt()"><!-- --></A><H3> -nextInt</H3> -<PRE> -public int <B>nextInt</B>() - throws <A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A></PRE> -<DL> -<DD>If the generator returns numeric (integer) values, return the next value as an int. Default is to return -1, which - is appropriate for generators that do not return numeric values. -<P> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A></CODE> - if this generator does not support integer values</DL> -</DD> -</DL> -<HR> - -<A NAME="lastString()"><!-- --></A><H3> -lastString</H3> -<PRE> -public java.lang.String <B>lastString</B>()</PRE> -<DL> -<DD>Return the previous string generated by the distribution; e.g., returned from the last nextString() call. - Calling lastString() should not advance the distribution or have any side effects. If nextString() has not yet - been called, lastString() should return something reasonable. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/Generator.html#lastString()">lastString</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">Generator</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="addValue(double, java.lang.String)"><!-- --></A><H3> -addValue</H3> -<PRE> -public void <B>addValue</B>(double weight, - java.lang.String value)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/DiscreteGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="DiscreteGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/FindGoodAB.html b/doc/javadoc/com/yahoo/ycsb/FindGoodAB.html deleted file mode 100644 index d9fc418f0b22f78added7242356be4943ddb1638..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/FindGoodAB.html +++ /dev/null @@ -1,360 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Tue Apr 20 15:39:16 PDT 2010 --> -<TITLE> -FindGoodAB -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.FindGoodAB class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="FindGoodAB"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DiscreteGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/FindGoodScrambleVector.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/FindGoodAB.html" target="_top"><B>FRAMES</B></A> - <A HREF="FindGoodAB.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class FindGoodAB</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.FindGoodAB</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>FindGoodAB</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodAB.html#a">a</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodAB.html#b">b</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodAB.html#FindGoodAB()">FindGoodAB</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodAB.html#hash(int, int)">hash</A></B>(int val, - int itemcount)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodAB.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodAB.html#scramble(int)">scramble</A></B>(int val)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodAB.html#testVector(int)">testVector</A></B>(int itemcount)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="a"><!-- --></A><H3> -a</H3> -<PRE> -public static int <B>a</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="b"><!-- --></A><H3> -b</H3> -<PRE> -public static int <B>b</B></PRE> -<DL> -<DL> -</DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="FindGoodAB()"><!-- --></A><H3> -FindGoodAB</H3> -<PRE> -public <B>FindGoodAB</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="scramble(int)"><!-- --></A><H3> -scramble</H3> -<PRE> -public static int <B>scramble</B>(int val)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="hash(int, int)"><!-- --></A><H3> -hash</H3> -<PRE> -public static int <B>hash</B>(int val, - int itemcount)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="testVector(int)"><!-- --></A><H3> -testVector</H3> -<PRE> -public static int <B>testVector</B>(int itemcount)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DiscreteGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/FindGoodScrambleVector.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/FindGoodAB.html" target="_top"><B>FRAMES</B></A> - <A HREF="FindGoodAB.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/FindGoodScrambleVector.html b/doc/javadoc/com/yahoo/ycsb/FindGoodScrambleVector.html deleted file mode 100644 index 0157c76c97e2c95758af465398aeb516b0255322..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/FindGoodScrambleVector.html +++ /dev/null @@ -1,306 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Tue Apr 20 15:39:16 PDT 2010 --> -<TITLE> -FindGoodScrambleVector -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.FindGoodScrambleVector class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="FindGoodScrambleVector"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/FindGoodAB.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/FindGoodScrambleVector.html" target="_top"><B>FRAMES</B></A> - <A HREF="FindGoodScrambleVector.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class FindGoodScrambleVector</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.FindGoodScrambleVector</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>FindGoodScrambleVector</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodScrambleVector.html#FindGoodScrambleVector()">FindGoodScrambleVector</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodScrambleVector.html#hash(int, int)">hash</A></B>(int val, - int itemcount)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodScrambleVector.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodScrambleVector.html#scramble(int)">scramble</A></B>(int val)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int[]</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/FindGoodScrambleVector.html#scrambleArray()">scrambleArray</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="FindGoodScrambleVector()"><!-- --></A><H3> -FindGoodScrambleVector</H3> -<PRE> -public <B>FindGoodScrambleVector</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="scrambleArray()"><!-- --></A><H3> -scrambleArray</H3> -<PRE> -public static int[] <B>scrambleArray</B>()</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="scramble(int)"><!-- --></A><H3> -scramble</H3> -<PRE> -public static int <B>scramble</B>(int val)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="hash(int, int)"><!-- --></A><H3> -hash</H3> -<PRE> -public static int <B>hash</B>(int val, - int itemcount)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>args</CODE> - </DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/FindGoodAB.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/FindGoodScrambleVector.html" target="_top"><B>FRAMES</B></A> - <A HREF="FindGoodScrambleVector.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/Generator.html b/doc/javadoc/com/yahoo/ycsb/Generator.html deleted file mode 100644 index cf8462d02cf91e48e07c155fedfbacdea172dc6b..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/Generator.html +++ /dev/null @@ -1,279 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -Generator -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.Generator class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="Generator"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DiscreteGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/Generator.html" target="_top"><B>FRAMES</B></A> - <A HREF="Generator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class Generator</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.Generator</B> -</PRE> -<DL> -<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/yahoo/ycsb/DiscreteGenerator.html" title="class in com.yahoo.ycsb">DiscreteGenerator</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A>, <A HREF="../../../com/yahoo/ycsb/UniformGenerator.html" title="class in com.yahoo.ycsb">UniformGenerator</A></DD> -</DL> -<HR> -<DL> -<DT><PRE>public abstract class <B>Generator</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -An expression that generates a sequence of string values, following some distribution (Uniform, Zipfian, Sequential, etc.) -<P> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Generator.html#Generator()">Generator</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Generator.html#lastString()">lastString</A></B>()</CODE> - -<BR> - Return the previous string generated by the distribution; e.g., returned from the last nextString() call.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Generator.html#nextString()">nextString</A></B>()</CODE> - -<BR> - Generate the next string in the distribution.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="Generator()"><!-- --></A><H3> -Generator</H3> -<PRE> -public <B>Generator</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="nextString()"><!-- --></A><H3> -nextString</H3> -<PRE> -public abstract java.lang.String <B>nextString</B>()</PRE> -<DL> -<DD>Generate the next string in the distribution. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="lastString()"><!-- --></A><H3> -lastString</H3> -<PRE> -public abstract java.lang.String <B>lastString</B>()</PRE> -<DL> -<DD>Return the previous string generated by the distribution; e.g., returned from the last nextString() call. - Calling lastString() should not advance the distribution or have any side effects. If nextString() has not yet - been called, lastString() should return something reasonable. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DiscreteGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/Generator.html" target="_top"><B>FRAMES</B></A> - <A HREF="Generator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/IntegerGenerator.html b/doc/javadoc/com/yahoo/ycsb/IntegerGenerator.html deleted file mode 100644 index c8b29b9bd3b6faacc3d864fbce568ded8cc23b2b..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/IntegerGenerator.html +++ /dev/null @@ -1,355 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -IntegerGenerator -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.IntegerGenerator class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="IntegerGenerator"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/Measurements.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/IntegerGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="IntegerGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class IntegerGenerator</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.Generator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.IntegerGenerator</B> -</PRE> -<DL> -<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/yahoo/ycsb/CounterGenerator.html" title="class in com.yahoo.ycsb">CounterGenerator</A>, <A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb">ScrambledZipfianGenerator</A>, <A HREF="../../../com/yahoo/ycsb/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb">SkewedLatestGenerator</A>, <A HREF="../../../com/yahoo/ycsb/UniformIntegerGenerator.html" title="class in com.yahoo.ycsb">UniformIntegerGenerator</A>, <A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html" title="class in com.yahoo.ycsb">ZipfianGenerator</A></DD> -</DL> -<HR> -<DL> -<DT><PRE>public abstract class <B>IntegerGenerator</B><DT>extends <A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">Generator</A></DL> -</PRE> - -<P> -A generator that is capable of generating ints as well as strings -<P> - -<P> -<DL> -<DT><B>Author:</B></DT> - <DD>cooperb</DD> -</DL> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#IntegerGenerator()">IntegerGenerator</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastInt()">lastInt</A></B>()</CODE> - -<BR> - Return the previous int generated by the distribution.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastString()">lastString</A></B>()</CODE> - -<BR> - Return the previous string generated by the distribution; e.g., returned from the last nextString() call.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextInt()">nextInt</A></B>()</CODE> - -<BR> - Return the next value as an int.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextString()">nextString</A></B>()</CODE> - -<BR> - Generate the next string in the distribution.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#setLastInt(int)">setLastInt</A></B>(int last)</CODE> - -<BR> - Set the last value generated.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="IntegerGenerator()"><!-- --></A><H3> -IntegerGenerator</H3> -<PRE> -public <B>IntegerGenerator</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="setLastInt(int)"><!-- --></A><H3> -setLastInt</H3> -<PRE> -public void <B>setLastInt</B>(int last)</PRE> -<DL> -<DD>Set the last value generated. IntegerGenerator subclasses must use this call - to properly set the last string value, or the lastString() and lastInt() calls won't work. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="nextInt()"><!-- --></A><H3> -nextInt</H3> -<PRE> -public abstract int <B>nextInt</B>()</PRE> -<DL> -<DD>Return the next value as an int. When overriding this method, be sure to call setLastString() properly, or the lastString() call won't work. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="nextString()"><!-- --></A><H3> -nextString</H3> -<PRE> -public java.lang.String <B>nextString</B>()</PRE> -<DL> -<DD>Generate the next string in the distribution. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/Generator.html#nextString()">nextString</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">Generator</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="lastString()"><!-- --></A><H3> -lastString</H3> -<PRE> -public java.lang.String <B>lastString</B>()</PRE> -<DL> -<DD>Return the previous string generated by the distribution; e.g., returned from the last nextString() call. - Calling lastString() should not advance the distribution or have any side effects. If nextString() has not yet - been called, lastString() should return something reasonable. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/Generator.html#lastString()">lastString</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">Generator</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="lastInt()"><!-- --></A><H3> -lastInt</H3> -<PRE> -public int <B>lastInt</B>()</PRE> -<DL> -<DD>Return the previous int generated by the distribution. This call is unique to IntegerGenerator subclasses, and assumes - IntegerGenerator subclasses always return ints for nextInt() (e.g. not arbitrary strings). -<P> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/Measurements.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/IntegerGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="IntegerGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/Measurements.html b/doc/javadoc/com/yahoo/ycsb/Measurements.html deleted file mode 100644 index 9b1725fd352933ebdc95ca361d48e87af85b50ea..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/Measurements.html +++ /dev/null @@ -1,354 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -Measurements -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.Measurements class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="Measurements"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/Measurements.html" target="_top"><B>FRAMES</B></A> - <A HREF="Measurements.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class Measurements</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.Measurements</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>Measurements</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -Collects latency measurements, and reports them when requested. -<P> - -<P> -<DL> -<DT><B>Author:</B></DT> - <DD>cooperb</DD> -</DL> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Measurements.html#Measurements(java.util.Properties)">Measurements</A></B>(java.util.Properties props)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static <A HREF="../../../com/yahoo/ycsb/Measurements.html" title="class in com.yahoo.ycsb">Measurements</A></CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Measurements.html#getMeasurements()">getMeasurements</A></B>()</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Measurements.html#getSummary()">getSummary</A></B>()</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Measurements.html#measure(java.lang.String, int)">measure</A></B>(java.lang.String operation, - int latency)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Measurements.html#printReport(java.io.PrintStream)">printReport</A></B>(java.io.PrintStream out)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Measurements.html#reportReturnCode(java.lang.String, int)">reportReturnCode</A></B>(java.lang.String operation, - int code)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Measurements.html#setProperties(java.util.Properties)">setProperties</A></B>(java.util.Properties props)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="Measurements(java.util.Properties)"><!-- --></A><H3> -Measurements</H3> -<PRE> -public <B>Measurements</B>(java.util.Properties props)</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="setProperties(java.util.Properties)"><!-- --></A><H3> -setProperties</H3> -<PRE> -public static void <B>setProperties</B>(java.util.Properties props)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="getMeasurements()"><!-- --></A><H3> -getMeasurements</H3> -<PRE> -public static <A HREF="../../../com/yahoo/ycsb/Measurements.html" title="class in com.yahoo.ycsb">Measurements</A> <B>getMeasurements</B>()</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="measure(java.lang.String, int)"><!-- --></A><H3> -measure</H3> -<PRE> -public void <B>measure</B>(java.lang.String operation, - int latency)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="reportReturnCode(java.lang.String, int)"><!-- --></A><H3> -reportReturnCode</H3> -<PRE> -public void <B>reportReturnCode</B>(java.lang.String operation, - int code)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="printReport(java.io.PrintStream)"><!-- --></A><H3> -printReport</H3> -<PRE> -public void <B>printReport</B>(java.io.PrintStream out)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="getSummary()"><!-- --></A><H3> -getSummary</H3> -<PRE> -public java.lang.String <B>getSummary</B>()</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/Measurements.html" target="_top"><B>FRAMES</B></A> - <A HREF="Measurements.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/OneMeasurement.html b/doc/javadoc/com/yahoo/ycsb/OneMeasurement.html deleted file mode 100644 index cc3b9c0d3670e1d3278b0eb6e4ee3507ff6859c6..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/OneMeasurement.html +++ /dev/null @@ -1,332 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -OneMeasurement -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.OneMeasurement class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="OneMeasurement"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/Measurements.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/OneMeasurement.html" target="_top"><B>FRAMES</B></A> - <A HREF="OneMeasurement.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class OneMeasurement</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.OneMeasurement</B> -</PRE> -<DL> -<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb">OneMeasurementHistogram</A>, <A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb">OneMeasurementTimeSeries</A></DD> -</DL> -<HR> -<DL> -<DT><PRE>public abstract class <B>OneMeasurement</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -A single measured metric (e.g. READ LATENCY) -<P> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#OneMeasurement(java.lang.String)">OneMeasurement</A></B>(java.lang.String _name)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#getName()">getName</A></B>()</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#getSummary()">getSummary</A></B>()</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#measure(int)">measure</A></B>(int latency)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#printReport(java.io.PrintStream)">printReport</A></B>(java.io.PrintStream out)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#reportReturnCode(int)">reportReturnCode</A></B>(int code)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="OneMeasurement(java.lang.String)"><!-- --></A><H3> -OneMeasurement</H3> -<PRE> -public <B>OneMeasurement</B>(java.lang.String _name)</PRE> -<DL> -<DL> -<DT><B>Parameters:</B><DD><CODE>_name</CODE> - </DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="getName()"><!-- --></A><H3> -getName</H3> -<PRE> -public java.lang.String <B>getName</B>()</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="reportReturnCode(int)"><!-- --></A><H3> -reportReturnCode</H3> -<PRE> -public abstract void <B>reportReturnCode</B>(int code)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="measure(int)"><!-- --></A><H3> -measure</H3> -<PRE> -public abstract void <B>measure</B>(int latency)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="printReport(java.io.PrintStream)"><!-- --></A><H3> -printReport</H3> -<PRE> -public abstract void <B>printReport</B>(java.io.PrintStream out)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="getSummary()"><!-- --></A><H3> -getSummary</H3> -<PRE> -public abstract java.lang.String <B>getSummary</B>()</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/Measurements.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/OneMeasurement.html" target="_top"><B>FRAMES</B></A> - <A HREF="OneMeasurement.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/OneMeasurementHistogram.html b/doc/javadoc/com/yahoo/ycsb/OneMeasurementHistogram.html deleted file mode 100644 index 739a868cac860ecdc93313adc4601d43cd739dd5..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/OneMeasurementHistogram.html +++ /dev/null @@ -1,390 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -OneMeasurementHistogram -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.OneMeasurementHistogram class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="OneMeasurementHistogram"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/OneMeasurementHistogram.html" target="_top"><B>FRAMES</B></A> - <A HREF="OneMeasurementHistogram.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class OneMeasurementHistogram</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.OneMeasurement</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.OneMeasurementHistogram</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>OneMeasurementHistogram</B><DT>extends <A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></DL> -</PRE> - -<P> -Take measurements and maintain a histogram of a given metric, such as READ LATENCY. -<P> - -<P> -<DL> -<DT><B>Author:</B></DT> - <DD>cooperb</DD> -</DL> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html#BUCKETS">BUCKETS</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html#BUCKETS_DEFAULT">BUCKETS_DEFAULT</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html#OneMeasurementHistogram(java.lang.String, java.util.Properties)">OneMeasurementHistogram</A></B>(java.lang.String name, - java.util.Properties props)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html#getSummary()">getSummary</A></B>()</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html#measure(int)">measure</A></B>(int latency)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html#printReport(java.io.PrintStream)">printReport</A></B>(java.io.PrintStream out)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html#reportReturnCode(int)">reportReturnCode</A></B>(int code)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.OneMeasurement"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#getName()">getName</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="BUCKETS"><!-- --></A><H3> -BUCKETS</H3> -<PRE> -public static final java.lang.String <B>BUCKETS</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.OneMeasurementHistogram.BUCKETS">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="BUCKETS_DEFAULT"><!-- --></A><H3> -BUCKETS_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>BUCKETS_DEFAULT</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.OneMeasurementHistogram.BUCKETS_DEFAULT">Constant Field Values</A></DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="OneMeasurementHistogram(java.lang.String, java.util.Properties)"><!-- --></A><H3> -OneMeasurementHistogram</H3> -<PRE> -public <B>OneMeasurementHistogram</B>(java.lang.String name, - java.util.Properties props)</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="reportReturnCode(int)"><!-- --></A><H3> -reportReturnCode</H3> -<PRE> -public void <B>reportReturnCode</B>(int code)</PRE> -<DL> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#reportReturnCode(int)">reportReturnCode</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="measure(int)"><!-- --></A><H3> -measure</H3> -<PRE> -public void <B>measure</B>(int latency)</PRE> -<DL> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#measure(int)">measure</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="printReport(java.io.PrintStream)"><!-- --></A><H3> -printReport</H3> -<PRE> -public void <B>printReport</B>(java.io.PrintStream out)</PRE> -<DL> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#printReport(java.io.PrintStream)">printReport</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="getSummary()"><!-- --></A><H3> -getSummary</H3> -<PRE> -public java.lang.String <B>getSummary</B>()</PRE> -<DL> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#getSummary()">getSummary</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/OneMeasurementHistogram.html" target="_top"><B>FRAMES</B></A> - <A HREF="OneMeasurementHistogram.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/OneMeasurementTimeSeries.html b/doc/javadoc/com/yahoo/ycsb/OneMeasurementTimeSeries.html deleted file mode 100644 index cef9fa8c959820774a4dbc05828b7268e999aff3..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/OneMeasurementTimeSeries.html +++ /dev/null @@ -1,388 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -OneMeasurementTimeSeries -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.OneMeasurementTimeSeries class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="OneMeasurementTimeSeries"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/OneMeasurementTimeSeries.html" target="_top"><B>FRAMES</B></A> - <A HREF="OneMeasurementTimeSeries.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class OneMeasurementTimeSeries</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.OneMeasurement</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.OneMeasurementTimeSeries</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>OneMeasurementTimeSeries</B><DT>extends <A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></DL> -</PRE> - -<P> -A time series measurement of a metric, such as READ LATENCY. -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html#GRANULARITY">GRANULARITY</A></B></CODE> - -<BR> - Granularity for time series; measurements will be averaged in chunks of this granularity.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html#GRANULARITY_DEFAULT">GRANULARITY_DEFAULT</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html#OneMeasurementTimeSeries(java.lang.String, java.util.Properties)">OneMeasurementTimeSeries</A></B>(java.lang.String name, - java.util.Properties props)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html#getSummary()">getSummary</A></B>()</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html#measure(int)">measure</A></B>(int latency)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html#printReport(java.io.PrintStream)">printReport</A></B>(java.io.PrintStream out)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html#reportReturnCode(int)">reportReturnCode</A></B>(int code)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.OneMeasurement"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#getName()">getName</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="GRANULARITY"><!-- --></A><H3> -GRANULARITY</H3> -<PRE> -public static final java.lang.String <B>GRANULARITY</B></PRE> -<DL> -<DD>Granularity for time series; measurements will be averaged in chunks of this granularity. Units are milliseconds. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.OneMeasurementTimeSeries.GRANULARITY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="GRANULARITY_DEFAULT"><!-- --></A><H3> -GRANULARITY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>GRANULARITY_DEFAULT</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.OneMeasurementTimeSeries.GRANULARITY_DEFAULT">Constant Field Values</A></DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="OneMeasurementTimeSeries(java.lang.String, java.util.Properties)"><!-- --></A><H3> -OneMeasurementTimeSeries</H3> -<PRE> -public <B>OneMeasurementTimeSeries</B>(java.lang.String name, - java.util.Properties props)</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="measure(int)"><!-- --></A><H3> -measure</H3> -<PRE> -public void <B>measure</B>(int latency)</PRE> -<DL> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#measure(int)">measure</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="printReport(java.io.PrintStream)"><!-- --></A><H3> -printReport</H3> -<PRE> -public void <B>printReport</B>(java.io.PrintStream out)</PRE> -<DL> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#printReport(java.io.PrintStream)">printReport</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="reportReturnCode(int)"><!-- --></A><H3> -reportReturnCode</H3> -<PRE> -public void <B>reportReturnCode</B>(int code)</PRE> -<DL> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#reportReturnCode(int)">reportReturnCode</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="getSummary()"><!-- --></A><H3> -getSummary</H3> -<PRE> -public java.lang.String <B>getSummary</B>()</PRE> -<DL> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html#getSummary()">getSummary</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/OneMeasurement.html" title="class in com.yahoo.ycsb">OneMeasurement</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/OneMeasurementTimeSeries.html" target="_top"><B>FRAMES</B></A> - <A HREF="OneMeasurementTimeSeries.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/ScrambledZipfianGenerator.html b/doc/javadoc/com/yahoo/ycsb/ScrambledZipfianGenerator.html deleted file mode 100644 index 612ca61c68d07e3071b64f0696d056954a1b87b6..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/ScrambledZipfianGenerator.html +++ /dev/null @@ -1,391 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -ScrambledZipfianGenerator -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.ScrambledZipfianGenerator class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="ScrambledZipfianGenerator"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/ScrambledZipfianGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="ScrambledZipfianGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class ScrambledZipfianGenerator</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.Generator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.IntegerGenerator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.ScrambledZipfianGenerator</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>ScrambledZipfianGenerator</B><DT>extends <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></DL> -</PRE> - -<P> -A generator of a zipfian distribution. It produces a sequence of items, such that some items are more popular than others, according - to a zipfian distribution. When you construct an instance of this class, you specify the number of items in the set to draw from, either - by specifying an itemcount (so that the sequence is of items from 0 to itemcount-1) or by specifying a min and a max (so that the sequence is of - items from min to max inclusive). After you construct the instance, you can change the number of items by calling nextInt(itemcount) or nextLong(itemcount). - - Unlike @ZipfianGenerator, this class scatters the "popular" items across the itemspace. Use this, instead of @ZipfianGenerator, if you - don't want the head of the distribution (the popular items) clustered together. -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static long</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html#ITEM_COUNT">ITEM_COUNT</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static double</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html#ZETAN">ZETAN</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html#ScrambledZipfianGenerator(long)">ScrambledZipfianGenerator</A></B>(long _items)</CODE> - -<BR> - Create a zipfian generator for the specified number of items.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html#ScrambledZipfianGenerator(long, long)">ScrambledZipfianGenerator</A></B>(long _min, - long _max)</CODE> - -<BR> - Create a zipfian generator for items between min and max.</TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html#nextInt()">nextInt</A></B>()</CODE> - -<BR> - Return the next int in the sequence.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> long</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html#nextLong()">nextLong</A></B>()</CODE> - -<BR> - Return the next long in the sequence.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.IntegerGenerator"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastInt()">lastInt</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastString()">lastString</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextString()">nextString</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#setLastInt(int)">setLastInt</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="ZETAN"><!-- --></A><H3> -ZETAN</H3> -<PRE> -public static final double <B>ZETAN</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.ScrambledZipfianGenerator.ZETAN">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="ITEM_COUNT"><!-- --></A><H3> -ITEM_COUNT</H3> -<PRE> -public static final long <B>ITEM_COUNT</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.ScrambledZipfianGenerator.ITEM_COUNT">Constant Field Values</A></DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="ScrambledZipfianGenerator(long)"><!-- --></A><H3> -ScrambledZipfianGenerator</H3> -<PRE> -public <B>ScrambledZipfianGenerator</B>(long _items)</PRE> -<DL> -<DD>Create a zipfian generator for the specified number of items. -<P> -<DL> -<DT><B>Parameters:</B><DD><CODE>_items</CODE> - The number of items in the distribution.</DL> -</DL> -<HR> - -<A NAME="ScrambledZipfianGenerator(long, long)"><!-- --></A><H3> -ScrambledZipfianGenerator</H3> -<PRE> -public <B>ScrambledZipfianGenerator</B>(long _min, - long _max)</PRE> -<DL> -<DD>Create a zipfian generator for items between min and max. -<P> -<DL> -<DT><B>Parameters:</B><DD><CODE>_min</CODE> - The smallest integer to generate in the sequence.<DD><CODE>_max</CODE> - The largest integer to generate in the sequence.</DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="nextInt()"><!-- --></A><H3> -nextInt</H3> -<PRE> -public int <B>nextInt</B>()</PRE> -<DL> -<DD>Return the next int in the sequence. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextInt()">nextInt</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="nextLong()"><!-- --></A><H3> -nextLong</H3> -<PRE> -public long <B>nextLong</B>()</PRE> -<DL> -<DD>Return the next long in the sequence. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/ScrambledZipfianGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="ScrambledZipfianGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/SkewedLatestGenerator.html b/doc/javadoc/com/yahoo/ycsb/SkewedLatestGenerator.html deleted file mode 100644 index 546e80384ce74e5280b9d4bb99b267db0826edb8..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/SkewedLatestGenerator.html +++ /dev/null @@ -1,286 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -SkewedLatestGenerator -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.SkewedLatestGenerator class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="SkewedLatestGenerator"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/UniformGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/SkewedLatestGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="SkewedLatestGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class SkewedLatestGenerator</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.Generator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.IntegerGenerator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.SkewedLatestGenerator</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>SkewedLatestGenerator</B><DT>extends <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></DL> -</PRE> - -<P> -Generate a popularity distribution of items, skewed to favor recent items significantly more than older items. -<P> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/SkewedLatestGenerator.html#SkewedLatestGenerator(com.yahoo.ycsb.CounterGenerator)">SkewedLatestGenerator</A></B>(<A HREF="../../../com/yahoo/ycsb/CounterGenerator.html" title="class in com.yahoo.ycsb">CounterGenerator</A> basis)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/SkewedLatestGenerator.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/SkewedLatestGenerator.html#nextInt()">nextInt</A></B>()</CODE> - -<BR> - Generate the next string in the distribution, skewed Zipfian favoring the items most recently returned by the basis generator.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.IntegerGenerator"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastInt()">lastInt</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastString()">lastString</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextString()">nextString</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#setLastInt(int)">setLastInt</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="SkewedLatestGenerator(com.yahoo.ycsb.CounterGenerator)"><!-- --></A><H3> -SkewedLatestGenerator</H3> -<PRE> -public <B>SkewedLatestGenerator</B>(<A HREF="../../../com/yahoo/ycsb/CounterGenerator.html" title="class in com.yahoo.ycsb">CounterGenerator</A> basis)</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="nextInt()"><!-- --></A><H3> -nextInt</H3> -<PRE> -public int <B>nextInt</B>()</PRE> -<DL> -<DD>Generate the next string in the distribution, skewed Zipfian favoring the items most recently returned by the basis generator. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextInt()">nextInt</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/UniformGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/SkewedLatestGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="SkewedLatestGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/TestCollisions.html b/doc/javadoc/com/yahoo/ycsb/TestCollisions.html deleted file mode 100644 index 8356a28a6d172c472fdcf23a18816ae833870c99..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/TestCollisions.html +++ /dev/null @@ -1,360 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Tue Apr 20 15:39:17 PDT 2010 --> -<TITLE> -TestCollisions -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.TestCollisions class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="TestCollisions"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/TestExpandedZipfian.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/TestCollisions.html" target="_top"><B>FRAMES</B></A> - <A HREF="TestCollisions.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class TestCollisions</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.TestCollisions</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>TestCollisions</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/TestCollisions.html#a">a</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/TestCollisions.html#b">b</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/TestCollisions.html#TestCollisions()">TestCollisions</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/TestCollisions.html#hash(int, int)">hash</A></B>(int val, - int itemcount)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/TestCollisions.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/TestCollisions.html#scramble(int)">scramble</A></B>(int val)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/TestCollisions.html#testVector(int)">testVector</A></B>(int itemcount)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="a"><!-- --></A><H3> -a</H3> -<PRE> -public static int <B>a</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="b"><!-- --></A><H3> -b</H3> -<PRE> -public static int <B>b</B></PRE> -<DL> -<DL> -</DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="TestCollisions()"><!-- --></A><H3> -TestCollisions</H3> -<PRE> -public <B>TestCollisions</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="scramble(int)"><!-- --></A><H3> -scramble</H3> -<PRE> -public static int <B>scramble</B>(int val)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="hash(int, int)"><!-- --></A><H3> -hash</H3> -<PRE> -public static int <B>hash</B>(int val, - int itemcount)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="testVector(int)"><!-- --></A><H3> -testVector</H3> -<PRE> -public static int <B>testVector</B>(int itemcount)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/TestExpandedZipfian.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/TestCollisions.html" target="_top"><B>FRAMES</B></A> - <A HREF="TestCollisions.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/TestExpandedZipfian.html b/doc/javadoc/com/yahoo/ycsb/TestExpandedZipfian.html deleted file mode 100644 index 847a71c7052eb565647f9cd09b8422f8595c1ea4..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/TestExpandedZipfian.html +++ /dev/null @@ -1,247 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Tue Apr 20 15:39:17 PDT 2010 --> -<TITLE> -TestExpandedZipfian -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.TestExpandedZipfian class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="TestExpandedZipfian"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/TestCollisions.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/TestZipfian.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/TestExpandedZipfian.html" target="_top"><B>FRAMES</B></A> - <A HREF="TestExpandedZipfian.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class TestExpandedZipfian</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.TestExpandedZipfian</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>TestExpandedZipfian</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/TestExpandedZipfian.html#TestExpandedZipfian()">TestExpandedZipfian</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/TestExpandedZipfian.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="TestExpandedZipfian()"><!-- --></A><H3> -TestExpandedZipfian</H3> -<PRE> -public <B>TestExpandedZipfian</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/TestCollisions.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/TestZipfian.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/TestExpandedZipfian.html" target="_top"><B>FRAMES</B></A> - <A HREF="TestExpandedZipfian.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/TestZipfian.html b/doc/javadoc/com/yahoo/ycsb/TestZipfian.html deleted file mode 100644 index d0ea7113100917f062dbe2bc1de8d6054ad00859..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/TestZipfian.html +++ /dev/null @@ -1,247 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Tue Apr 20 15:39:17 PDT 2010 --> -<TITLE> -TestZipfian -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.TestZipfian class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="TestZipfian"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/TestExpandedZipfian.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/UniformGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/TestZipfian.html" target="_top"><B>FRAMES</B></A> - <A HREF="TestZipfian.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class TestZipfian</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.TestZipfian</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>TestZipfian</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/TestZipfian.html#TestZipfian()">TestZipfian</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/TestZipfian.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="TestZipfian()"><!-- --></A><H3> -TestZipfian</H3> -<PRE> -public <B>TestZipfian</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/TestExpandedZipfian.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/UniformGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/TestZipfian.html" target="_top"><B>FRAMES</B></A> - <A HREF="TestZipfian.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/UniformGenerator.html b/doc/javadoc/com/yahoo/ycsb/UniformGenerator.html deleted file mode 100644 index 89e7fdc8d5f9ef4ed6c70773e110a3acac2432c8..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/UniformGenerator.html +++ /dev/null @@ -1,285 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -UniformGenerator -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.UniformGenerator class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="UniformGenerator"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/UniformIntegerGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/UniformGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="UniformGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class UniformGenerator</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.Generator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.UniformGenerator</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>UniformGenerator</B><DT>extends <A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">Generator</A></DL> -</PRE> - -<P> -An expression that generates a random integer in the specified range -<P> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/UniformGenerator.html#UniformGenerator(java.util.Vector)">UniformGenerator</A></B>(java.util.Vector<java.lang.String> values)</CODE> - -<BR> - Creates a generator that will return strings from the specified set uniformly randomly</TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/UniformGenerator.html#lastString()">lastString</A></B>()</CODE> - -<BR> - Return the previous string generated by the distribution; e.g., returned from the last nextString() call.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/UniformGenerator.html#nextString()">nextString</A></B>()</CODE> - -<BR> - Generate the next string in the distribution.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="UniformGenerator(java.util.Vector)"><!-- --></A><H3> -UniformGenerator</H3> -<PRE> -public <B>UniformGenerator</B>(java.util.Vector<java.lang.String> values)</PRE> -<DL> -<DD>Creates a generator that will return strings from the specified set uniformly randomly -<P> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="nextString()"><!-- --></A><H3> -nextString</H3> -<PRE> -public java.lang.String <B>nextString</B>()</PRE> -<DL> -<DD>Generate the next string in the distribution. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/Generator.html#nextString()">nextString</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">Generator</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="lastString()"><!-- --></A><H3> -lastString</H3> -<PRE> -public java.lang.String <B>lastString</B>()</PRE> -<DL> -<DD>Return the previous string generated by the distribution; e.g., returned from the last nextString() call. - Calling lastString() should not advance the distribution or have any side effects. If nextString() has not yet - been called, lastString() should return something reasonable. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/Generator.html#lastString()">lastString</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">Generator</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/UniformIntegerGenerator.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/UniformGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="UniformGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/UniformIntegerGenerator.html b/doc/javadoc/com/yahoo/ycsb/UniformIntegerGenerator.html deleted file mode 100644 index 910e825fee942bc7ca05555cf3d8df6a53c96a10..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/UniformIntegerGenerator.html +++ /dev/null @@ -1,274 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -UniformIntegerGenerator -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.UniformIntegerGenerator class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="UniformIntegerGenerator"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/UniformGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/UniformIntegerGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="UniformIntegerGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class UniformIntegerGenerator</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.Generator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.IntegerGenerator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.UniformIntegerGenerator</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>UniformIntegerGenerator</B><DT>extends <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></DL> -</PRE> - -<P> -Generates integers randomly uniform from an interval. -<P> - -<P> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/UniformIntegerGenerator.html#UniformIntegerGenerator(int, int)">UniformIntegerGenerator</A></B>(int lb, - int ub)</CODE> - -<BR> - Creates a generator that will return integers uniformly randomly from the interval [lb,ub] inclusive (that is, lb and ub are possible values)</TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/UniformIntegerGenerator.html#nextInt()">nextInt</A></B>()</CODE> - -<BR> - Return the next value as an int.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.IntegerGenerator"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastInt()">lastInt</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastString()">lastString</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextString()">nextString</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#setLastInt(int)">setLastInt</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="UniformIntegerGenerator(int, int)"><!-- --></A><H3> -UniformIntegerGenerator</H3> -<PRE> -public <B>UniformIntegerGenerator</B>(int lb, - int ub)</PRE> -<DL> -<DD>Creates a generator that will return integers uniformly randomly from the interval [lb,ub] inclusive (that is, lb and ub are possible values) -<P> -<DL> -<DT><B>Parameters:</B><DD><CODE>lb</CODE> - the lower bound (inclusive) of generated values<DD><CODE>ub</CODE> - the upper bound (inclusive) of generated values</DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="nextInt()"><!-- --></A><H3> -nextInt</H3> -<PRE> -public int <B>nextInt</B>()</PRE> -<DL> -<DD><B>Description copied from class: <CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextInt()">IntegerGenerator</A></CODE></B></DD> -<DD>Return the next value as an int. When overriding this method, be sure to call setLastString() properly, or the lastString() call won't work. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextInt()">nextInt</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/UniformGenerator.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/UniformIntegerGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="UniformIntegerGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/UnknownDBException.html b/doc/javadoc/com/yahoo/ycsb/UnknownDBException.html deleted file mode 100644 index 3869cac1c31d871d4cf9eeb13b758f771df5f49e..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/UnknownDBException.html +++ /dev/null @@ -1,286 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:52 PDT 2010 --> -<TITLE> -UnknownDBException -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="UnknownDBException"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/UnknownDBException.html" target="_top"><B>FRAMES</B></A> - <A HREF="UnknownDBException.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_java.lang.Throwable">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class UnknownDBException</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.lang.Throwable - <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.lang.Exception - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.UnknownDBException</B> -</PRE> -<DL> -<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD> -</DL> -<HR> -<DL> -<DT><PRE>public class <B>UnknownDBException</B><DT>extends java.lang.Exception</DL> -</PRE> - -<P> -Could not create the specified DB. -<P> - -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#com.yahoo.ycsb.UnknownDBException">Serialized Form</A></DL> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/UnknownDBException.html#UnknownDBException()">UnknownDBException</A></B>()</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/UnknownDBException.html#UnknownDBException(java.lang.String)">UnknownDBException</A></B>(java.lang.String message)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/UnknownDBException.html#UnknownDBException(java.lang.String, java.lang.Throwable)">UnknownDBException</A></B>(java.lang.String message, - java.lang.Throwable cause)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/UnknownDBException.html#UnknownDBException(java.lang.Throwable)">UnknownDBException</A></B>(java.lang.Throwable cause)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Throwable"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Throwable</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="UnknownDBException(java.lang.String)"><!-- --></A><H3> -UnknownDBException</H3> -<PRE> -public <B>UnknownDBException</B>(java.lang.String message)</PRE> -<DL> -</DL> -<HR> - -<A NAME="UnknownDBException()"><!-- --></A><H3> -UnknownDBException</H3> -<PRE> -public <B>UnknownDBException</B>()</PRE> -<DL> -</DL> -<HR> - -<A NAME="UnknownDBException(java.lang.String, java.lang.Throwable)"><!-- --></A><H3> -UnknownDBException</H3> -<PRE> -public <B>UnknownDBException</B>(java.lang.String message, - java.lang.Throwable cause)</PRE> -<DL> -</DL> -<HR> - -<A NAME="UnknownDBException(java.lang.Throwable)"><!-- --></A><H3> -UnknownDBException</H3> -<PRE> -public <B>UnknownDBException</B>(java.lang.Throwable cause)</PRE> -<DL> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/UnknownDBException.html" target="_top"><B>FRAMES</B></A> - <A HREF="UnknownDBException.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_java.lang.Throwable">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/Utils.html b/doc/javadoc/com/yahoo/ycsb/Utils.html deleted file mode 100644 index 42d5689864da6d9c27fcee15ac45ba0202543777..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/Utils.html +++ /dev/null @@ -1,411 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:52 PDT 2010 --> -<TITLE> -Utils -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Utils"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/Utils.html" target="_top"><B>FRAMES</B></A> - <A HREF="Utils.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class Utils</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.Utils</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>Utils</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -Utility functions. -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Utils.html#FNV_offset_basis_32">FNV_offset_basis_32</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static long</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Utils.html#FNV_offset_basis_64">FNV_offset_basis_64</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Utils.html#FNV_prime_32">FNV_prime_32</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static long</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Utils.html#FNV_prime_64">FNV_prime_64</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Utils.html#Utils()">Utils</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Utils.html#ASCIIString(int)">ASCIIString</A></B>(int length)</CODE> - -<BR> - Generate a random ASCII string of a given length.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Utils.html#FNVhash32(int)">FNVhash32</A></B>(int val)</CODE> - -<BR> - 32 bit FNV hash.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static long</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Utils.html#FNVhash64(long)">FNVhash64</A></B>(long val)</CODE> - -<BR> - 64 bit FNV hash.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Utils.html#hash(int)">hash</A></B>(int val)</CODE> - -<BR> - Hash an integer value.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="FNV_offset_basis_32"><!-- --></A><H3> -FNV_offset_basis_32</H3> -<PRE> -public static final int <B>FNV_offset_basis_32</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.Utils.FNV_offset_basis_32">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="FNV_prime_32"><!-- --></A><H3> -FNV_prime_32</H3> -<PRE> -public static final int <B>FNV_prime_32</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.Utils.FNV_prime_32">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="FNV_offset_basis_64"><!-- --></A><H3> -FNV_offset_basis_64</H3> -<PRE> -public static final long <B>FNV_offset_basis_64</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.Utils.FNV_offset_basis_64">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="FNV_prime_64"><!-- --></A><H3> -FNV_prime_64</H3> -<PRE> -public static final long <B>FNV_prime_64</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.Utils.FNV_prime_64">Constant Field Values</A></DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="Utils()"><!-- --></A><H3> -Utils</H3> -<PRE> -public <B>Utils</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="ASCIIString(int)"><!-- --></A><H3> -ASCIIString</H3> -<PRE> -public static java.lang.String <B>ASCIIString</B>(int length)</PRE> -<DL> -<DD>Generate a random ASCII string of a given length. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="hash(int)"><!-- --></A><H3> -hash</H3> -<PRE> -public static int <B>hash</B>(int val)</PRE> -<DL> -<DD>Hash an integer value. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="FNVhash32(int)"><!-- --></A><H3> -FNVhash32</H3> -<PRE> -public static int <B>FNVhash32</B>(int val)</PRE> -<DL> -<DD>32 bit FNV hash. Produces more "random" hashes than (say) String.hashCode(). -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>val</CODE> - The value to hash. -<DT><B>Returns:</B><DD>The hash value</DL> -</DD> -</DL> -<HR> - -<A NAME="FNVhash64(long)"><!-- --></A><H3> -FNVhash64</H3> -<PRE> -public static long <B>FNVhash64</B>(long val)</PRE> -<DL> -<DD>64 bit FNV hash. Produces more "random" hashes than (say) String.hashCode(). -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>val</CODE> - The value to hash. -<DT><B>Returns:</B><DD>The hash value</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/Utils.html" target="_top"><B>FRAMES</B></A> - <A HREF="Utils.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/Workload.html b/doc/javadoc/com/yahoo/ycsb/Workload.html deleted file mode 100644 index 86547bc4351085dedb934be0d813ee5dd7f7ca8f..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/Workload.html +++ /dev/null @@ -1,443 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:52 PDT 2010 --> -<TITLE> -Workload -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Workload"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/Workload.html" target="_top"><B>FRAMES</B></A> - <A HREF="Workload.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class Workload</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.Workload</B> -</PRE> -<DL> -<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A></DD> -</DL> -<HR> -<DL> -<DT><PRE>public abstract class <B>Workload</B><DT>extends java.lang.Object</DL> -</PRE> - -<P> -One experiment scenario. One object of this type will - be instantiated and shared among all client threads. This class - should be constructed using a no-argument constructor, so we can - load it dynamically. Any argument-based initialization should be - done by init(). - - If you extend this class, you should support the "insertstart" property. This - allows the load phase to proceed from multiple clients on different machines, in case - the client is the bottleneck. For example, if we want to load 1 million records from - 2 machines, the first machine should have insertstart=0 and the second insertstart=500000. Additionally, - the "insertcount" property, which is interpreted by Client, can be used to tell each instance of the - client how many inserts to do. In the example above, both clients should have insertcount=500000. -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Workload.html#INSERT_START_PROPERTY">INSERT_START_PROPERTY</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Workload.html#INSERT_START_PROPERTY_DEFAULT">INSERT_START_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Workload.html#Workload()">Workload</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Workload.html#cleanup()">cleanup</A></B>()</CODE> - -<BR> - Cleanup the scenario.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract boolean</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Workload.html#doInsert(com.yahoo.ycsb.DB, java.lang.Object)">doInsert</A></B>(<A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db, - java.lang.Object threadstate)</CODE> - -<BR> - Do one insert operation.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>abstract boolean</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Workload.html#doTransaction(com.yahoo.ycsb.DB, java.lang.Object)">doTransaction</A></B>(<A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db, - java.lang.Object threadstate)</CODE> - -<BR> - Do one transaction operation.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Workload.html#init(java.util.Properties)">init</A></B>(java.util.Properties p)</CODE> - -<BR> - Initialize the scenario.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.Object</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/Workload.html#initThread(java.util.Properties, int, int)">initThread</A></B>(java.util.Properties p, - int mythreadid, - int threadcount)</CODE> - -<BR> - Initialize any state for a particular client thread.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="INSERT_START_PROPERTY"><!-- --></A><H3> -INSERT_START_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>INSERT_START_PROPERTY</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.Workload.INSERT_START_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="INSERT_START_PROPERTY_DEFAULT"><!-- --></A><H3> -INSERT_START_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>INSERT_START_PROPERTY_DEFAULT</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.Workload.INSERT_START_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="Workload()"><!-- --></A><H3> -Workload</H3> -<PRE> -public <B>Workload</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="init(java.util.Properties)"><!-- --></A><H3> -init</H3> -<PRE> -public void <B>init</B>(java.util.Properties p) - throws <A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A></PRE> -<DL> -<DD>Initialize the scenario. Create any generators and other shared objects here. - Called once, in the main client thread, before any operations are started. -<P> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="initThread(java.util.Properties, int, int)"><!-- --></A><H3> -initThread</H3> -<PRE> -public java.lang.Object <B>initThread</B>(java.util.Properties p, - int mythreadid, - int threadcount) - throws <A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A></PRE> -<DL> -<DD>Initialize any state for a particular client thread. Since the scenario object - will be shared among all threads, this is the place to create any state that is specific - to one thread. To be clear, this means the returned object should be created anew on each - call to initThread(); do not return the same object multiple times. - The returned object will be passed to invocations of doInsert() and doTransaction() - for this thread. There should be no side effects from this call; all state should be encapsulated - in the returned object. If you have no state to retain for this thread, return null. (But if you have - no state to retain for this thread, probably you don't need to override initThread().) -<P> -<DD><DL> - -<DT><B>Returns:</B><DD>false if the workload knows it is done for this thread. Client will terminate the thread. Return true otherwise. Return true for workloads that rely on operationcount. For workloads that read traces from a file, return true when there are more to do, false when you are done. -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="cleanup()"><!-- --></A><H3> -cleanup</H3> -<PRE> -public void <B>cleanup</B>() - throws <A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A></PRE> -<DL> -<DD>Cleanup the scenario. Called once, in the main client thread, after all operations have completed. -<P> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="doInsert(com.yahoo.ycsb.DB, java.lang.Object)"><!-- --></A><H3> -doInsert</H3> -<PRE> -public abstract boolean <B>doInsert</B>(<A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db, - java.lang.Object threadstate)</PRE> -<DL> -<DD>Do one insert operation. Because it will be called concurrently from multiple client threads, this - function must be thread safe. However, avoid synchronized, or the threads will block waiting for each - other, and it will be difficult to reach the target throughput. Ideally, this function would have no side - effects other than DB operations and mutations on threadstate. Mutations to threadstate do not need to be - synchronized, since each thread has its own threadstate instance. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="doTransaction(com.yahoo.ycsb.DB, java.lang.Object)"><!-- --></A><H3> -doTransaction</H3> -<PRE> -public abstract boolean <B>doTransaction</B>(<A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db, - java.lang.Object threadstate)</PRE> -<DL> -<DD>Do one transaction operation. Because it will be called concurrently from multiple client threads, this - function must be thread safe. However, avoid synchronized, or the threads will block waiting for each - other, and it will be difficult to reach the target throughput. Ideally, this function would have no side - effects other than DB operations and mutations on threadstate. Mutations to threadstate do not need to be - synchronized, since each thread has its own threadstate instance. -<P> -<DD><DL> - -<DT><B>Returns:</B><DD>false if the workload knows it is done for this thread. Client will terminate the thread. Return true otherwise. Return true for workloads that rely on operationcount. For workloads that read traces from a file, return true when there are more to do, false when you are done.</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - <A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/Workload.html" target="_top"><B>FRAMES</B></A> - <A HREF="Workload.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/WorkloadException.html b/doc/javadoc/com/yahoo/ycsb/WorkloadException.html deleted file mode 100644 index 95b75dc5f80c4e2dda0adb01b636ce401de52123..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/WorkloadException.html +++ /dev/null @@ -1,286 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:52 PDT 2010 --> -<TITLE> -WorkloadException -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="WorkloadException"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - NEXT CLASS</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/WorkloadException.html" target="_top"><B>FRAMES</B></A> - <A HREF="WorkloadException.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_java.lang.Throwable">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class WorkloadException</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.lang.Throwable - <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.lang.Exception - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.WorkloadException</B> -</PRE> -<DL> -<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD> -</DL> -<HR> -<DL> -<DT><PRE>public class <B>WorkloadException</B><DT>extends java.lang.Exception</DL> -</PRE> - -<P> -The workload tried to do something bad. -<P> - -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#com.yahoo.ycsb.WorkloadException">Serialized Form</A></DL> -<HR> - -<P> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/WorkloadException.html#WorkloadException()">WorkloadException</A></B>()</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/WorkloadException.html#WorkloadException(java.lang.String)">WorkloadException</A></B>(java.lang.String message)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/WorkloadException.html#WorkloadException(java.lang.String, java.lang.Throwable)">WorkloadException</A></B>(java.lang.String message, - java.lang.Throwable cause)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/WorkloadException.html#WorkloadException(java.lang.Throwable)">WorkloadException</A></B>(java.lang.Throwable cause)</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Throwable"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Throwable</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="WorkloadException(java.lang.String)"><!-- --></A><H3> -WorkloadException</H3> -<PRE> -public <B>WorkloadException</B>(java.lang.String message)</PRE> -<DL> -</DL> -<HR> - -<A NAME="WorkloadException()"><!-- --></A><H3> -WorkloadException</H3> -<PRE> -public <B>WorkloadException</B>()</PRE> -<DL> -</DL> -<HR> - -<A NAME="WorkloadException(java.lang.String, java.lang.Throwable)"><!-- --></A><H3> -WorkloadException</H3> -<PRE> -public <B>WorkloadException</B>(java.lang.String message, - java.lang.Throwable cause)</PRE> -<DL> -</DL> -<HR> - -<A NAME="WorkloadException(java.lang.Throwable)"><!-- --></A><H3> -WorkloadException</H3> -<PRE> -public <B>WorkloadException</B>(java.lang.Throwable cause)</PRE> -<DL> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - NEXT CLASS</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/WorkloadException.html" target="_top"><B>FRAMES</B></A> - <A HREF="WorkloadException.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_java.lang.Throwable">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/ZipfianGenerator.html b/doc/javadoc/com/yahoo/ycsb/ZipfianGenerator.html deleted file mode 100644 index b1672c86815d0459a66d9ff02dd5a726668a1248..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/ZipfianGenerator.html +++ /dev/null @@ -1,495 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Fri Apr 23 10:24:25 PDT 2010 --> -<TITLE> -ZipfianGenerator -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.ZipfianGenerator class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="ZipfianGenerator"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - NEXT CLASS</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/ZipfianGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="ZipfianGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb</FONT> -<BR> -Class ZipfianGenerator</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/Generator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.Generator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.IntegerGenerator</A> - <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.ZipfianGenerator</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>ZipfianGenerator</B><DT>extends <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></DL> -</PRE> - -<P> -A generator of a zipfian distribution. It produces a sequence of items, such that some items are more popular than others, according - to a zipfian distribution. When you construct an instance of this class, you specify the number of items in the set to draw from, either - by specifying an itemcount (so that the sequence is of items from 0 to itemcount-1) or by specifying a min and a max (so that the sequence is of - items from min to max inclusive). After you construct the instance, you can change the number of items by calling nextInt(itemcount) or nextLong(itemcount). - - Note that the popular items will be clustered together, e.g. item 0 is the most popular, item 1 the second most popular, and so on (or min is the most - popular, min+1 the next most popular, etc.) If you don't want this clustering, and instead want the popular items scattered throughout the - item space, then use ScrambledZipfianGenerator instead. - - Be aware: initializing this generator may take a long time if there are lots of items to choose from (e.g. over a minute - for 100 million objects). This is because certain mathematical values need to be computed to properly generate a zipfian skew, and one of those - values (zeta) is a sum sequence from 1 to n, where n is the itemcount. Note that if you increase the number of items in the set, we can compute - a new zeta incrementally, so it should be fast unless you have added millions of items. However, if you decrease the number of items, we recompute - zeta from scratch, so this can take a long time. -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static double</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html#ZIPFIAN_CONSTANT">ZIPFIAN_CONSTANT</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html#ZipfianGenerator(long)">ZipfianGenerator</A></B>(long _items)</CODE> - -<BR> - Create a zipfian generator for the specified number of items.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html#ZipfianGenerator(long, double)">ZipfianGenerator</A></B>(long _items, - double _zipfianconstant)</CODE> - -<BR> - Create a zipfian generator for the specified number of items using the specified zipfian constant.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html#ZipfianGenerator(long, long)">ZipfianGenerator</A></B>(long _min, - long _max)</CODE> - -<BR> - Create a zipfian generator for items between min and max.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html#ZipfianGenerator(long, long, double)">ZipfianGenerator</A></B>(long min, - long max, - double _zipfianconstant)</CODE> - -<BR> - Create a zipfian generator for items between min and max (inclusive) for the specified zipfian constant.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html#ZipfianGenerator(long, long, double, double)">ZipfianGenerator</A></B>(long min, - long max, - double _zipfianconstant, - double _zetan)</CODE> - -<BR> - Create a zipfian generator for items between min and max (inclusive) for the specified zipfian constant, using the precomputed value of zeta.</TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html#nextInt()">nextInt</A></B>()</CODE> - -<BR> - Return the next value, skewed by the Zipfian distribution.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html#nextInt(int)">nextInt</A></B>(int itemcount)</CODE> - -<BR> - Generate the next item.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> long</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html#nextLong()">nextLong</A></B>()</CODE> - -<BR> - Return the next value, skewed by the Zipfian distribution.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> long</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../com/yahoo/ycsb/ZipfianGenerator.html#nextLong(long)">nextLong</A></B>(long itemcount)</CODE> - -<BR> - Generate the next item as a long.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.IntegerGenerator"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastInt()">lastInt</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#lastString()">lastString</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextString()">nextString</A>, <A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#setLastInt(int)">setLastInt</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="ZIPFIAN_CONSTANT"><!-- --></A><H3> -ZIPFIAN_CONSTANT</H3> -<PRE> -public static final double <B>ZIPFIAN_CONSTANT</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.yahoo.ycsb.ZipfianGenerator.ZIPFIAN_CONSTANT">Constant Field Values</A></DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="ZipfianGenerator(long)"><!-- --></A><H3> -ZipfianGenerator</H3> -<PRE> -public <B>ZipfianGenerator</B>(long _items)</PRE> -<DL> -<DD>Create a zipfian generator for the specified number of items. -<P> -<DL> -<DT><B>Parameters:</B><DD><CODE>_items</CODE> - The number of items in the distribution.</DL> -</DL> -<HR> - -<A NAME="ZipfianGenerator(long, long)"><!-- --></A><H3> -ZipfianGenerator</H3> -<PRE> -public <B>ZipfianGenerator</B>(long _min, - long _max)</PRE> -<DL> -<DD>Create a zipfian generator for items between min and max. -<P> -<DL> -<DT><B>Parameters:</B><DD><CODE>_min</CODE> - The smallest integer to generate in the sequence.<DD><CODE>_max</CODE> - The largest integer to generate in the sequence.</DL> -</DL> -<HR> - -<A NAME="ZipfianGenerator(long, double)"><!-- --></A><H3> -ZipfianGenerator</H3> -<PRE> -public <B>ZipfianGenerator</B>(long _items, - double _zipfianconstant)</PRE> -<DL> -<DD>Create a zipfian generator for the specified number of items using the specified zipfian constant. -<P> -<DL> -<DT><B>Parameters:</B><DD><CODE>_items</CODE> - The number of items in the distribution.<DD><CODE>_zipfianconstant</CODE> - The zipfian constant to use.</DL> -</DL> -<HR> - -<A NAME="ZipfianGenerator(long, long, double)"><!-- --></A><H3> -ZipfianGenerator</H3> -<PRE> -public <B>ZipfianGenerator</B>(long min, - long max, - double _zipfianconstant)</PRE> -<DL> -<DD>Create a zipfian generator for items between min and max (inclusive) for the specified zipfian constant. -<P> -<DL> -<DT><B>Parameters:</B><DD><CODE>min</CODE> - The smallest integer to generate in the sequence.<DD><CODE>max</CODE> - The largest integer to generate in the sequence.<DD><CODE>_zipfianconstant</CODE> - The zipfian constant to use.</DL> -</DL> -<HR> - -<A NAME="ZipfianGenerator(long, long, double, double)"><!-- --></A><H3> -ZipfianGenerator</H3> -<PRE> -public <B>ZipfianGenerator</B>(long min, - long max, - double _zipfianconstant, - double _zetan)</PRE> -<DL> -<DD>Create a zipfian generator for items between min and max (inclusive) for the specified zipfian constant, using the precomputed value of zeta. -<P> -<DL> -<DT><B>Parameters:</B><DD><CODE>min</CODE> - The smallest integer to generate in the sequence.<DD><CODE>max</CODE> - The largest integer to generate in the sequence.<DD><CODE>_zipfianconstant</CODE> - The zipfian constant to use.<DD><CODE>_zetan</CODE> - The precomputed zeta constant.</DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="nextInt(int)"><!-- --></A><H3> -nextInt</H3> -<PRE> -public int <B>nextInt</B>(int itemcount)</PRE> -<DL> -<DD>Generate the next item. this distribution will be skewed toward lower integers; e.g. 0 will - be the most popular, 1 the next most popular, etc. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>itemcount</CODE> - The number of items in the distribution. -<DT><B>Returns:</B><DD>The next item in the sequence.</DL> -</DD> -</DL> -<HR> - -<A NAME="nextLong(long)"><!-- --></A><H3> -nextLong</H3> -<PRE> -public long <B>nextLong</B>(long itemcount)</PRE> -<DL> -<DD>Generate the next item as a long. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>itemcount</CODE> - The number of items in the distribution. -<DT><B>Returns:</B><DD>The next item in the sequence.</DL> -</DD> -</DL> -<HR> - -<A NAME="nextInt()"><!-- --></A><H3> -nextInt</H3> -<PRE> -public int <B>nextInt</B>()</PRE> -<DL> -<DD>Return the next value, skewed by the Zipfian distribution. The 0th item will be the most popular, followed by the 1st, followed - by the 2nd, etc. (Or, if min != 0, the min-th item is the most popular, the min+1th item the next most popular, etc.) If you want the - popular items scattered throughout the item space, use ScrambledZipfianGenerator instead. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html#nextInt()">nextInt</A></CODE> in class <CODE><A HREF="../../../com/yahoo/ycsb/IntegerGenerator.html" title="class in com.yahoo.ycsb">IntegerGenerator</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="nextLong()"><!-- --></A><H3> -nextLong</H3> -<PRE> -public long <B>nextLong</B>()</PRE> -<DL> -<DD>Return the next value, skewed by the Zipfian distribution. The 0th item will be the most popular, followed by the 1st, followed - by the 2nd, etc. (Or, if min != 0, the min-th item is the most popular, the min+1th item the next most popular, etc.) If you want the - popular items scattered throughout the item space, use ScrambledZipfianGenerator instead. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb"><B>PREV CLASS</B></A> - NEXT CLASS</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/ZipfianGenerator.html" target="_top"><B>FRAMES</B></A> - <A HREF="ZipfianGenerator.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/db/CassandraClient.html b/doc/javadoc/com/yahoo/ycsb/db/CassandraClient.html deleted file mode 100644 index 6b6b21bd56c0ef2866eabcf2c9d0d3f6e3cfceca..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/db/CassandraClient.html +++ /dev/null @@ -1,630 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.5.0_22) on Mon Apr 19 13:46:54 PDT 2010 --> -<TITLE> -CassandraClient -</TITLE> - -<META NAME="keywords" CONTENT="com.yahoo.ycsb.db.CassandraClient class"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - parent.document.title="CassandraClient"; -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV CLASS - <A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/CassandraClient.html" target="_top"><B>FRAMES</B></A> - <A HREF="CassandraClient.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb.db</FONT> -<BR> -Class CassandraClient</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.DB</A> - <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.db.CassandraClient</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>CassandraClient</B><DT>extends <A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></DL> -</PRE> - -<P> -XXXX if we do replication, fix the consistency levels -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#CONNECTION_RETRY_PROPERTY">CONNECTION_RETRY_PROPERTY</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#CONNECTION_RETRY_PROPERTY_DEFAULT">CONNECTION_RETRY_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#ConnectionRetries">ConnectionRetries</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#Error">Error</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#Ok">Ok</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#OPERATION_RETRY_PROPERTY">OPERATION_RETRY_PROPERTY</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#OPERATION_RETRY_PROPERTY_DEFAULT">OPERATION_RETRY_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#OperationRetries">OperationRetries</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#CassandraClient()">CassandraClient</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#cleanup()">cleanup</A></B>()</CODE> - -<BR> - Cleanup any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#delete(java.lang.String, java.lang.String)">delete</A></B>(java.lang.String table, - java.lang.String key)</CODE> - -<BR> - Delete a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#init()">init</A></B>()</CODE> - -<BR> - Initialize any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Insert a record in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</CODE> - -<BR> - Read a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</CODE> - -<BR> - Perform a range scan for a set of records in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Update a record in the database.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.DB"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#getProperties()">getProperties</A>, <A HREF="../../../../com/yahoo/ycsb/DB.html#setProperties(java.util.Properties)">setProperties</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="Ok"><!-- --></A><H3> -Ok</H3> -<PRE> -public static final int <B>Ok</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.CassandraClient.Ok">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="Error"><!-- --></A><H3> -Error</H3> -<PRE> -public static final int <B>Error</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.CassandraClient.Error">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="ConnectionRetries"><!-- --></A><H3> -ConnectionRetries</H3> -<PRE> -public int <B>ConnectionRetries</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="OperationRetries"><!-- --></A><H3> -OperationRetries</H3> -<PRE> -public int <B>OperationRetries</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="CONNECTION_RETRY_PROPERTY"><!-- --></A><H3> -CONNECTION_RETRY_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>CONNECTION_RETRY_PROPERTY</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.CassandraClient.CONNECTION_RETRY_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="CONNECTION_RETRY_PROPERTY_DEFAULT"><!-- --></A><H3> -CONNECTION_RETRY_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>CONNECTION_RETRY_PROPERTY_DEFAULT</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.CassandraClient.CONNECTION_RETRY_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="OPERATION_RETRY_PROPERTY"><!-- --></A><H3> -OPERATION_RETRY_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>OPERATION_RETRY_PROPERTY</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.CassandraClient.OPERATION_RETRY_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="OPERATION_RETRY_PROPERTY_DEFAULT"><!-- --></A><H3> -OPERATION_RETRY_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>OPERATION_RETRY_PROPERTY_DEFAULT</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.CassandraClient.OPERATION_RETRY_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="CassandraClient()"><!-- --></A><H3> -CassandraClient</H3> -<PRE> -public <B>CassandraClient</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="init()"><!-- --></A><H3> -init</H3> -<PRE> -public void <B>init</B>() - throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Initialize any state for this DB. - Called once per DB instance; there is one DB instance per client thread. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#init()">init</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="cleanup()"><!-- --></A><H3> -cleanup</H3> -<PRE> -public void <B>cleanup</B>() - throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Cleanup any state for this DB. - Called once per DB instance; there is one DB instance per client thread. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#cleanup()">cleanup</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><!-- --></A><H3> -read</H3> -<PRE> -public int <B>read</B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</PRE> -<DL> -<DD>Read a record from the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to read.<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A HashMap of field/value pairs for the result -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><!-- --></A><H3> -scan</H3> -<PRE> -public int <B>scan</B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</PRE> -<DL> -<DD>Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>startkey</CODE> - The record key of the first record to read.<DD><CODE>recordcount</CODE> - The number of records to read<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A Vector of HashMaps, where each HashMap is a set field/value pairs for one record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="update(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -update</H3> -<PRE> -public int <B>update</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key, overwriting any existing values with the same field name. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to write.<DD><CODE>values</CODE> - A HashMap of field/value pairs to update in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="insert(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -insert</H3> -<PRE> -public int <B>insert</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to insert.<DD><CODE>values</CODE> - A HashMap of field/value pairs to insert in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="delete(java.lang.String, java.lang.String)"><!-- --></A><H3> -delete</H3> -<PRE> -public int <B>delete</B>(java.lang.String table, - java.lang.String key)</PRE> -<DL> -<DD>Delete a record from the database. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#delete(java.lang.String, java.lang.String)">delete</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to delete. -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV CLASS - <A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/CassandraClient.html" target="_top"><B>FRAMES</B></A> - <A HREF="CassandraClient.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/db/HBaseClient.html b/doc/javadoc/com/yahoo/ycsb/db/HBaseClient.html deleted file mode 100644 index 3b20459188c843245b42683fe6e9ffc76249c549..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/db/HBaseClient.html +++ /dev/null @@ -1,691 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -HBaseClient -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="HBaseClient"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db"><B>PREV CLASS</B></A> - <A HREF="../../../../com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/HBaseClient.html" target="_top"><B>FRAMES</B></A> - <A HREF="HBaseClient.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb.db</FONT> -<BR> -Class HBaseClient</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.DB</A> - <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.db.HBaseClient</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>HBaseClient</B><DT>extends <A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></DL> -</PRE> - -<P> -HBase client for YCSB framework -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#_columnFamily">_columnFamily</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> byte[]</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#_columnFamilyBytes">_columnFamilyBytes</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> boolean</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#_debug">_debug</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> HTable</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#_hTable">_hTable</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#_table">_table</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#HttpError">HttpError</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#NoMatchingRecord">NoMatchingRecord</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#Ok">Ok</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#ServerError">ServerError</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.Object</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#tableLock">tableLock</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#HBaseClient()">HBaseClient</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#cleanup()">cleanup</A></B>()</CODE> - -<BR> - Cleanup any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#delete(java.lang.String, java.lang.String)">delete</A></B>(java.lang.String table, - java.lang.String key)</CODE> - -<BR> - Delete a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#getHTable(java.lang.String)">getHTable</A></B>(java.lang.String table)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#init()">init</A></B>()</CODE> - -<BR> - Initialize any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Insert a record in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</CODE> - -<BR> - Read a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</CODE> - -<BR> - Perform a range scan for a set of records in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Update a record in the database.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.DB"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#getProperties()">getProperties</A>, <A HREF="../../../../com/yahoo/ycsb/DB.html#setProperties(java.util.Properties)">setProperties</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="_debug"><!-- --></A><H3> -_debug</H3> -<PRE> -public boolean <B>_debug</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="_table"><!-- --></A><H3> -_table</H3> -<PRE> -public java.lang.String <B>_table</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="_hTable"><!-- --></A><H3> -_hTable</H3> -<PRE> -public HTable <B>_hTable</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="_columnFamily"><!-- --></A><H3> -_columnFamily</H3> -<PRE> -public java.lang.String <B>_columnFamily</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="_columnFamilyBytes"><!-- --></A><H3> -_columnFamilyBytes</H3> -<PRE> -public byte[] <B>_columnFamilyBytes</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="Ok"><!-- --></A><H3> -Ok</H3> -<PRE> -public static final int <B>Ok</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.HBaseClient.Ok">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="ServerError"><!-- --></A><H3> -ServerError</H3> -<PRE> -public static final int <B>ServerError</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.HBaseClient.ServerError">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="HttpError"><!-- --></A><H3> -HttpError</H3> -<PRE> -public static final int <B>HttpError</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.HBaseClient.HttpError">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="NoMatchingRecord"><!-- --></A><H3> -NoMatchingRecord</H3> -<PRE> -public static final int <B>NoMatchingRecord</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.HBaseClient.NoMatchingRecord">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="tableLock"><!-- --></A><H3> -tableLock</H3> -<PRE> -public static java.lang.Object <B>tableLock</B></PRE> -<DL> -<DL> -</DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="HBaseClient()"><!-- --></A><H3> -HBaseClient</H3> -<PRE> -public <B>HBaseClient</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="init()"><!-- --></A><H3> -init</H3> -<PRE> -public void <B>init</B>() - throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Initialize any state for this DB. - Called once per DB instance; there is one DB instance per client thread. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#init()">init</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="cleanup()"><!-- --></A><H3> -cleanup</H3> -<PRE> -public void <B>cleanup</B>() - throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Cleanup any state for this DB. - Called once per DB instance; there is one DB instance per client thread. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#cleanup()">cleanup</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="getHTable(java.lang.String)"><!-- --></A><H3> -getHTable</H3> -<PRE> -public void <B>getHTable</B>(java.lang.String table) - throws java.io.IOException</PRE> -<DL> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE>java.io.IOException</CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><!-- --></A><H3> -read</H3> -<PRE> -public int <B>read</B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</PRE> -<DL> -<DD>Read a record from the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to read.<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A HashMap of field/value pairs for the result -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><!-- --></A><H3> -scan</H3> -<PRE> -public int <B>scan</B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</PRE> -<DL> -<DD>Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>startkey</CODE> - The record key of the first record to read.<DD><CODE>recordcount</CODE> - The number of records to read<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A Vector of HashMaps, where each HashMap is a set field/value pairs for one record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="update(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -update</H3> -<PRE> -public int <B>update</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key, overwriting any existing values with the same field name. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to write<DD><CODE>values</CODE> - A HashMap of field/value pairs to update in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="insert(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -insert</H3> -<PRE> -public int <B>insert</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to insert.<DD><CODE>values</CODE> - A HashMap of field/value pairs to insert in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="delete(java.lang.String, java.lang.String)"><!-- --></A><H3> -delete</H3> -<PRE> -public int <B>delete</B>(java.lang.String table, - java.lang.String key)</PRE> -<DL> -<DD>Delete a record from the database. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#delete(java.lang.String, java.lang.String)">delete</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to delete. -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db"><B>PREV CLASS</B></A> - <A HREF="../../../../com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/HBaseClient.html" target="_top"><B>FRAMES</B></A> - <A HREF="HBaseClient.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/db/ShardClient.html b/doc/javadoc/com/yahoo/ycsb/db/ShardClient.html deleted file mode 100644 index fa266e3a0706f8a5d89871951a5f7c84993eb1f7..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/db/ShardClient.html +++ /dev/null @@ -1,757 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Fri Jan 22 13:42:46 PST 2010 --> -<TITLE> -ShardClient -</TITLE> - -<META NAME="date" CONTENT="2010-01-22"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="ShardClient"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db"><B>PREV CLASS</B></A> - <A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html" title="class in com.yahoo.ycsb.db"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/ShardClient.html" target="_top"><B>FRAMES</B></A> - <A HREF="ShardClient.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb.db</FONT> -<BR> -Class ShardClient</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.DB</A> - <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.db.ShardClient</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>ShardClient</B><DT>extends <A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></DL> -</PRE> - -<P> -A client for the simple sharded MySQL called shardserver. -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> boolean</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#_debug">_debug</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> boolean</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#_donothing">_donothing</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#HttpError">HttpError</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#NoMatchingRecord">NoMatchingRecord</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#NoMatchingRecordString">NoMatchingRecordString</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#Ok">Ok</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#ServerError">ServerError</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> long</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#TotalGetOps">TotalGetOps</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> long</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#TotalGetTime">TotalGetTime</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> long</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#TotalPostOps">TotalPostOps</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> long</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#TotalPostTime">TotalPostTime</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#UrlPrefix">UrlPrefix</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#ShardClient()">ShardClient</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#cleanup()">cleanup</A></B>()</CODE> - -<BR> - Cleanup any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#delete(java.lang.String, java.lang.String)">delete</A></B>(java.lang.String table, - java.lang.String key)</CODE> - -<BR> - Delete a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.util.Vector<char[]></CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#doGet(java.lang.String)">doGet</A></B>(java.lang.String url)</CODE> - -<BR> - Do a GET HTTP call.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#doPost(java.lang.String, java.lang.String)">doPost</A></B>(java.lang.String url, - java.lang.String postbody)</CODE> - -<BR> - Do a POST HTTP call.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#init()">init</A></B>()</CODE> - -<BR> - Initialize any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Insert a record in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> - -<BR> - Simple test.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</CODE> - -<BR> - Read a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</CODE> - -<BR> - Perform a range scan for a set of records in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Update a record in the database.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.DB"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#getProperties()">getProperties</A>, <A HREF="../../../../com/yahoo/ycsb/DB.html#setProperties(java.util.Properties)">setProperties</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="UrlPrefix"><!-- --></A><H3> -UrlPrefix</H3> -<PRE> -public static final java.lang.String <B>UrlPrefix</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.ShardClient.UrlPrefix">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="NoMatchingRecordString"><!-- --></A><H3> -NoMatchingRecordString</H3> -<PRE> -public static final java.lang.String <B>NoMatchingRecordString</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.ShardClient.NoMatchingRecordString">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="Ok"><!-- --></A><H3> -Ok</H3> -<PRE> -public static final int <B>Ok</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.ShardClient.Ok">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="ServerError"><!-- --></A><H3> -ServerError</H3> -<PRE> -public static final int <B>ServerError</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.ShardClient.ServerError">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="HttpError"><!-- --></A><H3> -HttpError</H3> -<PRE> -public static final int <B>HttpError</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.ShardClient.HttpError">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="NoMatchingRecord"><!-- --></A><H3> -NoMatchingRecord</H3> -<PRE> -public static final int <B>NoMatchingRecord</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.ShardClient.NoMatchingRecord">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="_debug"><!-- --></A><H3> -_debug</H3> -<PRE> -public boolean <B>_debug</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="_donothing"><!-- --></A><H3> -_donothing</H3> -<PRE> -public boolean <B>_donothing</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="TotalGetTime"><!-- --></A><H3> -TotalGetTime</H3> -<PRE> -public long <B>TotalGetTime</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="TotalGetOps"><!-- --></A><H3> -TotalGetOps</H3> -<PRE> -public long <B>TotalGetOps</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="TotalPostTime"><!-- --></A><H3> -TotalPostTime</H3> -<PRE> -public long <B>TotalPostTime</B></PRE> -<DL> -<DL> -</DL> -</DL> -<HR> - -<A NAME="TotalPostOps"><!-- --></A><H3> -TotalPostOps</H3> -<PRE> -public long <B>TotalPostOps</B></PRE> -<DL> -<DL> -</DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="ShardClient()"><!-- --></A><H3> -ShardClient</H3> -<PRE> -public <B>ShardClient</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="init()"><!-- --></A><H3> -init</H3> -<PRE> -public void <B>init</B>() - throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Initialize any state for this DB. - Called once per DB instance; there is one DB instance per client thread. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#init()">init</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="cleanup()"><!-- --></A><H3> -cleanup</H3> -<PRE> -public void <B>cleanup</B>() - throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Cleanup any state for this DB. - Called once per DB instance; there is one DB instance per client thread. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#cleanup()">cleanup</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="doGet(java.lang.String)"><!-- --></A><H3> -doGet</H3> -<PRE> -public java.util.Vector<char[]> <B>doGet</B>(java.lang.String url) - throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Do a GET HTTP call. Returns the results in a Vector of char[] blocks. -<P> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="doPost(java.lang.String, java.lang.String)"><!-- --></A><H3> -doPost</H3> -<PRE> -public java.lang.String <B>doPost</B>(java.lang.String url, - java.lang.String postbody) - throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Do a POST HTTP call. Returns the result as a String. -<P> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><!-- --></A><H3> -read</H3> -<PRE> -public int <B>read</B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</PRE> -<DL> -<DD>Read a record from the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to read.<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A HashMap of field/value pairs for the result -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><!-- --></A><H3> -scan</H3> -<PRE> -public int <B>scan</B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</PRE> -<DL> -<DD>Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>startkey</CODE> - The record key of the first record to read.<DD><CODE>recordcount</CODE> - The number of records to read<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A Vector of HashMaps, where each HashMap is a set field/value pairs for one record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="update(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -update</H3> -<PRE> -public int <B>update</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key, overwriting any existing values with the same field name. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to write.<DD><CODE>values</CODE> - A HashMap of field/value pairs to update in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="insert(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -insert</H3> -<PRE> -public int <B>insert</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to insert.<DD><CODE>values</CODE> - A HashMap of field/value pairs to insert in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="delete(java.lang.String, java.lang.String)"><!-- --></A><H3> -delete</H3> -<PRE> -public int <B>delete</B>(java.lang.String table, - java.lang.String key)</PRE> -<DL> -<DD>Delete a record from the database. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#delete(java.lang.String, java.lang.String)">delete</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to delete. -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="main(java.lang.String[])"><!-- --></A><H3> -main</H3> -<PRE> -public static void <B>main</B>(java.lang.String[] args)</PRE> -<DL> -<DD>Simple test. -<P> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db"><B>PREV CLASS</B></A> - <A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html" title="class in com.yahoo.ycsb.db"><B>NEXT CLASS</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/ShardClient.html" target="_top"><B>FRAMES</B></A> - <A HREF="ShardClient.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/db/SherpaClient.html b/doc/javadoc/com/yahoo/ycsb/db/SherpaClient.html deleted file mode 100644 index ebbbe26e6c46b3e6e1b07a78b2f471f1e40a46fa..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/db/SherpaClient.html +++ /dev/null @@ -1,1280 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Fri Jan 22 13:42:46 PST 2010 --> -<TITLE> -SherpaClient -</TITLE> - -<META NAME="date" CONTENT="2010-01-22"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="SherpaClient"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html" title="class in com.yahoo.ycsb.db"><B>PREV CLASS</B></A> - NEXT CLASS</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/SherpaClient.html" target="_top"><B>FRAMES</B></A> - <A HREF="SherpaClient.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb.db</FONT> -<BR> -Class SherpaClient</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.DB</A> - <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.db.SherpaClient</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>SherpaClient</B><DT>extends <A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></DL> -</PRE> - -<P> -This is a Java Sherpa client to be used for the Benchmark app. Since Sherpa - is a RESful service, this class will make use of Apache's HttpClient 4.x to - make the web service calls. -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#ADDITIONAL_FIELD">ADDITIONAL_FIELD</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#CODE">CODE</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#CONTINUATION">CONTINUATION</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#DELETE">DELETE</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#END_HASH_KEY">END_HASH_KEY</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#END_HASH_KEY_VALUE">END_HASH_KEY_VALUE</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#FIELDS">FIELDS</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#FIRST_FIELD">FIRST_FIELD</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#GET">GET</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#HASH_SCAN">HASH_SCAN</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#HOSTS">HOSTS</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#HTTP">HTTP</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#HTTP_ERROR">HTTP_ERROR</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#JSON_ERROR">JSON_ERROR</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#NAMESPACE">NAMESPACE</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#OK">OK</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#ORDERED_SCAN">ORDERED_SCAN</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#PREDICATE">PREDICATE</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#RECORD_LIMIT">RECORD_LIMIT</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#RECORDS">RECORDS</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#SCAN_COMPLETED">SCAN_COMPLETED</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#SCANTYPE">SCANTYPE</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#SET">SET</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#START_HASH_KEY">START_HASH_KEY</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#START_HASH_KEY_HEADER">START_HASH_KEY_HEADER</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#START_HASH_KEY_VALUE">START_HASH_KEY_VALUE</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#START_KEY_ADDITIONAL">START_KEY_ADDITIONAL</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#START_KEY_FIRST">START_KEY_FIRST</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#STATUS">STATUS</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#URI_PATH">URI_PATH</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#UTF8">UTF8</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#VALUE">VALUE</A></B></CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>protected static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#YDHT">YDHT</A></B></CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#SherpaClient()">SherpaClient</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#cleanup()">cleanup</A></B>()</CODE> - -<BR> - Cleanup any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#createRecordBody(java.util.HashMap)">createRecordBody</A></B>(java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Method to create the Sherpa JSON record body from an input HashMap of - key/values.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#delete(java.lang.String, java.lang.String)">delete</A></B>(java.lang.String table, - java.lang.String key)</CODE> - -<BR> - Delete a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#encodeFields(java.util.Set)">encodeFields</A></B>(java.util.Set<java.lang.String> fields)</CODE> - -<BR> - Method to encode a set of fields to retrieve from a Sherpa Get or Scan - request.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#encodeString(java.lang.String)">encodeString</A></B>(java.lang.String key)</CODE> - -<BR> - Method to encode a String to UTF8.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#getHashKey(java.lang.String)">getHashKey</A></B>(java.lang.String key)</CODE> - -<BR> - Method to return the hex string representation of a 32-bit unsigned key - value used for doing Sherpa scans.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#getResponseCode(JSONObject)">getResponseCode</A></B>(JSONObject jsonObject)</CODE> - -<BR> - Helper method to retrieve the response status code from a JSON Response - to determine if it was successful or not.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#init()">init</A></B>()</CODE> - -<BR> - Initialize any state for this DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Insert a record in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#populateHashScanRecords(JSONObject, java.util.Vector)">populateHashScanRecords</A></B>(JSONObject curResult, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</CODE> - -<BR> - Method to parse and store a JSON response from a hash scan request.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#populateOrderedScanRecords(JSONObject, java.util.Vector)">populateOrderedScanRecords</A></B>(JSONObject curResult, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</CODE> - -<BR> - Method to parse and store a JSON response from an ordered scan request.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#populateReadRecord(JSONObject, java.util.HashMap)">populateReadRecord</A></B>(JSONObject response, - java.util.HashMap<java.lang.String,java.lang.String> result)</CODE> - -<BR> - Method to parse and store a JSON response from reading a single Sherpa - record into the corresponding HashMap key/value pairs.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</CODE> - -<BR> - Read a record from the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</CODE> - -<BR> - Perform a range scan for a set of records in the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> int</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/db/SherpaClient.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</CODE> - -<BR> - Update a record in the database.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.DB"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#getProperties()">getProperties</A>, <A HREF="../../../../com/yahoo/ycsb/DB.html#setProperties(java.util.Properties)">setProperties</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="GET"><!-- --></A><H3> -GET</H3> -<PRE> -protected static final java.lang.String <B>GET</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.GET">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="SET"><!-- --></A><H3> -SET</H3> -<PRE> -protected static final java.lang.String <B>SET</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.SET">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="DELETE"><!-- --></A><H3> -DELETE</H3> -<PRE> -protected static final java.lang.String <B>DELETE</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.DELETE">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="HASH_SCAN"><!-- --></A><H3> -HASH_SCAN</H3> -<PRE> -protected static final java.lang.String <B>HASH_SCAN</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.HASH_SCAN">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="ORDERED_SCAN"><!-- --></A><H3> -ORDERED_SCAN</H3> -<PRE> -protected static final java.lang.String <B>ORDERED_SCAN</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.ORDERED_SCAN">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="FIRST_FIELD"><!-- --></A><H3> -FIRST_FIELD</H3> -<PRE> -protected static final java.lang.String <B>FIRST_FIELD</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.FIRST_FIELD">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="ADDITIONAL_FIELD"><!-- --></A><H3> -ADDITIONAL_FIELD</H3> -<PRE> -protected static final java.lang.String <B>ADDITIONAL_FIELD</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.ADDITIONAL_FIELD">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="START_KEY_FIRST"><!-- --></A><H3> -START_KEY_FIRST</H3> -<PRE> -protected static final java.lang.String <B>START_KEY_FIRST</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.START_KEY_FIRST">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="START_KEY_ADDITIONAL"><!-- --></A><H3> -START_KEY_ADDITIONAL</H3> -<PRE> -protected static final java.lang.String <B>START_KEY_ADDITIONAL</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.START_KEY_ADDITIONAL">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="UTF8"><!-- --></A><H3> -UTF8</H3> -<PRE> -protected static final java.lang.String <B>UTF8</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.UTF8">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="START_HASH_KEY_HEADER"><!-- --></A><H3> -START_HASH_KEY_HEADER</H3> -<PRE> -protected static final java.lang.String <B>START_HASH_KEY_HEADER</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.START_HASH_KEY_HEADER">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="CONTINUATION"><!-- --></A><H3> -CONTINUATION</H3> -<PRE> -protected static final java.lang.String <B>CONTINUATION</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.CONTINUATION">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="START_HASH_KEY"><!-- --></A><H3> -START_HASH_KEY</H3> -<PRE> -protected static final java.lang.String <B>START_HASH_KEY</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.START_HASH_KEY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="END_HASH_KEY"><!-- --></A><H3> -END_HASH_KEY</H3> -<PRE> -protected static final java.lang.String <B>END_HASH_KEY</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.END_HASH_KEY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="START_HASH_KEY_VALUE"><!-- --></A><H3> -START_HASH_KEY_VALUE</H3> -<PRE> -protected static final java.lang.String <B>START_HASH_KEY_VALUE</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.START_HASH_KEY_VALUE">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="END_HASH_KEY_VALUE"><!-- --></A><H3> -END_HASH_KEY_VALUE</H3> -<PRE> -protected static final java.lang.String <B>END_HASH_KEY_VALUE</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.END_HASH_KEY_VALUE">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="RECORD_LIMIT"><!-- --></A><H3> -RECORD_LIMIT</H3> -<PRE> -protected static final java.lang.String <B>RECORD_LIMIT</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.RECORD_LIMIT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="PREDICATE"><!-- --></A><H3> -PREDICATE</H3> -<PRE> -protected static final java.lang.String <B>PREDICATE</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.PREDICATE">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="SCAN_COMPLETED"><!-- --></A><H3> -SCAN_COMPLETED</H3> -<PRE> -protected static final java.lang.String <B>SCAN_COMPLETED</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.SCAN_COMPLETED">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="RECORDS"><!-- --></A><H3> -RECORDS</H3> -<PRE> -protected static final java.lang.String <B>RECORDS</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.RECORDS">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="URI_PATH"><!-- --></A><H3> -URI_PATH</H3> -<PRE> -protected static final java.lang.String <B>URI_PATH</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.URI_PATH">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="YDHT"><!-- --></A><H3> -YDHT</H3> -<PRE> -protected static final java.lang.String <B>YDHT</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.YDHT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="STATUS"><!-- --></A><H3> -STATUS</H3> -<PRE> -protected static final java.lang.String <B>STATUS</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.STATUS">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="CODE"><!-- --></A><H3> -CODE</H3> -<PRE> -protected static final java.lang.String <B>CODE</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.CODE">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="FIELDS"><!-- --></A><H3> -FIELDS</H3> -<PRE> -protected static final java.lang.String <B>FIELDS</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.FIELDS">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="VALUE"><!-- --></A><H3> -VALUE</H3> -<PRE> -protected static final java.lang.String <B>VALUE</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.VALUE">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="OK"><!-- --></A><H3> -OK</H3> -<PRE> -protected static final int <B>OK</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.OK">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="JSON_ERROR"><!-- --></A><H3> -JSON_ERROR</H3> -<PRE> -protected static final int <B>JSON_ERROR</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.JSON_ERROR">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="HTTP_ERROR"><!-- --></A><H3> -HTTP_ERROR</H3> -<PRE> -protected static final int <B>HTTP_ERROR</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.HTTP_ERROR">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="HOSTS"><!-- --></A><H3> -HOSTS</H3> -<PRE> -protected static final java.lang.String <B>HOSTS</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.HOSTS">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="HTTP"><!-- --></A><H3> -HTTP</H3> -<PRE> -protected static final java.lang.String <B>HTTP</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.HTTP">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="NAMESPACE"><!-- --></A><H3> -NAMESPACE</H3> -<PRE> -protected static final java.lang.String <B>NAMESPACE</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.NAMESPACE">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="SCANTYPE"><!-- --></A><H3> -SCANTYPE</H3> -<PRE> -protected static final java.lang.String <B>SCANTYPE</B></PRE> -<DL> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.db.SherpaClient.SCANTYPE">Constant Field Values</A></DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="SherpaClient()"><!-- --></A><H3> -SherpaClient</H3> -<PRE> -public <B>SherpaClient</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="init()"><!-- --></A><H3> -init</H3> -<PRE> -public void <B>init</B>() - throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Initialize any state for this DB. Called once per DB instance; there is - one DB instance per client thread. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#init()">init</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="cleanup()"><!-- --></A><H3> -cleanup</H3> -<PRE> -public void <B>cleanup</B>() - throws <A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></PRE> -<DL> -<DD>Cleanup any state for this DB. Called once per DB instance; there is one - DB instance per client thread. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#cleanup()">cleanup</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="encodeString(java.lang.String)"><!-- --></A><H3> -encodeString</H3> -<PRE> -public static java.lang.String <B>encodeString</B>(java.lang.String key)</PRE> -<DL> -<DD>Method to encode a String to UTF8. All Sherpa table/record/field and - record body data must be UTF8 since access is done via HTTP REST calls. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>key</CODE> - Key string we want to encode to UTF8 -<DT><B>Returns:</B><DD>UTF8 encoding of the input string</DL> -</DD> -</DL> -<HR> - -<A NAME="encodeFields(java.util.Set)"><!-- --></A><H3> -encodeFields</H3> -<PRE> -public static java.lang.String <B>encodeFields</B>(java.util.Set<java.lang.String> fields)</PRE> -<DL> -<DD>Method to encode a set of fields to retrieve from a Sherpa Get or Scan - request. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>fields</CODE> - Set of String fields to retrieve from a Sherpa Get or Scan - request -<DT><B>Returns:</B><DD>String encoding of the set of fields to retrieve from a Sherpa - request. This has the format of ?field=<field1>&field=<field2>...</DL> -</DD> -</DL> -<HR> - -<A NAME="getHashKey(java.lang.String)"><!-- --></A><H3> -getHashKey</H3> -<PRE> -public static java.lang.String <B>getHashKey</B>(java.lang.String key)</PRE> -<DL> -<DD>Method to return the hex string representation of a 32-bit unsigned key - value used for doing Sherpa scans. This needs to match how Sherpa in the - backend is hashing the keys to determine which tablet it is stored in. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>key</CODE> - Key string to be hashed -<DT><B>Returns:</B><DD>String hex representation of the hashing of the input key</DL> -</DD> -</DL> -<HR> - -<A NAME="getResponseCode(JSONObject)"><!-- --></A><H3> -getResponseCode</H3> -<PRE> -public static int <B>getResponseCode</B>(JSONObject jsonObject)</PRE> -<DL> -<DD>Helper method to retrieve the response status code from a JSON Response - to determine if it was successful or not. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>jsonObject</CODE> - JSONObject response from Sherpa -<DT><B>Returns:</B><DD>int Response status code indicating if the request was successful - or not</DL> -</DD> -</DL> -<HR> - -<A NAME="createRecordBody(java.util.HashMap)"><!-- --></A><H3> -createRecordBody</H3> -<PRE> -public static java.lang.String <B>createRecordBody</B>(java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD>Method to create the Sherpa JSON record body from an input HashMap of - key/values. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>values</CODE> - HashMap of key/values to be stored in a Sherpa record -<DT><B>Returns:</B><DD>Sherpa JSON record representation of the input key/values HashMap</DL> -</DD> -</DL> -<HR> - -<A NAME="populateReadRecord(JSONObject, java.util.HashMap)"><!-- --></A><H3> -populateReadRecord</H3> -<PRE> -public static void <B>populateReadRecord</B>(JSONObject response, - java.util.HashMap<java.lang.String,java.lang.String> result) - throws JSONException</PRE> -<DL> -<DD>Method to parse and store a JSON response from reading a single Sherpa - record into the corresponding HashMap key/value pairs. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>response</CODE> - JSONObject response from reading a single Sherpa record<DD><CODE>result</CODE> - HashMap key/value pairs for the record's field/values -<DT><B>Throws:</B> -<DD><CODE>JSONException</CODE> - If there is an error parsing the JSON response</DL> -</DD> -</DL> -<HR> - -<A NAME="populateHashScanRecords(JSONObject, java.util.Vector)"><!-- --></A><H3> -populateHashScanRecords</H3> -<PRE> -public static void <B>populateHashScanRecords</B>(JSONObject curResult, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result) - throws JSONException</PRE> -<DL> -<DD>Method to parse and store a JSON response from a hash scan request. This - consists of multiple records each of which will be stored in the input - result Vector as a HashMap of key/value pairs. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>curResult</CODE> - JSONObject response from a Sherpa hash scan request<DD><CODE>result</CODE> - Vector of Sherpa records each stored as a HashMap of - key/values for the record's field/values -<DT><B>Throws:</B> -<DD><CODE>JSONException</CODE> - If there is an error parsing the JSON response</DL> -</DD> -</DL> -<HR> - -<A NAME="populateOrderedScanRecords(JSONObject, java.util.Vector)"><!-- --></A><H3> -populateOrderedScanRecords</H3> -<PRE> -public static void <B>populateOrderedScanRecords</B>(JSONObject curResult, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result) - throws JSONException</PRE> -<DL> -<DD>Method to parse and store a JSON response from an ordered scan request. - This consists of multiple records each of which will be stored in the - input result Vector as a HashMap of key/value pairs. -<P> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>curResult</CODE> - JSONObject response from a Sherpa ordered scan request<DD><CODE>result</CODE> - Vector of Sherpa records each stored as a HashMap of - key/values for the record's field/values -<DT><B>Throws:</B> -<DD><CODE>JSONException</CODE> - If there is an error parsing the JSON response</DL> -</DD> -</DL> -<HR> - -<A NAME="delete(java.lang.String, java.lang.String)"><!-- --></A><H3> -delete</H3> -<PRE> -public int <B>delete</B>(java.lang.String table, - java.lang.String key)</PRE> -<DL> -<DD><B>Description copied from class: <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#delete(java.lang.String, java.lang.String)">DB</A></CODE></B></DD> -<DD>Delete a record from the database. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#delete(java.lang.String, java.lang.String)">delete</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to delete. -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="insert(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -insert</H3> -<PRE> -public int <B>insert</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD><B>Description copied from class: <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">DB</A></CODE></B></DD> -<DD>Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)">insert</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to insert.<DD><CODE>values</CODE> - A HashMap of field/value pairs to insert in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><!-- --></A><H3> -read</H3> -<PRE> -public int <B>read</B>(java.lang.String table, - java.lang.String key, - java.util.Set<java.lang.String> fields, - java.util.HashMap<java.lang.String,java.lang.String> result)</PRE> -<DL> -<DD><B>Description copied from class: <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">DB</A></CODE></B></DD> -<DD>Read a record from the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)">read</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to read.<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A HashMap of field/value pairs for the result -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><!-- --></A><H3> -scan</H3> -<PRE> -public int <B>scan</B>(java.lang.String table, - java.lang.String startkey, - int recordcount, - java.util.Set<java.lang.String> fields, - java.util.Vector<java.util.HashMap<java.lang.String,java.lang.String>> result)</PRE> -<DL> -<DD><B>Description copied from class: <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">DB</A></CODE></B></DD> -<DD>Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)">scan</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>startkey</CODE> - The record key of the first record to read.<DD><CODE>recordcount</CODE> - The number of records to read<DD><CODE>fields</CODE> - The list of fields to read, or null for all of them<DD><CODE>result</CODE> - A Vector of HashMaps, where each HashMap is a set field/value pairs for one record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<HR> - -<A NAME="update(java.lang.String, java.lang.String, java.util.HashMap)"><!-- --></A><H3> -update</H3> -<PRE> -public int <B>update</B>(java.lang.String table, - java.lang.String key, - java.util.HashMap<java.lang.String,java.lang.String> values)</PRE> -<DL> -<DD><B>Description copied from class: <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#update(java.lang.String, java.lang.String, java.util.HashMap)">DB</A></CODE></B></DD> -<DD>Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - record key, overwriting any existing values with the same field name. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/DB.html#update(java.lang.String, java.lang.String, java.util.HashMap)">update</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></CODE></DL> -</DD> -<DD><DL> -<DT><B>Parameters:</B><DD><CODE>table</CODE> - The name of the table<DD><CODE>key</CODE> - The record key of the record to write.<DD><CODE>values</CODE> - A HashMap of field/value pairs to update in the record -<DT><B>Returns:</B><DD>Zero on success, a non-zero error code on error</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/db/ShardClient.html" title="class in com.yahoo.ycsb.db"><B>PREV CLASS</B></A> - NEXT CLASS</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/SherpaClient.html" target="_top"><B>FRAMES</B></A> - <A HREF="SherpaClient.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/db/package-frame.html b/doc/javadoc/com/yahoo/ycsb/db/package-frame.html deleted file mode 100644 index d6d9b3e3557828338669fad1646b6a6075c253f4..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/db/package-frame.html +++ /dev/null @@ -1,40 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -com.yahoo.ycsb.db -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> - - -</HEAD> - -<BODY BGCOLOR="white"> -<FONT size="+1" CLASS="FrameTitleFont"> -<A HREF="../../../../com/yahoo/ycsb/db/package-summary.html" target="classFrame">com.yahoo.ycsb.db</A></FONT> -<TABLE BORDER="0" WIDTH="100%" SUMMARY=""> -<TR> -<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> -Classes</FONT> -<FONT CLASS="FrameItemFont"> -<BR> -<A HREF="CassandraClient5.html" title="class in com.yahoo.ycsb.db" target="classFrame">CassandraClient5</A> -<BR> -<A HREF="CassandraClient6.html" title="class in com.yahoo.ycsb.db" target="classFrame">CassandraClient6</A> -<BR> -<A HREF="CassandraClient7.html" title="class in com.yahoo.ycsb.db" target="classFrame">CassandraClient7</A> -<BR> -<A HREF="HBaseClient.html" title="class in com.yahoo.ycsb.db" target="classFrame">HBaseClient</A> -<BR> -<A HREF="MongoDbClient.html" title="class in com.yahoo.ycsb.db" target="classFrame">MongoDbClient</A></FONT></TD> -</TR> -</TABLE> - - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/db/package-summary.html b/doc/javadoc/com/yahoo/ycsb/db/package-summary.html deleted file mode 100644 index 5138c2f9b5fc0a93d825ba64ffad3fb6617a1ce4..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/db/package-summary.html +++ /dev/null @@ -1,171 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -com.yahoo.ycsb.db -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="com.yahoo.ycsb.db"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/package-summary.html"><B>PREV PACKAGE</B></A> - <A HREF="../../../../com/yahoo/ycsb/generator/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/package-summary.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<H2> -Package com.yahoo.ycsb.db -</H2> - -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Class Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A></B></TD> -<TD>Cassandra 0.5 client for YCSB framework</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A></B></TD> -<TD>Cassandra 0.6 client for YCSB framework</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../../com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A></B></TD> -<TD>Cassandra 0.7 client for YCSB framework</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A></B></TD> -<TD>HBase client for YCSB framework</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../../com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db">MongoDbClient</A></B></TD> -<TD>MongoDB client for YCSB framework.</TD> -</TR> -</TABLE> - - -<P> -<DL> -</DL> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/package-summary.html"><B>PREV PACKAGE</B></A> - <A HREF="../../../../com/yahoo/ycsb/generator/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/package-summary.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/db/package-tree.html b/doc/javadoc/com/yahoo/ycsb/db/package-tree.html deleted file mode 100644 index a20a816aa2b54532aef03ba22f727cf38df79b3e..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/db/package-tree.html +++ /dev/null @@ -1,153 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -com.yahoo.ycsb.db Class Hierarchy -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="com.yahoo.ycsb.db Class Hierarchy"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/package-tree.html"><B>PREV</B></A> - <A HREF="../../../../com/yahoo/ycsb/generator/package-tree.html"><B>NEXT</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/package-tree.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<CENTER> -<H2> -Hierarchy For Package com.yahoo.ycsb.db -</H2> -</CENTER> -<DL> -<DT><B>Package Hierarchies:</B><DD><A HREF="../../../../overview-tree.html">All Packages</A></DL> -<HR> -<H2> -Class Hierarchy -</H2> -<UL> -<LI TYPE="circle">java.lang.Object<UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb"><B>DB</B></A><UL> -<LI TYPE="circle">com.yahoo.ycsb.db.<A HREF="../../../../com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db"><B>CassandraClient5</B></A><LI TYPE="circle">com.yahoo.ycsb.db.<A HREF="../../../../com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db"><B>CassandraClient6</B></A><LI TYPE="circle">com.yahoo.ycsb.db.<A HREF="../../../../com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db"><B>CassandraClient7</B></A><LI TYPE="circle">com.yahoo.ycsb.db.<A HREF="../../../../com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db"><B>HBaseClient</B></A><LI TYPE="circle">com.yahoo.ycsb.db.<A HREF="../../../../com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db"><B>MongoDbClient</B></A></UL> -</UL> -</UL> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/package-tree.html"><B>PREV</B></A> - <A HREF="../../../../com/yahoo/ycsb/generator/package-tree.html"><B>NEXT</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/db/package-tree.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/package-frame.html b/doc/javadoc/com/yahoo/ycsb/package-frame.html deleted file mode 100644 index 9281ed9b5b73f164158d2b5f44b3ce076abdf378..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/package-frame.html +++ /dev/null @@ -1,61 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -com.yahoo.ycsb -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - - -</HEAD> - -<BODY BGCOLOR="white"> -<FONT size="+1" CLASS="FrameTitleFont"> -<A HREF="../../../com/yahoo/ycsb/package-summary.html" target="classFrame">com.yahoo.ycsb</A></FONT> -<TABLE BORDER="0" WIDTH="100%" SUMMARY=""> -<TR> -<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> -Classes</FONT> -<FONT CLASS="FrameItemFont"> -<BR> -<A HREF="BasicDB.html" title="class in com.yahoo.ycsb" target="classFrame">BasicDB</A> -<BR> -<A HREF="Client.html" title="class in com.yahoo.ycsb" target="classFrame">Client</A> -<BR> -<A HREF="CommandLine.html" title="class in com.yahoo.ycsb" target="classFrame">CommandLine</A> -<BR> -<A HREF="DB.html" title="class in com.yahoo.ycsb" target="classFrame">DB</A> -<BR> -<A HREF="DBFactory.html" title="class in com.yahoo.ycsb" target="classFrame">DBFactory</A> -<BR> -<A HREF="DBWrapper.html" title="class in com.yahoo.ycsb" target="classFrame">DBWrapper</A> -<BR> -<A HREF="Utils.html" title="class in com.yahoo.ycsb" target="classFrame">Utils</A> -<BR> -<A HREF="Workload.html" title="class in com.yahoo.ycsb" target="classFrame">Workload</A></FONT></TD> -</TR> -</TABLE> - - -<TABLE BORDER="0" WIDTH="100%" SUMMARY=""> -<TR> -<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> -Exceptions</FONT> -<FONT CLASS="FrameItemFont"> -<BR> -<A HREF="DBException.html" title="class in com.yahoo.ycsb" target="classFrame">DBException</A> -<BR> -<A HREF="UnknownDBException.html" title="class in com.yahoo.ycsb" target="classFrame">UnknownDBException</A> -<BR> -<A HREF="WorkloadException.html" title="class in com.yahoo.ycsb" target="classFrame">WorkloadException</A></FONT></TD> -</TR> -</TABLE> - - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/package-summary.html b/doc/javadoc/com/yahoo/ycsb/package-summary.html deleted file mode 100644 index 82439c75b558e6a319b4d2b2d72f921d2afd1136..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/package-summary.html +++ /dev/null @@ -1,205 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -com.yahoo.ycsb -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="com.yahoo.ycsb"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV PACKAGE - <A HREF="../../../com/yahoo/ycsb/db/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/package-summary.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<H2> -Package com.yahoo.ycsb -</H2> - -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Class Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A></B></TD> -<TD>Basic DB that just prints out the requested operations, instead of doing them against a database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb">Client</A></B></TD> -<TD>Main class for executing YCSB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb">CommandLine</A></B></TD> -<TD>A simple command line client to a database, using the appropriate com.yahoo.ycsb.DB implementation.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A></B></TD> -<TD>A layer for accessing a database to be benchmarked.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb">DBFactory</A></B></TD> -<TD>Creates a DB layer by dynamically classloading the specified DB class.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A></B></TD> -<TD>Wrapper around a "real" DB that measures latencies and counts return codes.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A></B></TD> -<TD>Utility functions.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A></B></TD> -<TD>One experiment scenario.</TD> -</TR> -</TABLE> - - -<P> - -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Exception Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A></B></TD> -<TD>Something bad happened while interacting with the database.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb">UnknownDBException</A></B></TD> -<TD>Could not create the specified DB.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A></B></TD> -<TD>The workload tried to do something bad.</TD> -</TR> -</TABLE> - - -<P> -<DL> -</DL> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV PACKAGE - <A HREF="../../../com/yahoo/ycsb/db/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/package-summary.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/package-tree.html b/doc/javadoc/com/yahoo/ycsb/package-tree.html deleted file mode 100644 index d62eac88c33bdc719b9011638d5a9aa8f380f42c..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/package-tree.html +++ /dev/null @@ -1,158 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -com.yahoo.ycsb Class Hierarchy -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="com.yahoo.ycsb Class Hierarchy"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - <A HREF="../../../com/yahoo/ycsb/db/package-tree.html"><B>NEXT</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/package-tree.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<CENTER> -<H2> -Hierarchy For Package com.yahoo.ycsb -</H2> -</CENTER> -<DL> -<DT><B>Package Hierarchies:</B><DD><A HREF="../../../overview-tree.html">All Packages</A></DL> -<HR> -<H2> -Class Hierarchy -</H2> -<UL> -<LI TYPE="circle">java.lang.Object<UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb"><B>Client</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb"><B>CommandLine</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb"><B>DB</B></A><UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb"><B>BasicDB</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb"><B>DBWrapper</B></A></UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb"><B>DBFactory</B></A><LI TYPE="circle">java.lang.Throwable (implements java.io.Serializable) -<UL> -<LI TYPE="circle">java.lang.Exception<UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb"><B>DBException</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb"><B>UnknownDBException</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb"><B>WorkloadException</B></A></UL> -</UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb"><B>Utils</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb"><B>Workload</B></A></UL> -</UL> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - <A HREF="../../../com/yahoo/ycsb/db/package-tree.html"><B>NEXT</B></A></FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../index.html?com/yahoo/ycsb/package-tree.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/workloads/CoreWorkload.html b/doc/javadoc/com/yahoo/ycsb/workloads/CoreWorkload.html deleted file mode 100644 index 8c1f332fde5cce7b0f6089ad3deddb8e1a2cfd95..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/workloads/CoreWorkload.html +++ /dev/null @@ -1,972 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -CoreWorkload -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="CoreWorkload"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV CLASS - NEXT CLASS</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/workloads/CoreWorkload.html" target="_top"><B>FRAMES</B></A> - <A HREF="CoreWorkload.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<!-- ======== START OF CLASS DATA ======== --> -<H2> -<FONT SIZE="-1"> -com.yahoo.ycsb.workloads</FONT> -<BR> -Class CoreWorkload</H2> -<PRE> -java.lang.Object - <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.Workload</A> - <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.yahoo.ycsb.workloads.CoreWorkload</B> -</PRE> -<HR> -<DL> -<DT><PRE>public class <B>CoreWorkload</B><DT>extends <A HREF="../../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A></DL> -</PRE> - -<P> -The core benchmark scenario. Represents a set of clients doing simple CRUD operations. The relative - proportion of different kinds of operations, and other properties of the workload, are controlled - by parameters specified at runtime. - - Properties to control the client: - <UL> - <LI><b>fieldcount</b>: the number of fields in a record (default: 10) - <LI><b>fieldlength</b>: the size of each field (default: 100) - <LI><b>readallfields</b>: should reads read all fields (true) or just one (false) (default: true) - <LI><b>readproportion</b>: what proportion of operations should be reads (default: 0.95) - <LI><b>updateproportion</b>: what proportion of operations should be updates (default: 0.05) - <LI><b>insertproportion</b>: what proportion of operations should be inserts (default: 0) - <LI><b>scanproportion</b>: what proportion of operations should be scans (default: 0) - <LI><b>readmodifywriteproportion</b>: what proportion of operations should be read a record, modify it, write it back (default: 0) - <LI><b>requestdistribution</b>: what distribution should be used to select the records to operate on - uniform, zipfian or latest (default: uniform) - <LI><b>maxscanlength</b>: for scans, what is the maximum number of records to scan (default: 1000) - <LI><b>scanlengthdistribution</b>: for scans, what distribution should be used to choose the number of records to scan, for each scan, between 1 and maxscanlength (default: uniform) - <LI><b>insertorder</b>: should records be inserted in order by key ("ordered"), or in hashed order ("hashed") (default: hashed) - </ul> -<P> - -<P> -<HR> - -<P> -<!-- =========== FIELD SUMMARY =========== --> - -<A NAME="field_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Field Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_COUNT_PROPERTY">FIELD_COUNT_PROPERTY</A></B></CODE> - -<BR> - The name of the property for the number of fields in a record.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_COUNT_PROPERTY_DEFAULT">FIELD_COUNT_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - Default number of fields in a record.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_LENGTH_PROPERTY">FIELD_LENGTH_PROPERTY</A></B></CODE> - -<BR> - The name of the property for the length of a field in bytes.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_LENGTH_PROPERTY_DEFAULT">FIELD_LENGTH_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - The default length of a field in bytes.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_ORDER_PROPERTY">INSERT_ORDER_PROPERTY</A></B></CODE> - -<BR> - The name of the property for the order to insert records.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_ORDER_PROPERTY_DEFAULT">INSERT_ORDER_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - Default insert order.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_PROPORTION_PROPERTY">INSERT_PROPORTION_PROPERTY</A></B></CODE> - -<BR> - The name of the property for the proportion of transactions that are inserts.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_PROPORTION_PROPERTY_DEFAULT">INSERT_PROPORTION_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - The default proportion of transactions that are inserts.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#MAX_SCAN_LENGTH_PROPERTY">MAX_SCAN_LENGTH_PROPERTY</A></B></CODE> - -<BR> - The name of the property for the max scan length (number of records)</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#MAX_SCAN_LENGTH_PROPERTY_DEFAULT">MAX_SCAN_LENGTH_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - The default max scan length.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#READ_ALL_FIELDS_PROPERTY">READ_ALL_FIELDS_PROPERTY</A></B></CODE> - -<BR> - The name of the property for deciding whether to read one field (false) or all fields (true) of a record.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#READ_ALL_FIELDS_PROPERTY_DEFAULT">READ_ALL_FIELDS_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - The default value for the readallfields property.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#READ_PROPORTION_PROPERTY">READ_PROPORTION_PROPERTY</A></B></CODE> - -<BR> - The name of the property for the proportion of transactions that are reads.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#READ_PROPORTION_PROPERTY_DEFAULT">READ_PROPORTION_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - The default proportion of transactions that are reads.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#READMODIFYWRITE_PROPORTION_PROPERTY">READMODIFYWRITE_PROPORTION_PROPERTY</A></B></CODE> - -<BR> - The name of the property for the proportion of transactions that are read-modify-write.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT">READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - The default proportion of transactions that are scans.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#REQUEST_DISTRIBUTION_PROPERTY">REQUEST_DISTRIBUTION_PROPERTY</A></B></CODE> - -<BR> - The name of the property for the the distribution of requests across the keyspace.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#REQUEST_DISTRIBUTION_PROPERTY_DEFAULT">REQUEST_DISTRIBUTION_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - The default distribution of requests across the keyspace</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_LENGTH_DISTRIBUTION_PROPERTY">SCAN_LENGTH_DISTRIBUTION_PROPERTY</A></B></CODE> - -<BR> - The name of the property for the scan length distribution.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT">SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - The default max scan length.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_PROPORTION_PROPERTY">SCAN_PROPORTION_PROPERTY</A></B></CODE> - -<BR> - The name of the property for the proportion of transactions that are scans.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_PROPORTION_PROPERTY_DEFAULT">SCAN_PROPORTION_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - The default proportion of transactions that are scans.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#TABLENAME">TABLENAME</A></B></CODE> - -<BR> - The name of the database table to run queries against.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#UPDATE_PROPORTION_PROPERTY">UPDATE_PROPORTION_PROPERTY</A></B></CODE> - -<BR> - The name of the property for the proportion of transactions that are updates.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE>static java.lang.String</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#UPDATE_PROPORTION_PROPERTY_DEFAULT">UPDATE_PROPORTION_PROPERTY_DEFAULT</A></B></CODE> - -<BR> - The default proportion of transactions that are updates.</TD> -</TR> -</TABLE> - <A NAME="fields_inherited_from_class_com.yahoo.ycsb.Workload"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Fields inherited from class com.yahoo.ycsb.<A HREF="../../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../../com/yahoo/ycsb/Workload.html#INSERT_START_PROPERTY">INSERT_START_PROPERTY</A>, <A HREF="../../../../com/yahoo/ycsb/Workload.html#INSERT_START_PROPERTY_DEFAULT">INSERT_START_PROPERTY_DEFAULT</A></CODE></TD> -</TR> -</TABLE> - -<!-- ======== CONSTRUCTOR SUMMARY ======== --> - -<A NAME="constructor_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Constructor Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#CoreWorkload()">CoreWorkload</A></B>()</CODE> - -<BR> - </TD> -</TR> -</TABLE> - -<!-- ========== METHOD SUMMARY =========== --> - -<A NAME="method_summary"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Method Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> boolean</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#doInsert(com.yahoo.ycsb.DB, java.lang.Object)">doInsert</A></B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db, - java.lang.Object threadstate)</CODE> - -<BR> - Do one insert operation.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> boolean</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#doTransaction(com.yahoo.ycsb.DB, java.lang.Object)">doTransaction</A></B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db, - java.lang.Object threadstate)</CODE> - -<BR> - Do one transaction operation.</TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#doTransactionInsert(com.yahoo.ycsb.DB)">doTransactionInsert</A></B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#doTransactionRead(com.yahoo.ycsb.DB)">doTransactionRead</A></B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#doTransactionReadModifyWrite(com.yahoo.ycsb.DB)">doTransactionReadModifyWrite</A></B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#doTransactionScan(com.yahoo.ycsb.DB)">doTransactionScan</A></B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#doTransactionUpdate(com.yahoo.ycsb.DB)">doTransactionUpdate</A></B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</CODE> - -<BR> - </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> -<CODE> void</CODE></FONT></TD> -<TD><CODE><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html#init(java.util.Properties)">init</A></B>(java.util.Properties p)</CODE> - -<BR> - Initialize the scenario.</TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_com.yahoo.ycsb.Workload"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class com.yahoo.ycsb.<A HREF="../../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A></B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE><A HREF="../../../../com/yahoo/ycsb/Workload.html#cleanup()">cleanup</A>, <A HREF="../../../../com/yahoo/ycsb/Workload.html#initThread(java.util.Properties, int, int)">initThread</A></CODE></TD> -</TR> -</TABLE> - <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> -</TR> -</TABLE> - -<P> - -<!-- ============ FIELD DETAIL =========== --> - -<A NAME="field_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Field Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="TABLENAME"><!-- --></A><H3> -TABLENAME</H3> -<PRE> -public static final java.lang.String <B>TABLENAME</B></PRE> -<DL> -<DD>The name of the database table to run queries against. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.TABLENAME">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="FIELD_COUNT_PROPERTY"><!-- --></A><H3> -FIELD_COUNT_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>FIELD_COUNT_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for the number of fields in a record. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.FIELD_COUNT_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="FIELD_COUNT_PROPERTY_DEFAULT"><!-- --></A><H3> -FIELD_COUNT_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>FIELD_COUNT_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>Default number of fields in a record. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="FIELD_LENGTH_PROPERTY"><!-- --></A><H3> -FIELD_LENGTH_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>FIELD_LENGTH_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for the length of a field in bytes. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.FIELD_LENGTH_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="FIELD_LENGTH_PROPERTY_DEFAULT"><!-- --></A><H3> -FIELD_LENGTH_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>FIELD_LENGTH_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>The default length of a field in bytes. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.FIELD_LENGTH_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="READ_ALL_FIELDS_PROPERTY"><!-- --></A><H3> -READ_ALL_FIELDS_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>READ_ALL_FIELDS_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for deciding whether to read one field (false) or all fields (true) of a record. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.READ_ALL_FIELDS_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="READ_ALL_FIELDS_PROPERTY_DEFAULT"><!-- --></A><H3> -READ_ALL_FIELDS_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>READ_ALL_FIELDS_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>The default value for the readallfields property. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.READ_ALL_FIELDS_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="READ_PROPORTION_PROPERTY"><!-- --></A><H3> -READ_PROPORTION_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>READ_PROPORTION_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for the proportion of transactions that are reads. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.READ_PROPORTION_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="READ_PROPORTION_PROPERTY_DEFAULT"><!-- --></A><H3> -READ_PROPORTION_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>READ_PROPORTION_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>The default proportion of transactions that are reads. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.READ_PROPORTION_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="UPDATE_PROPORTION_PROPERTY"><!-- --></A><H3> -UPDATE_PROPORTION_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>UPDATE_PROPORTION_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for the proportion of transactions that are updates. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.UPDATE_PROPORTION_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="UPDATE_PROPORTION_PROPERTY_DEFAULT"><!-- --></A><H3> -UPDATE_PROPORTION_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>UPDATE_PROPORTION_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>The default proportion of transactions that are updates. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.UPDATE_PROPORTION_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="INSERT_PROPORTION_PROPERTY"><!-- --></A><H3> -INSERT_PROPORTION_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>INSERT_PROPORTION_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for the proportion of transactions that are inserts. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.INSERT_PROPORTION_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="INSERT_PROPORTION_PROPERTY_DEFAULT"><!-- --></A><H3> -INSERT_PROPORTION_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>INSERT_PROPORTION_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>The default proportion of transactions that are inserts. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.INSERT_PROPORTION_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="SCAN_PROPORTION_PROPERTY"><!-- --></A><H3> -SCAN_PROPORTION_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>SCAN_PROPORTION_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for the proportion of transactions that are scans. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.SCAN_PROPORTION_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="SCAN_PROPORTION_PROPERTY_DEFAULT"><!-- --></A><H3> -SCAN_PROPORTION_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>SCAN_PROPORTION_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>The default proportion of transactions that are scans. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.SCAN_PROPORTION_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="READMODIFYWRITE_PROPORTION_PROPERTY"><!-- --></A><H3> -READMODIFYWRITE_PROPORTION_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>READMODIFYWRITE_PROPORTION_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for the proportion of transactions that are read-modify-write. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.READMODIFYWRITE_PROPORTION_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT"><!-- --></A><H3> -READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>The default proportion of transactions that are scans. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="REQUEST_DISTRIBUTION_PROPERTY"><!-- --></A><H3> -REQUEST_DISTRIBUTION_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>REQUEST_DISTRIBUTION_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for the the distribution of requests across the keyspace. Options are "uniform", "zipfian" and "latest" -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.REQUEST_DISTRIBUTION_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="REQUEST_DISTRIBUTION_PROPERTY_DEFAULT"><!-- --></A><H3> -REQUEST_DISTRIBUTION_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>REQUEST_DISTRIBUTION_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>The default distribution of requests across the keyspace -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.REQUEST_DISTRIBUTION_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="MAX_SCAN_LENGTH_PROPERTY"><!-- --></A><H3> -MAX_SCAN_LENGTH_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>MAX_SCAN_LENGTH_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for the max scan length (number of records) -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.MAX_SCAN_LENGTH_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="MAX_SCAN_LENGTH_PROPERTY_DEFAULT"><!-- --></A><H3> -MAX_SCAN_LENGTH_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>MAX_SCAN_LENGTH_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>The default max scan length. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.MAX_SCAN_LENGTH_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="SCAN_LENGTH_DISTRIBUTION_PROPERTY"><!-- --></A><H3> -SCAN_LENGTH_DISTRIBUTION_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>SCAN_LENGTH_DISTRIBUTION_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for the scan length distribution. Options are "uniform" and "zipfian" (favoring short scans) -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.SCAN_LENGTH_DISTRIBUTION_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT"><!-- --></A><H3> -SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>The default max scan length. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="INSERT_ORDER_PROPERTY"><!-- --></A><H3> -INSERT_ORDER_PROPERTY</H3> -<PRE> -public static final java.lang.String <B>INSERT_ORDER_PROPERTY</B></PRE> -<DL> -<DD>The name of the property for the order to insert records. Options are "ordered" or "hashed" -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.INSERT_ORDER_PROPERTY">Constant Field Values</A></DL> -</DL> -<HR> - -<A NAME="INSERT_ORDER_PROPERTY_DEFAULT"><!-- --></A><H3> -INSERT_ORDER_PROPERTY_DEFAULT</H3> -<PRE> -public static final java.lang.String <B>INSERT_ORDER_PROPERTY_DEFAULT</B></PRE> -<DL> -<DD>Default insert order. -<P> -<DL> -<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.yahoo.ycsb.workloads.CoreWorkload.INSERT_ORDER_PROPERTY_DEFAULT">Constant Field Values</A></DL> -</DL> - -<!-- ========= CONSTRUCTOR DETAIL ======== --> - -<A NAME="constructor_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Constructor Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="CoreWorkload()"><!-- --></A><H3> -CoreWorkload</H3> -<PRE> -public <B>CoreWorkload</B>()</PRE> -<DL> -</DL> - -<!-- ============ METHOD DETAIL ========== --> - -<A NAME="method_detail"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> -<B>Method Detail</B></FONT></TH> -</TR> -</TABLE> - -<A NAME="init(java.util.Properties)"><!-- --></A><H3> -init</H3> -<PRE> -public void <B>init</B>(java.util.Properties p) - throws <A HREF="../../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A></PRE> -<DL> -<DD>Initialize the scenario. - Called once, in the main client thread, before any operations are started. -<P> -<DD><DL> -<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/Workload.html#init(java.util.Properties)">init</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Throws:</B> -<DD><CODE><A HREF="../../../../com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A></CODE></DL> -</DD> -</DL> -<HR> - -<A NAME="doInsert(com.yahoo.ycsb.DB, java.lang.Object)"><!-- --></A><H3> -doInsert</H3> -<PRE> -public boolean <B>doInsert</B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db, - java.lang.Object threadstate)</PRE> -<DL> -<DD>Do one insert operation. Because it will be called concurrently from multiple client threads, this - function must be thread safe. However, avoid synchronized, or the threads will block waiting for each - other, and it will be difficult to reach the target throughput. Ideally, this function would have no side - effects other than DB operations. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/Workload.html#doInsert(com.yahoo.ycsb.DB, java.lang.Object)">doInsert</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A></CODE></DL> -</DD> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="doTransaction(com.yahoo.ycsb.DB, java.lang.Object)"><!-- --></A><H3> -doTransaction</H3> -<PRE> -public boolean <B>doTransaction</B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db, - java.lang.Object threadstate)</PRE> -<DL> -<DD>Do one transaction operation. Because it will be called concurrently from multiple client threads, this - function must be thread safe. However, avoid synchronized, or the threads will block waiting for each - other, and it will be difficult to reach the target throughput. Ideally, this function would have no side - effects other than DB operations. -<P> -<DD><DL> -<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/yahoo/ycsb/Workload.html#doTransaction(com.yahoo.ycsb.DB, java.lang.Object)">doTransaction</A></CODE> in class <CODE><A HREF="../../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A></CODE></DL> -</DD> -<DD><DL> - -<DT><B>Returns:</B><DD>false if the workload knows it is done for this thread. Client will terminate the thread. Return true otherwise. Return true for workloads that rely on operationcount. For workloads that read traces from a file, return true when there are more to do, false when you are done.</DL> -</DD> -</DL> -<HR> - -<A NAME="doTransactionRead(com.yahoo.ycsb.DB)"><!-- --></A><H3> -doTransactionRead</H3> -<PRE> -public void <B>doTransactionRead</B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="doTransactionReadModifyWrite(com.yahoo.ycsb.DB)"><!-- --></A><H3> -doTransactionReadModifyWrite</H3> -<PRE> -public void <B>doTransactionReadModifyWrite</B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="doTransactionScan(com.yahoo.ycsb.DB)"><!-- --></A><H3> -doTransactionScan</H3> -<PRE> -public void <B>doTransactionScan</B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="doTransactionUpdate(com.yahoo.ycsb.DB)"><!-- --></A><H3> -doTransactionUpdate</H3> -<PRE> -public void <B>doTransactionUpdate</B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<HR> - -<A NAME="doTransactionInsert(com.yahoo.ycsb.DB)"><!-- --></A><H3> -doTransactionInsert</H3> -<PRE> -public void <B>doTransactionInsert</B>(<A HREF="../../../../com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> db)</PRE> -<DL> -<DD><DL> -</DL> -</DD> -</DL> -<!-- ========= END OF CLASS DATA ========= --> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV CLASS - NEXT CLASS</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/workloads/CoreWorkload.html" target="_top"><B>FRAMES</B></A> - <A HREF="CoreWorkload.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -<TR> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> - SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> -<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> -DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/workloads/package-frame.html b/doc/javadoc/com/yahoo/ycsb/workloads/package-frame.html deleted file mode 100644 index 8194082faddfd5613f2138c774f3fd875ba7f339..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/workloads/package-frame.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -com.yahoo.ycsb.workloads -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> - - -</HEAD> - -<BODY BGCOLOR="white"> -<FONT size="+1" CLASS="FrameTitleFont"> -<A HREF="../../../../com/yahoo/ycsb/workloads/package-summary.html" target="classFrame">com.yahoo.ycsb.workloads</A></FONT> -<TABLE BORDER="0" WIDTH="100%" SUMMARY=""> -<TR> -<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> -Classes</FONT> -<FONT CLASS="FrameItemFont"> -<BR> -<A HREF="CoreWorkload.html" title="class in com.yahoo.ycsb.workloads" target="classFrame">CoreWorkload</A></FONT></TD> -</TR> -</TABLE> - - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/workloads/package-summary.html b/doc/javadoc/com/yahoo/ycsb/workloads/package-summary.html deleted file mode 100644 index 798dd239ec6e5aa12528d703b5c6da5e7f290ebf..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/workloads/package-summary.html +++ /dev/null @@ -1,155 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -com.yahoo.ycsb.workloads -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="com.yahoo.ycsb.workloads"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/measurements/package-summary.html"><B>PREV PACKAGE</B></A> - NEXT PACKAGE</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/workloads/package-summary.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<H2> -Package com.yahoo.ycsb.workloads -</H2> - -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Class Summary</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="15%"><B><A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A></B></TD> -<TD>The core benchmark scenario.</TD> -</TR> -</TABLE> - - -<P> -<DL> -</DL> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/measurements/package-summary.html"><B>PREV PACKAGE</B></A> - NEXT PACKAGE</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/workloads/package-summary.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/com/yahoo/ycsb/workloads/package-tree.html b/doc/javadoc/com/yahoo/ycsb/workloads/package-tree.html deleted file mode 100644 index d3abb3e6e59b4c2833cb43b72e5d9613cba0b367..0000000000000000000000000000000000000000 --- a/doc/javadoc/com/yahoo/ycsb/workloads/package-tree.html +++ /dev/null @@ -1,153 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -com.yahoo.ycsb.workloads Class Hierarchy -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="com.yahoo.ycsb.workloads Class Hierarchy"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/measurements/package-tree.html"><B>PREV</B></A> - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/workloads/package-tree.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<CENTER> -<H2> -Hierarchy For Package com.yahoo.ycsb.workloads -</H2> -</CENTER> -<DL> -<DT><B>Package Hierarchies:</B><DD><A HREF="../../../../overview-tree.html">All Packages</A></DL> -<HR> -<H2> -Class Hierarchy -</H2> -<UL> -<LI TYPE="circle">java.lang.Object<UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="../../../../com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb"><B>Workload</B></A><UL> -<LI TYPE="circle">com.yahoo.ycsb.workloads.<A HREF="../../../../com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads"><B>CoreWorkload</B></A></UL> -</UL> -</UL> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../com/yahoo/ycsb/measurements/package-tree.html"><B>PREV</B></A> - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="../../../../index.html?com/yahoo/ycsb/workloads/package-tree.html" target="_top"><B>FRAMES</B></A> - <A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/constant-values.html b/doc/javadoc/constant-values.html deleted file mode 100644 index b0ae776a778905b947e134a22b22a52a8863d84f..0000000000000000000000000000000000000000 --- a/doc/javadoc/constant-values.html +++ /dev/null @@ -1,736 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -Constant Field Values -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Constant Field Values"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A> - <A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<CENTER> -<H1> -Constant Field Values</H1> -</CENTER> -<HR SIZE="4" NOSHADE> -<B>Contents</B><UL> -<LI><A HREF="#com.yahoo">com.yahoo.*</A> -</UL> - -<A NAME="com.yahoo"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left"><FONT SIZE="+2"> -com.yahoo.*</FONT></TH> -</TR> -</TABLE> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.BasicDB.SIMULATE_DELAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/BasicDB.html#SIMULATE_DELAY">SIMULATE_DELAY</A></CODE></TD> -<TD ALIGN="right"><CODE>"basicdb.simulatedelay"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.BasicDB.SIMULATE_DELAY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/BasicDB.html#SIMULATE_DELAY_DEFAULT">SIMULATE_DELAY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"0"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.BasicDB.VERBOSE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/BasicDB.html#VERBOSE">VERBOSE</A></CODE></TD> -<TD ALIGN="right"><CODE>"basicdb.verbose"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.BasicDB.VERBOSE_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/BasicDB.html#VERBOSE_DEFAULT">VERBOSE_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"true"</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb">Client</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.Client.INSERT_COUNT_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/Client.html#INSERT_COUNT_PROPERTY">INSERT_COUNT_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"insertcount"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.Client.OPERATION_COUNT_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/Client.html#OPERATION_COUNT_PROPERTY">OPERATION_COUNT_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"operationcount"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.Client.RECORD_COUNT_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/Client.html#RECORD_COUNT_PROPERTY">RECORD_COUNT_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"recordcount"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.Client.WORKLOAD_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/Client.html#WORKLOAD_PROPERTY">WORKLOAD_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"workload"</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb">CommandLine</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.CommandLine.DEFAULT_DB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/CommandLine.html#DEFAULT_DB">DEFAULT_DB</A></CODE></TD> -<TD ALIGN="right"><CODE>"com.yahoo.ycsb.BasicDB"</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.Utils.FNV_offset_basis_32"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/Utils.html#FNV_offset_basis_32">FNV_offset_basis_32</A></CODE></TD> -<TD ALIGN="right"><CODE>-2128831035</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.Utils.FNV_offset_basis_64"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final long</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/Utils.html#FNV_offset_basis_64">FNV_offset_basis_64</A></CODE></TD> -<TD ALIGN="right"><CODE>-3750763034362895579L</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.Utils.FNV_prime_32"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/Utils.html#FNV_prime_32">FNV_prime_32</A></CODE></TD> -<TD ALIGN="right"><CODE>16777619</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.Utils.FNV_prime_64"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final long</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/Utils.html#FNV_prime_64">FNV_prime_64</A></CODE></TD> -<TD ALIGN="right"><CODE>1099511628211L</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.Workload.INSERT_START_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/Workload.html#INSERT_START_PROPERTY">INSERT_START_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"insertstart"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.Workload.INSERT_START_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/Workload.html#INSERT_START_PROPERTY_DEFAULT">INSERT_START_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"0"</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.db.<A HREF="com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient5.CONNECTION_RETRY_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient5.html#CONNECTION_RETRY_PROPERTY">CONNECTION_RETRY_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"cassandra.connectionretries"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient5.CONNECTION_RETRY_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient5.html#CONNECTION_RETRY_PROPERTY_DEFAULT">CONNECTION_RETRY_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"300"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient5.Error"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient5.html#Error">Error</A></CODE></TD> -<TD ALIGN="right"><CODE>-1</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient5.Ok"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient5.html#Ok">Ok</A></CODE></TD> -<TD ALIGN="right"><CODE>0</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient5.OPERATION_RETRY_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient5.html#OPERATION_RETRY_PROPERTY">OPERATION_RETRY_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"cassandra.operationretries"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient5.OPERATION_RETRY_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient5.html#OPERATION_RETRY_PROPERTY_DEFAULT">OPERATION_RETRY_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"300"</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.db.<A HREF="com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient6.CONNECTION_RETRY_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient6.html#CONNECTION_RETRY_PROPERTY">CONNECTION_RETRY_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"cassandra.connectionretries"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient6.CONNECTION_RETRY_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient6.html#CONNECTION_RETRY_PROPERTY_DEFAULT">CONNECTION_RETRY_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"300"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient6.Error"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient6.html#Error">Error</A></CODE></TD> -<TD ALIGN="right"><CODE>-1</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient6.Ok"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient6.html#Ok">Ok</A></CODE></TD> -<TD ALIGN="right"><CODE>0</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient6.OPERATION_RETRY_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient6.html#OPERATION_RETRY_PROPERTY">OPERATION_RETRY_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"cassandra.operationretries"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient6.OPERATION_RETRY_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient6.html#OPERATION_RETRY_PROPERTY_DEFAULT">OPERATION_RETRY_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"300"</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.db.<A HREF="com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient7.CONNECTION_RETRY_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient7.html#CONNECTION_RETRY_PROPERTY">CONNECTION_RETRY_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"cassandra.connectionretries"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient7.CONNECTION_RETRY_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient7.html#CONNECTION_RETRY_PROPERTY_DEFAULT">CONNECTION_RETRY_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"300"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient7.Error"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient7.html#Error">Error</A></CODE></TD> -<TD ALIGN="right"><CODE>-1</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient7.Ok"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient7.html#Ok">Ok</A></CODE></TD> -<TD ALIGN="right"><CODE>0</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient7.OPERATION_RETRY_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient7.html#OPERATION_RETRY_PROPERTY">OPERATION_RETRY_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"cassandra.operationretries"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.CassandraClient7.OPERATION_RETRY_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/CassandraClient7.html#OPERATION_RETRY_PROPERTY_DEFAULT">OPERATION_RETRY_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"300"</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.db.<A HREF="com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.HBaseClient.HttpError"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/HBaseClient.html#HttpError">HttpError</A></CODE></TD> -<TD ALIGN="right"><CODE>-2</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.HBaseClient.NoMatchingRecord"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/HBaseClient.html#NoMatchingRecord">NoMatchingRecord</A></CODE></TD> -<TD ALIGN="right"><CODE>-3</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.HBaseClient.Ok"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/HBaseClient.html#Ok">Ok</A></CODE></TD> -<TD ALIGN="right"><CODE>0</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.db.HBaseClient.ServerError"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final int</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/db/HBaseClient.html#ServerError">ServerError</A></CODE></TD> -<TD ALIGN="right"><CODE>-1</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.generator.<A HREF="com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ScrambledZipfianGenerator</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.generator.ScrambledZipfianGenerator.ITEM_COUNT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final long</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html#ITEM_COUNT">ITEM_COUNT</A></CODE></TD> -<TD ALIGN="right"><CODE>10000000000L</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.generator.ScrambledZipfianGenerator.ZETAN"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final double</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html#ZETAN">ZETAN</A></CODE></TD> -<TD ALIGN="right"><CODE>52.93805640344461</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.generator.<A HREF="com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.generator.ZipfianGenerator.ZIPFIAN_CONSTANT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final double</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/generator/ZipfianGenerator.html#ZIPFIAN_CONSTANT">ZIPFIAN_CONSTANT</A></CODE></TD> -<TD ALIGN="right"><CODE>0.99</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.measurements.<A HREF="com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementHistogram</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.measurements.OneMeasurementHistogram.BUCKETS"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/measurements/OneMeasurementHistogram.html#BUCKETS">BUCKETS</A></CODE></TD> -<TD ALIGN="right"><CODE>"histogram.buckets"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.measurements.OneMeasurementHistogram.BUCKETS_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/measurements/OneMeasurementHistogram.html#BUCKETS_DEFAULT">BUCKETS_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"1000"</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.measurements.<A HREF="com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementTimeSeries</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.measurements.OneMeasurementTimeSeries.GRANULARITY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html#GRANULARITY">GRANULARITY</A></CODE></TD> -<TD ALIGN="right"><CODE>"timeseries.granularity"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.measurements.OneMeasurementTimeSeries.GRANULARITY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html#GRANULARITY_DEFAULT">GRANULARITY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"1000"</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> - -<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="3">com.yahoo.ycsb.workloads.<A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.FIELD_COUNT_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_COUNT_PROPERTY">FIELD_COUNT_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"fieldcount"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_COUNT_PROPERTY_DEFAULT">FIELD_COUNT_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"10"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.FIELD_LENGTH_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_LENGTH_PROPERTY">FIELD_LENGTH_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"fieldlength"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.FIELD_LENGTH_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_LENGTH_PROPERTY_DEFAULT">FIELD_LENGTH_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"100"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.INSERT_ORDER_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_ORDER_PROPERTY">INSERT_ORDER_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"insertorder"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.INSERT_ORDER_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_ORDER_PROPERTY_DEFAULT">INSERT_ORDER_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"hashed"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.INSERT_PROPORTION_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_PROPORTION_PROPERTY">INSERT_PROPORTION_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"insertproportion"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.INSERT_PROPORTION_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_PROPORTION_PROPERTY_DEFAULT">INSERT_PROPORTION_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"0.0"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.MAX_SCAN_LENGTH_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#MAX_SCAN_LENGTH_PROPERTY">MAX_SCAN_LENGTH_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"maxscanlength"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.MAX_SCAN_LENGTH_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#MAX_SCAN_LENGTH_PROPERTY_DEFAULT">MAX_SCAN_LENGTH_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"1000"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.READ_ALL_FIELDS_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#READ_ALL_FIELDS_PROPERTY">READ_ALL_FIELDS_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"readallfields"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.READ_ALL_FIELDS_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#READ_ALL_FIELDS_PROPERTY_DEFAULT">READ_ALL_FIELDS_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"true"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.READ_PROPORTION_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#READ_PROPORTION_PROPERTY">READ_PROPORTION_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"readproportion"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.READ_PROPORTION_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#READ_PROPORTION_PROPERTY_DEFAULT">READ_PROPORTION_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"0.95"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.READMODIFYWRITE_PROPORTION_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#READMODIFYWRITE_PROPORTION_PROPERTY">READMODIFYWRITE_PROPORTION_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"readmodifywriteproportion"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT">READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"0.0"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.REQUEST_DISTRIBUTION_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#REQUEST_DISTRIBUTION_PROPERTY">REQUEST_DISTRIBUTION_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"requestdistribution"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.REQUEST_DISTRIBUTION_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#REQUEST_DISTRIBUTION_PROPERTY_DEFAULT">REQUEST_DISTRIBUTION_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"uniform"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.SCAN_LENGTH_DISTRIBUTION_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_LENGTH_DISTRIBUTION_PROPERTY">SCAN_LENGTH_DISTRIBUTION_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"scanlengthdistribution"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT">SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"uniform"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.SCAN_PROPORTION_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_PROPORTION_PROPERTY">SCAN_PROPORTION_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"scanproportion"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.SCAN_PROPORTION_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_PROPORTION_PROPERTY_DEFAULT">SCAN_PROPORTION_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"0.0"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.TABLENAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#TABLENAME">TABLENAME</A></CODE></TD> -<TD ALIGN="right"><CODE>"usertable"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.UPDATE_PROPORTION_PROPERTY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#UPDATE_PROPORTION_PROPERTY">UPDATE_PROPORTION_PROPERTY</A></CODE></TD> -<TD ALIGN="right"><CODE>"updateproportion"</CODE></TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<A NAME="com.yahoo.ycsb.workloads.CoreWorkload.UPDATE_PROPORTION_PROPERTY_DEFAULT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1"> -<CODE>public static final java.lang.String</CODE></FONT></TD> -<TD ALIGN="left"><CODE><A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html#UPDATE_PROPORTION_PROPERTY_DEFAULT">UPDATE_PROPORTION_PROPERTY_DEFAULT</A></CODE></TD> -<TD ALIGN="right"><CODE>"0.05"</CODE></TD> -</TR> -</FONT></TD> -</TR> -</TABLE> - -<P> - -<P> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A> - <A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/deprecated-list.html b/doc/javadoc/deprecated-list.html deleted file mode 100644 index 4a9740047521fc68dd0368cd88627c75b78e9acb..0000000000000000000000000000000000000000 --- a/doc/javadoc/deprecated-list.html +++ /dev/null @@ -1,144 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -Deprecated List -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Deprecated List"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A> - <A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<CENTER> -<H2> -<B>Deprecated API</B></H2> -</CENTER> -<HR SIZE="4" NOSHADE> -<B>Contents</B><UL> -</UL> - -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A> - <A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/help-doc.html b/doc/javadoc/help-doc.html deleted file mode 100644 index 7bdabfd901f49d3722d5ad5c9ce35c9121b99a6e..0000000000000000000000000000000000000000 --- a/doc/javadoc/help-doc.html +++ /dev/null @@ -1,217 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -API Help -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="API Help"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?help-doc.html" target="_top"><B>FRAMES</B></A> - <A HREF="help-doc.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<CENTER> -<H1> -How This API Document Is Organized</H1> -</CENTER> -This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.<H3> -Overview</H3> -<BLOCKQUOTE> - -<P> -The <A HREF="overview-summary.html">Overview</A> page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.</BLOCKQUOTE> -<H3> -Package</H3> -<BLOCKQUOTE> - -<P> -Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:<UL> -<LI>Interfaces (italic)<LI>Classes<LI>Enums<LI>Exceptions<LI>Errors<LI>Annotation Types</UL> -</BLOCKQUOTE> -<H3> -Class/Interface</H3> -<BLOCKQUOTE> - -<P> -Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:<UL> -<LI>Class inheritance diagram<LI>Direct Subclasses<LI>All Known Subinterfaces<LI>All Known Implementing Classes<LI>Class/interface declaration<LI>Class/interface description -<P> -<LI>Nested Class Summary<LI>Field Summary<LI>Constructor Summary<LI>Method Summary -<P> -<LI>Field Detail<LI>Constructor Detail<LI>Method Detail</UL> -Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</BLOCKQUOTE> -</BLOCKQUOTE> -<H3> -Annotation Type</H3> -<BLOCKQUOTE> - -<P> -Each annotation type has its own separate page with the following sections:<UL> -<LI>Annotation Type declaration<LI>Annotation Type description<LI>Required Element Summary<LI>Optional Element Summary<LI>Element Detail</UL> -</BLOCKQUOTE> -</BLOCKQUOTE> -<H3> -Enum</H3> -<BLOCKQUOTE> - -<P> -Each enum has its own separate page with the following sections:<UL> -<LI>Enum declaration<LI>Enum description<LI>Enum Constant Summary<LI>Enum Constant Detail</UL> -</BLOCKQUOTE> -<H3> -Tree (Class Hierarchy)</H3> -<BLOCKQUOTE> -There is a <A HREF="overview-tree.html">Class Hierarchy</A> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.<UL> -<LI>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.<LI>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</UL> -</BLOCKQUOTE> -<H3> -Deprecated API</H3> -<BLOCKQUOTE> -The <A HREF="deprecated-list.html">Deprecated API</A> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</BLOCKQUOTE> -<H3> -Index</H3> -<BLOCKQUOTE> -The <A HREF="index-all.html">Index</A> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</BLOCKQUOTE> -<H3> -Prev/Next</H3> -These links take you to the next or previous class, interface, package, or related page.<H3> -Frames/No Frames</H3> -These links show and hide the HTML frames. All pages are available with or without frames. -<P> -<H3> -Serialized Form</H3> -Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. -<P> -<H3> -Constant Field Values</H3> -The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values. -<P> -<FONT SIZE="-1"> -<EM> -This help file applies to API documentation generated using the standard doclet.</EM> -</FONT> -<BR> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?help-doc.html" target="_top"><B>FRAMES</B></A> - <A HREF="help-doc.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/index-all.html b/doc/javadoc/index-all.html deleted file mode 100644 index f922cd04d5b779171b4caf06a316ee5aa64777e7..0000000000000000000000000000000000000000 --- a/doc/javadoc/index-all.html +++ /dev/null @@ -1,1013 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -Index -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="./stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Index"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="./overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="./overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="./deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="./help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="./index.html?index-all.html" target="_top"><B>FRAMES</B></A> - <A HREF="index-all.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="./allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="./allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<A HREF="#_A_">A</A> <A HREF="#_B_">B</A> <A HREF="#_C_">C</A> <A HREF="#_D_">D</A> <A HREF="#_E_">E</A> <A HREF="#_F_">F</A> <A HREF="#_G_">G</A> <A HREF="#_H_">H</A> <A HREF="#_I_">I</A> <A HREF="#_L_">L</A> <A HREF="#_M_">M</A> <A HREF="#_N_">N</A> <A HREF="#_O_">O</A> <A HREF="#_P_">P</A> <A HREF="#_R_">R</A> <A HREF="#_S_">S</A> <A HREF="#_T_">T</A> <A HREF="#_U_">U</A> <A HREF="#_V_">V</A> <A HREF="#_W_">W</A> <A HREF="#_Z_">Z</A> <A HREF="#___">_</A> <HR> -<A NAME="_A_"><!-- --></A><H2> -<B>A</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/generator/DiscreteGenerator.html#addValue(double, java.lang.String)"><B>addValue(double, String)</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/DiscreteGenerator.html" title="class in com.yahoo.ycsb.generator">DiscreteGenerator</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/Utils.html#ASCIIString(int)"><B>ASCIIString(int)</B></A> - -Static method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A> -<DD>Generate a random ASCII string of a given length. -</DL> -<HR> -<A NAME="_B_"><!-- --></A><H2> -<B>B</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb"><B>BasicDB</B></A> - Class in <A HREF="./com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A><DD>Basic DB that just prints out the requested operations, instead of doing them against a database.<DT><A HREF="./com/yahoo/ycsb/BasicDB.html#BasicDB()"><B>BasicDB()</B></A> - -Constructor for class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html#BUCKETS"><B>BUCKETS</B></A> - -Static variable in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementHistogram</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html#BUCKETS_DEFAULT"><B>BUCKETS_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementHistogram</A> -<DD> -</DL> -<HR> -<A NAME="_C_"><!-- --></A><H2> -<B>C</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db"><B>CassandraClient5</B></A> - Class in <A HREF="./com/yahoo/ycsb/db/package-summary.html">com.yahoo.ycsb.db</A><DD>Cassandra 0.5 client for YCSB framework<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#CassandraClient5()"><B>CassandraClient5()</B></A> - -Constructor for class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db"><B>CassandraClient6</B></A> - Class in <A HREF="./com/yahoo/ycsb/db/package-summary.html">com.yahoo.ycsb.db</A><DD>Cassandra 0.6 client for YCSB framework<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#CassandraClient6()"><B>CassandraClient6()</B></A> - -Constructor for class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db"><B>CassandraClient7</B></A> - Class in <A HREF="./com/yahoo/ycsb/db/package-summary.html">com.yahoo.ycsb.db</A><DD>Cassandra 0.7 client for YCSB framework<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#CassandraClient7()"><B>CassandraClient7()</B></A> - -Constructor for class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/Client.html#checkRequiredProperties(java.util.Properties)"><B>checkRequiredProperties(Properties)</B></A> - -Static method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb">Client</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#cleanup()"><B>cleanup()</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD>Cleanup any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#cleanup()"><B>cleanup()</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD>Cleanup any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#cleanup()"><B>cleanup()</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD>Cleanup any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/DB.html#cleanup()"><B>cleanup()</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> -<DD>Cleanup any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#cleanup()"><B>cleanup()</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD>Cleanup any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/DBWrapper.html#cleanup()"><B>cleanup()</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A> -<DD>Cleanup any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/Workload.html#cleanup()"><B>cleanup()</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A> -<DD>Cleanup the scenario. -<DT><A HREF="./com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb"><B>Client</B></A> - Class in <A HREF="./com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A><DD>Main class for executing YCSB.<DT><A HREF="./com/yahoo/ycsb/Client.html#Client()"><B>Client()</B></A> - -Constructor for class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb">Client</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/package-summary.html"><B>com.yahoo.ycsb</B></A> - package com.yahoo.ycsb<DD> <DT><A HREF="./com/yahoo/ycsb/db/package-summary.html"><B>com.yahoo.ycsb.db</B></A> - package com.yahoo.ycsb.db<DD> <DT><A HREF="./com/yahoo/ycsb/generator/package-summary.html"><B>com.yahoo.ycsb.generator</B></A> - package com.yahoo.ycsb.generator<DD> <DT><A HREF="./com/yahoo/ycsb/measurements/package-summary.html"><B>com.yahoo.ycsb.measurements</B></A> - package com.yahoo.ycsb.measurements<DD> <DT><A HREF="./com/yahoo/ycsb/workloads/package-summary.html"><B>com.yahoo.ycsb.workloads</B></A> - package com.yahoo.ycsb.workloads<DD> <DT><A HREF="./com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb"><B>CommandLine</B></A> - Class in <A HREF="./com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A><DD>A simple command line client to a database, using the appropriate com.yahoo.ycsb.DB implementation.<DT><A HREF="./com/yahoo/ycsb/CommandLine.html#CommandLine()"><B>CommandLine()</B></A> - -Constructor for class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb">CommandLine</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#CONNECTION_RETRY_PROPERTY"><B>CONNECTION_RETRY_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#CONNECTION_RETRY_PROPERTY"><B>CONNECTION_RETRY_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#CONNECTION_RETRY_PROPERTY"><B>CONNECTION_RETRY_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#CONNECTION_RETRY_PROPERTY_DEFAULT"><B>CONNECTION_RETRY_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#CONNECTION_RETRY_PROPERTY_DEFAULT"><B>CONNECTION_RETRY_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#CONNECTION_RETRY_PROPERTY_DEFAULT"><B>CONNECTION_RETRY_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#ConnectionRetries"><B>ConnectionRetries</B></A> - -Variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#ConnectionRetries"><B>ConnectionRetries</B></A> - -Variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#ConnectionRetries"><B>ConnectionRetries</B></A> - -Variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads"><B>CoreWorkload</B></A> - Class in <A HREF="./com/yahoo/ycsb/workloads/package-summary.html">com.yahoo.ycsb.workloads</A><DD>The core benchmark scenario.<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#CoreWorkload()"><B>CoreWorkload()</B></A> - -Constructor for class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/CounterGenerator.html" title="class in com.yahoo.ycsb.generator"><B>CounterGenerator</B></A> - Class in <A HREF="./com/yahoo/ycsb/generator/package-summary.html">com.yahoo.ycsb.generator</A><DD>Generates a sequence of integers 0, 1, ...<DT><A HREF="./com/yahoo/ycsb/generator/CounterGenerator.html#CounterGenerator(int)"><B>CounterGenerator(int)</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/CounterGenerator.html" title="class in com.yahoo.ycsb.generator">CounterGenerator</A> -<DD>Create a counter that starts at countstart -</DL> -<HR> -<A NAME="_D_"><!-- --></A><H2> -<B>D</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb"><B>DB</B></A> - Class in <A HREF="./com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A><DD>A layer for accessing a database to be benchmarked.<DT><A HREF="./com/yahoo/ycsb/DB.html#DB()"><B>DB()</B></A> - -Constructor for class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb"><B>DBException</B></A> - Exception in <A HREF="./com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A><DD>Something bad happened while interacting with the database.<DT><A HREF="./com/yahoo/ycsb/DBException.html#DBException(java.lang.String)"><B>DBException(String)</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DBException.html#DBException()"><B>DBException()</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DBException.html#DBException(java.lang.String, java.lang.Throwable)"><B>DBException(String, Throwable)</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DBException.html#DBException(java.lang.Throwable)"><B>DBException(Throwable)</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">DBException</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb"><B>DBFactory</B></A> - Class in <A HREF="./com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A><DD>Creates a DB layer by dynamically classloading the specified DB class.<DT><A HREF="./com/yahoo/ycsb/DBFactory.html#DBFactory()"><B>DBFactory()</B></A> - -Constructor for class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb">DBFactory</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb"><B>DBWrapper</B></A> - Class in <A HREF="./com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A><DD>Wrapper around a "real" DB that measures latencies and counts return codes.<DT><A HREF="./com/yahoo/ycsb/DBWrapper.html#DBWrapper(com.yahoo.ycsb.DB)"><B>DBWrapper(DB)</B></A> - -Constructor for class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/CommandLine.html#DEFAULT_DB"><B>DEFAULT_DB</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb">CommandLine</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/BasicDB.html#delete(java.lang.String, java.lang.String)"><B>delete(String, String)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<DD>Delete a record from the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#delete(java.lang.String, java.lang.String)"><B>delete(String, String)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD>Delete a record from the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#delete(java.lang.String, java.lang.String)"><B>delete(String, String)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD>Delete a record from the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#delete(java.lang.String, java.lang.String)"><B>delete(String, String)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD>Delete a record from the database. -<DT><A HREF="./com/yahoo/ycsb/DB.html#delete(java.lang.String, java.lang.String)"><B>delete(String, String)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> -<DD>Delete a record from the database. -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#delete(java.lang.String, java.lang.String)"><B>delete(String, String)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD>Delete a record from the database. -<DT><A HREF="./com/yahoo/ycsb/db/MongoDbClient.html#delete(java.lang.String, java.lang.String)"><B>delete(String, String)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db">MongoDbClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DBWrapper.html#delete(java.lang.String, java.lang.String)"><B>delete(String, String)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A> -<DD>Delete a record from the database. -<DT><A HREF="./com/yahoo/ycsb/generator/DiscreteGenerator.html" title="class in com.yahoo.ycsb.generator"><B>DiscreteGenerator</B></A> - Class in <A HREF="./com/yahoo/ycsb/generator/package-summary.html">com.yahoo.ycsb.generator</A><DD>Generates a distribution by choosing from a discrete set of values.<DT><A HREF="./com/yahoo/ycsb/generator/DiscreteGenerator.html#DiscreteGenerator()"><B>DiscreteGenerator()</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/DiscreteGenerator.html" title="class in com.yahoo.ycsb.generator">DiscreteGenerator</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/Workload.html#doInsert(com.yahoo.ycsb.DB, java.lang.Object)"><B>doInsert(DB, Object)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A> -<DD>Do one insert operation. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#doInsert(com.yahoo.ycsb.DB, java.lang.Object)"><B>doInsert(DB, Object)</B></A> - -Method in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>Do one insert operation. -<DT><A HREF="./com/yahoo/ycsb/Workload.html#doTransaction(com.yahoo.ycsb.DB, java.lang.Object)"><B>doTransaction(DB, Object)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A> -<DD>Do one transaction operation. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#doTransaction(com.yahoo.ycsb.DB, java.lang.Object)"><B>doTransaction(DB, Object)</B></A> - -Method in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>Do one transaction operation. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#doTransactionInsert(com.yahoo.ycsb.DB)"><B>doTransactionInsert(DB)</B></A> - -Method in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#doTransactionRead(com.yahoo.ycsb.DB)"><B>doTransactionRead(DB)</B></A> - -Method in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#doTransactionReadModifyWrite(com.yahoo.ycsb.DB)"><B>doTransactionReadModifyWrite(DB)</B></A> - -Method in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#doTransactionScan(com.yahoo.ycsb.DB)"><B>doTransactionScan(DB)</B></A> - -Method in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#doTransactionUpdate(com.yahoo.ycsb.DB)"><B>doTransactionUpdate(DB)</B></A> - -Method in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD> -</DL> -<HR> -<A NAME="_E_"><!-- --></A><H2> -<B>E</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#Error"><B>Error</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#Error"><B>Error</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#Error"><B>Error</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD> -</DL> -<HR> -<A NAME="_F_"><!-- --></A><H2> -<B>F</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_COUNT_PROPERTY"><B>FIELD_COUNT_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for the number of fields in a record. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_COUNT_PROPERTY_DEFAULT"><B>FIELD_COUNT_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>Default number of fields in a record. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_LENGTH_PROPERTY"><B>FIELD_LENGTH_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for the length of a field in bytes. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#FIELD_LENGTH_PROPERTY_DEFAULT"><B>FIELD_LENGTH_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The default length of a field in bytes. -<DT><A HREF="./com/yahoo/ycsb/Utils.html#FNV_offset_basis_32"><B>FNV_offset_basis_32</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/Utils.html#FNV_offset_basis_64"><B>FNV_offset_basis_64</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/Utils.html#FNV_prime_32"><B>FNV_prime_32</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/Utils.html#FNV_prime_64"><B>FNV_prime_64</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/Utils.html#FNVhash32(int)"><B>FNVhash32(int)</B></A> - -Static method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A> -<DD>32 bit FNV hash. -<DT><A HREF="./com/yahoo/ycsb/Utils.html#FNVhash64(long)"><B>FNVhash64(long)</B></A> - -Static method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A> -<DD>64 bit FNV hash. -</DL> -<HR> -<A NAME="_G_"><!-- --></A><H2> -<B>G</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/generator/Generator.html" title="class in com.yahoo.ycsb.generator"><B>Generator</B></A> - Class in <A HREF="./com/yahoo/ycsb/generator/package-summary.html">com.yahoo.ycsb.generator</A><DD>An expression that generates a sequence of string values, following some distribution (Uniform, Zipfian, Sequential, etc.)<DT><A HREF="./com/yahoo/ycsb/generator/Generator.html#Generator()"><B>Generator()</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/Generator.html" title="class in com.yahoo.ycsb.generator">Generator</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#getHTable(java.lang.String)"><B>getHTable(String)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/Measurements.html#getMeasurements()"><B>getMeasurements()</B></A> - -Static method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/Measurements.html" title="class in com.yahoo.ycsb.measurements">Measurements</A> -<DD>Return the singleton Measurements object. -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html#getName()"><B>getName()</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html" title="class in com.yahoo.ycsb.measurements">OneMeasurement</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DB.html#getProperties()"><B>getProperties()</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> -<DD>Get the set of properties for this DB. -<DT><A HREF="./com/yahoo/ycsb/DBWrapper.html#getProperties()"><B>getProperties()</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A> -<DD>Get the set of properties for this DB. -<DT><A HREF="./com/yahoo/ycsb/measurements/Measurements.html#getSummary()"><B>getSummary()</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/Measurements.html" title="class in com.yahoo.ycsb.measurements">Measurements</A> -<DD>Return a one line summary of the measurements. -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html#getSummary()"><B>getSummary()</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html" title="class in com.yahoo.ycsb.measurements">OneMeasurement</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html#getSummary()"><B>getSummary()</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementHistogram</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html#getSummary()"><B>getSummary()</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementTimeSeries</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html#GRANULARITY"><B>GRANULARITY</B></A> - -Static variable in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementTimeSeries</A> -<DD>Granularity for time series; measurements will be averaged in chunks of this granularity. -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html#GRANULARITY_DEFAULT"><B>GRANULARITY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementTimeSeries</A> -<DD> -</DL> -<HR> -<A NAME="_H_"><!-- --></A><H2> -<B>H</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/Utils.html#hash(int)"><B>hash(int)</B></A> - -Static method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A> -<DD>Hash an integer value. -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db"><B>HBaseClient</B></A> - Class in <A HREF="./com/yahoo/ycsb/db/package-summary.html">com.yahoo.ycsb.db</A><DD>HBase client for YCSB framework<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#HBaseClient()"><B>HBaseClient()</B></A> - -Constructor for class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/CommandLine.html#help()"><B>help()</B></A> - -Static method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb">CommandLine</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#HttpError"><B>HttpError</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -</DL> -<HR> -<A NAME="_I_"><!-- --></A><H2> -<B>I</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/BasicDB.html#init()"><B>init()</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<DD>Initialize any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#init()"><B>init()</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD>Initialize any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#init()"><B>init()</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD>Initialize any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#init()"><B>init()</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD>Initialize any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#init()"><B>init()</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD>Initialize any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/DB.html#init()"><B>init()</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> -<DD>Initialize any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/db/MongoDbClient.html#init()"><B>init()</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db">MongoDbClient</A> -<DD>Initialize any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/DBWrapper.html#init()"><B>init()</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A> -<DD>Initialize any state for this DB. -<DT><A HREF="./com/yahoo/ycsb/Workload.html#init(java.util.Properties)"><B>init(Properties)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A> -<DD>Initialize the scenario. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#init(java.util.Properties)"><B>init(Properties)</B></A> - -Method in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>Initialize the scenario. -<DT><A HREF="./com/yahoo/ycsb/Workload.html#initThread(java.util.Properties, int, int)"><B>initThread(Properties, int, int)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A> -<DD>Initialize any state for a particular client thread. -<DT><A HREF="./com/yahoo/ycsb/BasicDB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)"><B>insert(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<DD>Insert a record in the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#insert(java.lang.String, java.lang.String, java.util.HashMap)"><B>insert(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD>Insert a record in the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#insert(java.lang.String, java.lang.String, java.util.HashMap)"><B>insert(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD>Insert a record in the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#insert(java.lang.String, java.lang.String, java.util.HashMap)"><B>insert(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD>Insert a record in the database. -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#insert(java.lang.String, java.lang.String, java.util.HashMap)"><B>insert(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD>Insert a record in the database. -<DT><A HREF="./com/yahoo/ycsb/DB.html#insert(java.lang.String, java.lang.String, java.util.HashMap)"><B>insert(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> -<DD>Insert a record in the database. -<DT><A HREF="./com/yahoo/ycsb/db/MongoDbClient.html#insert(java.lang.String, java.lang.String, java.util.HashMap)"><B>insert(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db">MongoDbClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DBWrapper.html#insert(java.lang.String, java.lang.String, java.util.HashMap)"><B>insert(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A> -<DD>Insert a record in the database. -<DT><A HREF="./com/yahoo/ycsb/Client.html#INSERT_COUNT_PROPERTY"><B>INSERT_COUNT_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb">Client</A> -<DD>Indicates how many inserts to do, if less than recordcount. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_ORDER_PROPERTY"><B>INSERT_ORDER_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for the order to insert records. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_ORDER_PROPERTY_DEFAULT"><B>INSERT_ORDER_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>Default insert order. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_PROPORTION_PROPERTY"><B>INSERT_PROPORTION_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for the proportion of transactions that are inserts. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#INSERT_PROPORTION_PROPERTY_DEFAULT"><B>INSERT_PROPORTION_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The default proportion of transactions that are inserts. -<DT><A HREF="./com/yahoo/ycsb/Workload.html#INSERT_START_PROPERTY"><B>INSERT_START_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/Workload.html#INSERT_START_PROPERTY_DEFAULT"><B>INSERT_START_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html" title="class in com.yahoo.ycsb.generator"><B>IntegerGenerator</B></A> - Class in <A HREF="./com/yahoo/ycsb/generator/package-summary.html">com.yahoo.ycsb.generator</A><DD>A generator that is capable of generating ints as well as strings<DT><A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html#IntegerGenerator()"><B>IntegerGenerator()</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html" title="class in com.yahoo.ycsb.generator">IntegerGenerator</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html#ITEM_COUNT"><B>ITEM_COUNT</B></A> - -Static variable in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ScrambledZipfianGenerator</A> -<DD> -</DL> -<HR> -<A NAME="_L_"><!-- --></A><H2> -<B>L</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html#lastInt()"><B>lastInt()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html" title="class in com.yahoo.ycsb.generator">IntegerGenerator</A> -<DD>Return the previous int generated by the distribution. -<DT><A HREF="./com/yahoo/ycsb/generator/DiscreteGenerator.html#lastString()"><B>lastString()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/DiscreteGenerator.html" title="class in com.yahoo.ycsb.generator">DiscreteGenerator</A> -<DD>Return the previous string generated by the distribution; e.g., returned from the last nextString() call. -<DT><A HREF="./com/yahoo/ycsb/generator/Generator.html#lastString()"><B>lastString()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/Generator.html" title="class in com.yahoo.ycsb.generator">Generator</A> -<DD>Return the previous string generated by the distribution; e.g., returned from the last nextString() call. -<DT><A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html#lastString()"><B>lastString()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html" title="class in com.yahoo.ycsb.generator">IntegerGenerator</A> -<DD>Return the previous string generated by the distribution; e.g., returned from the last nextString() call. -<DT><A HREF="./com/yahoo/ycsb/generator/UniformGenerator.html#lastString()"><B>lastString()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/UniformGenerator.html" title="class in com.yahoo.ycsb.generator">UniformGenerator</A> -<DD>Return the previous string generated by the distribution; e.g., returned from the last nextString() call. -</DL> -<HR> -<A NAME="_M_"><!-- --></A><H2> -<B>M</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/Client.html#main(java.lang.String[])"><B>main(String[])</B></A> - -Static method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb">Client</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/CommandLine.html#main(java.lang.String[])"><B>main(String[])</B></A> - -Static method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb">CommandLine</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#main(java.lang.String[])"><B>main(String[])</B></A> - -Static method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#main(java.lang.String[])"><B>main(String[])</B></A> - -Static method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#main(java.lang.String[])"><B>main(String[])</B></A> - -Static method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#main(java.lang.String[])"><B>main(String[])</B></A> - -Static method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html#main(java.lang.String[])"><B>main(String[])</B></A> - -Static method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ScrambledZipfianGenerator</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/SkewedLatestGenerator.html#main(java.lang.String[])"><B>main(String[])</B></A> - -Static method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb.generator">SkewedLatestGenerator</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html#main(java.lang.String[])"><B>main(String[])</B></A> - -Static method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#MAX_SCAN_LENGTH_PROPERTY"><B>MAX_SCAN_LENGTH_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for the max scan length (number of records) -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#MAX_SCAN_LENGTH_PROPERTY_DEFAULT"><B>MAX_SCAN_LENGTH_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The default max scan length. -<DT><A HREF="./com/yahoo/ycsb/measurements/Measurements.html#measure(java.lang.String, int)"><B>measure(String, int)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/Measurements.html" title="class in com.yahoo.ycsb.measurements">Measurements</A> -<DD>Report a single value of a single metric. -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html#measure(int)"><B>measure(int)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html" title="class in com.yahoo.ycsb.measurements">OneMeasurement</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html#measure(int)"><B>measure(int)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementHistogram</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html#measure(int)"><B>measure(int)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementTimeSeries</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/Measurements.html" title="class in com.yahoo.ycsb.measurements"><B>Measurements</B></A> - Class in <A HREF="./com/yahoo/ycsb/measurements/package-summary.html">com.yahoo.ycsb.measurements</A><DD>Collects latency measurements, and reports them when requested.<DT><A HREF="./com/yahoo/ycsb/measurements/Measurements.html#Measurements(java.util.Properties)"><B>Measurements(Properties)</B></A> - -Constructor for class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/Measurements.html" title="class in com.yahoo.ycsb.measurements">Measurements</A> -<DD>Create a new object with the specified properties. -<DT><A HREF="./com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db"><B>MongoDbClient</B></A> - Class in <A HREF="./com/yahoo/ycsb/db/package-summary.html">com.yahoo.ycsb.db</A><DD>MongoDB client for YCSB framework.<DT><A HREF="./com/yahoo/ycsb/db/MongoDbClient.html#MongoDbClient()"><B>MongoDbClient()</B></A> - -Constructor for class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db">MongoDbClient</A> -<DD> -</DL> -<HR> -<A NAME="_N_"><!-- --></A><H2> -<B>N</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/DBFactory.html#newDB(java.lang.String, java.util.Properties)"><B>newDB(String, Properties)</B></A> - -Static method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb">DBFactory</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/CounterGenerator.html#nextInt()"><B>nextInt()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/CounterGenerator.html" title="class in com.yahoo.ycsb.generator">CounterGenerator</A> -<DD>If the generator returns numeric (integer) values, return the next value as an int. -<DT><A HREF="./com/yahoo/ycsb/generator/DiscreteGenerator.html#nextInt()"><B>nextInt()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/DiscreteGenerator.html" title="class in com.yahoo.ycsb.generator">DiscreteGenerator</A> -<DD>If the generator returns numeric (integer) values, return the next value as an int. -<DT><A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html#nextInt()"><B>nextInt()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html" title="class in com.yahoo.ycsb.generator">IntegerGenerator</A> -<DD>Return the next value as an int. -<DT><A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html#nextInt()"><B>nextInt()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ScrambledZipfianGenerator</A> -<DD>Return the next int in the sequence. -<DT><A HREF="./com/yahoo/ycsb/generator/SkewedLatestGenerator.html#nextInt()"><B>nextInt()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb.generator">SkewedLatestGenerator</A> -<DD>Generate the next string in the distribution, skewed Zipfian favoring the items most recently returned by the basis generator. -<DT><A HREF="./com/yahoo/ycsb/generator/UniformIntegerGenerator.html#nextInt()"><B>nextInt()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/UniformIntegerGenerator.html" title="class in com.yahoo.ycsb.generator">UniformIntegerGenerator</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html#nextInt(int)"><B>nextInt(int)</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<DD>Generate the next item. -<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html#nextInt()"><B>nextInt()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<DD>Return the next value, skewed by the Zipfian distribution. -<DT><A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html#nextLong()"><B>nextLong()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ScrambledZipfianGenerator</A> -<DD>Return the next long in the sequence. -<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html#nextLong(long)"><B>nextLong(long)</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<DD>Generate the next item as a long. -<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html#nextLong()"><B>nextLong()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<DD>Return the next value, skewed by the Zipfian distribution. -<DT><A HREF="./com/yahoo/ycsb/generator/DiscreteGenerator.html#nextString()"><B>nextString()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/DiscreteGenerator.html" title="class in com.yahoo.ycsb.generator">DiscreteGenerator</A> -<DD>Generate the next string in the distribution. -<DT><A HREF="./com/yahoo/ycsb/generator/Generator.html#nextString()"><B>nextString()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/Generator.html" title="class in com.yahoo.ycsb.generator">Generator</A> -<DD>Generate the next string in the distribution. -<DT><A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html#nextString()"><B>nextString()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html" title="class in com.yahoo.ycsb.generator">IntegerGenerator</A> -<DD>Generate the next string in the distribution. -<DT><A HREF="./com/yahoo/ycsb/generator/UniformGenerator.html#nextString()"><B>nextString()</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/UniformGenerator.html" title="class in com.yahoo.ycsb.generator">UniformGenerator</A> -<DD>Generate the next string in the distribution. -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#NoMatchingRecord"><B>NoMatchingRecord</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -</DL> -<HR> -<A NAME="_O_"><!-- --></A><H2> -<B>O</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#Ok"><B>Ok</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#Ok"><B>Ok</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#Ok"><B>Ok</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#Ok"><B>Ok</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html" title="class in com.yahoo.ycsb.measurements"><B>OneMeasurement</B></A> - Class in <A HREF="./com/yahoo/ycsb/measurements/package-summary.html">com.yahoo.ycsb.measurements</A><DD>A single measured metric (such as READ LATENCY)<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html#OneMeasurement(java.lang.String)"><B>OneMeasurement(String)</B></A> - -Constructor for class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html" title="class in com.yahoo.ycsb.measurements">OneMeasurement</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements"><B>OneMeasurementHistogram</B></A> - Class in <A HREF="./com/yahoo/ycsb/measurements/package-summary.html">com.yahoo.ycsb.measurements</A><DD>Take measurements and maintain a histogram of a given metric, such as READ LATENCY.<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html#OneMeasurementHistogram(java.lang.String, java.util.Properties)"><B>OneMeasurementHistogram(String, Properties)</B></A> - -Constructor for class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementHistogram</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements"><B>OneMeasurementTimeSeries</B></A> - Class in <A HREF="./com/yahoo/ycsb/measurements/package-summary.html">com.yahoo.ycsb.measurements</A><DD>A time series measurement of a metric, such as READ LATENCY.<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html#OneMeasurementTimeSeries(java.lang.String, java.util.Properties)"><B>OneMeasurementTimeSeries(String, Properties)</B></A> - -Constructor for class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementTimeSeries</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/Client.html#OPERATION_COUNT_PROPERTY"><B>OPERATION_COUNT_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb">Client</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#OPERATION_RETRY_PROPERTY"><B>OPERATION_RETRY_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#OPERATION_RETRY_PROPERTY"><B>OPERATION_RETRY_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#OPERATION_RETRY_PROPERTY"><B>OPERATION_RETRY_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#OPERATION_RETRY_PROPERTY_DEFAULT"><B>OPERATION_RETRY_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#OPERATION_RETRY_PROPERTY_DEFAULT"><B>OPERATION_RETRY_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#OPERATION_RETRY_PROPERTY_DEFAULT"><B>OPERATION_RETRY_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#OperationRetries"><B>OperationRetries</B></A> - -Variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#OperationRetries"><B>OperationRetries</B></A> - -Variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#OperationRetries"><B>OperationRetries</B></A> - -Variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD> -</DL> -<HR> -<A NAME="_P_"><!-- --></A><H2> -<B>P</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/measurements/Measurements.html#printReport(java.io.PrintStream)"><B>printReport(PrintStream)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/Measurements.html" title="class in com.yahoo.ycsb.measurements">Measurements</A> -<DD>Print the full report to the listed PrintStream. -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html#printReport(java.io.PrintStream)"><B>printReport(PrintStream)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html" title="class in com.yahoo.ycsb.measurements">OneMeasurement</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html#printReport(java.io.PrintStream)"><B>printReport(PrintStream)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementHistogram</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html#printReport(java.io.PrintStream)"><B>printReport(PrintStream)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementTimeSeries</A> -<DD> -</DL> -<HR> -<A NAME="_R_"><!-- --></A><H2> -<B>R</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/BasicDB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><B>read(String, String, Set<String>, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<DD>Read a record from the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><B>read(String, String, Set<String>, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD>Read a record from the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><B>read(String, String, Set<String>, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD>Read a record from the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><B>read(String, String, Set<String>, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD>Read a record from the database. -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><B>read(String, String, Set<String>, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD>Read a record from the database. -<DT><A HREF="./com/yahoo/ycsb/db/MongoDbClient.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><B>read(String, String, Set<String>, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db">MongoDbClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DB.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><B>read(String, String, Set<String>, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> -<DD>Read a record from the database. -<DT><A HREF="./com/yahoo/ycsb/DBWrapper.html#read(java.lang.String, java.lang.String, java.util.Set, java.util.HashMap)"><B>read(String, String, Set<String>, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A> -<DD>Read a record from the database. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#READ_ALL_FIELDS_PROPERTY"><B>READ_ALL_FIELDS_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for deciding whether to read one field (false) or all fields (true) of a record. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#READ_ALL_FIELDS_PROPERTY_DEFAULT"><B>READ_ALL_FIELDS_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The default value for the readallfields property. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#READ_PROPORTION_PROPERTY"><B>READ_PROPORTION_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for the proportion of transactions that are reads. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#READ_PROPORTION_PROPERTY_DEFAULT"><B>READ_PROPORTION_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The default proportion of transactions that are reads. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#READMODIFYWRITE_PROPORTION_PROPERTY"><B>READMODIFYWRITE_PROPORTION_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for the proportion of transactions that are read-modify-write. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT"><B>READMODIFYWRITE_PROPORTION_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The default proportion of transactions that are scans. -<DT><A HREF="./com/yahoo/ycsb/Client.html#RECORD_COUNT_PROPERTY"><B>RECORD_COUNT_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb">Client</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/Measurements.html#reportReturnCode(java.lang.String, int)"><B>reportReturnCode(String, int)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/Measurements.html" title="class in com.yahoo.ycsb.measurements">Measurements</A> -<DD>Report a return code for a single DB operaiton. -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html#reportReturnCode(int)"><B>reportReturnCode(int)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurement.html" title="class in com.yahoo.ycsb.measurements">OneMeasurement</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html#reportReturnCode(int)"><B>reportReturnCode(int)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementHistogram</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html#reportReturnCode(int)"><B>reportReturnCode(int)</B></A> - -Method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements">OneMeasurementTimeSeries</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#REQUEST_DISTRIBUTION_PROPERTY"><B>REQUEST_DISTRIBUTION_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for the the distribution of requests across the keyspace. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#REQUEST_DISTRIBUTION_PROPERTY_DEFAULT"><B>REQUEST_DISTRIBUTION_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The default distribution of requests across the keyspace -</DL> -<HR> -<A NAME="_S_"><!-- --></A><H2> -<B>S</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/BasicDB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><B>scan(String, String, int, Set<String>, Vector<HashMap<String, String>>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<DD>Perform a range scan for a set of records in the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><B>scan(String, String, int, Set<String>, Vector<HashMap<String, String>>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD>Perform a range scan for a set of records in the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><B>scan(String, String, int, Set<String>, Vector<HashMap<String, String>>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD>Perform a range scan for a set of records in the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><B>scan(String, String, int, Set<String>, Vector<HashMap<String, String>>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD>Perform a range scan for a set of records in the database. -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><B>scan(String, String, int, Set<String>, Vector<HashMap<String, String>>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD>Perform a range scan for a set of records in the database. -<DT><A HREF="./com/yahoo/ycsb/db/MongoDbClient.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><B>scan(String, String, int, Set<String>, Vector<HashMap<String, String>>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db">MongoDbClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DB.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><B>scan(String, String, int, Set<String>, Vector<HashMap<String, String>>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> -<DD>Perform a range scan for a set of records in the database. -<DT><A HREF="./com/yahoo/ycsb/DBWrapper.html#scan(java.lang.String, java.lang.String, int, java.util.Set, java.util.Vector)"><B>scan(String, String, int, Set<String>, Vector<HashMap<String, String>>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A> -<DD>Perform a range scan for a set of records in the database. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_LENGTH_DISTRIBUTION_PROPERTY"><B>SCAN_LENGTH_DISTRIBUTION_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for the scan length distribution. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT"><B>SCAN_LENGTH_DISTRIBUTION_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The default max scan length. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_PROPORTION_PROPERTY"><B>SCAN_PROPORTION_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for the proportion of transactions that are scans. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#SCAN_PROPORTION_PROPERTY_DEFAULT"><B>SCAN_PROPORTION_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The default proportion of transactions that are scans. -<DT><A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator"><B>ScrambledZipfianGenerator</B></A> - Class in <A HREF="./com/yahoo/ycsb/generator/package-summary.html">com.yahoo.ycsb.generator</A><DD>A generator of a zipfian distribution.<DT><A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html#ScrambledZipfianGenerator(long)"><B>ScrambledZipfianGenerator(long)</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ScrambledZipfianGenerator</A> -<DD>Create a zipfian generator for the specified number of items. -<DT><A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html#ScrambledZipfianGenerator(long, long)"><B>ScrambledZipfianGenerator(long, long)</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ScrambledZipfianGenerator</A> -<DD>Create a zipfian generator for items between min and max. -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#ServerError"><B>ServerError</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html#setLastInt(int)"><B>setLastInt(int)</B></A> - -Method in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/IntegerGenerator.html" title="class in com.yahoo.ycsb.generator">IntegerGenerator</A> -<DD>Set the last value generated. -<DT><A HREF="./com/yahoo/ycsb/DB.html#setProperties(java.util.Properties)"><B>setProperties(Properties)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> -<DD>Set the properties for this DB. -<DT><A HREF="./com/yahoo/ycsb/DBWrapper.html#setProperties(java.util.Properties)"><B>setProperties(Properties)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A> -<DD>Set the properties for this DB. -<DT><A HREF="./com/yahoo/ycsb/measurements/Measurements.html#setProperties(java.util.Properties)"><B>setProperties(Properties)</B></A> - -Static method in class com.yahoo.ycsb.measurements.<A HREF="./com/yahoo/ycsb/measurements/Measurements.html" title="class in com.yahoo.ycsb.measurements">Measurements</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/BasicDB.html#SIMULATE_DELAY"><B>SIMULATE_DELAY</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/BasicDB.html#SIMULATE_DELAY_DEFAULT"><B>SIMULATE_DELAY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb.generator"><B>SkewedLatestGenerator</B></A> - Class in <A HREF="./com/yahoo/ycsb/generator/package-summary.html">com.yahoo.ycsb.generator</A><DD>Generate a popularity distribution of items, skewed to favor recent items significantly more than older items.<DT><A HREF="./com/yahoo/ycsb/generator/SkewedLatestGenerator.html#SkewedLatestGenerator(com.yahoo.ycsb.generator.CounterGenerator)"><B>SkewedLatestGenerator(CounterGenerator)</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb.generator">SkewedLatestGenerator</A> -<DD> -</DL> -<HR> -<A NAME="_T_"><!-- --></A><H2> -<B>T</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#tableLock"><B>tableLock</B></A> - -Static variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#TABLENAME"><B>TABLENAME</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the database table to run queries against. -</DL> -<HR> -<A NAME="_U_"><!-- --></A><H2> -<B>U</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/generator/UniformGenerator.html" title="class in com.yahoo.ycsb.generator"><B>UniformGenerator</B></A> - Class in <A HREF="./com/yahoo/ycsb/generator/package-summary.html">com.yahoo.ycsb.generator</A><DD>An expression that generates a random integer in the specified range<DT><A HREF="./com/yahoo/ycsb/generator/UniformGenerator.html#UniformGenerator(java.util.Vector)"><B>UniformGenerator(Vector<String>)</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/UniformGenerator.html" title="class in com.yahoo.ycsb.generator">UniformGenerator</A> -<DD>Creates a generator that will return strings from the specified set uniformly randomly -<DT><A HREF="./com/yahoo/ycsb/generator/UniformIntegerGenerator.html" title="class in com.yahoo.ycsb.generator"><B>UniformIntegerGenerator</B></A> - Class in <A HREF="./com/yahoo/ycsb/generator/package-summary.html">com.yahoo.ycsb.generator</A><DD>Generates integers randomly uniform from an interval.<DT><A HREF="./com/yahoo/ycsb/generator/UniformIntegerGenerator.html#UniformIntegerGenerator(int, int)"><B>UniformIntegerGenerator(int, int)</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/UniformIntegerGenerator.html" title="class in com.yahoo.ycsb.generator">UniformIntegerGenerator</A> -<DD>Creates a generator that will return integers uniformly randomly from the interval [lb,ub] inclusive (that is, lb and ub are possible values) -<DT><A HREF="./com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb"><B>UnknownDBException</B></A> - Exception in <A HREF="./com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A><DD>Could not create the specified DB.<DT><A HREF="./com/yahoo/ycsb/UnknownDBException.html#UnknownDBException(java.lang.String)"><B>UnknownDBException(String)</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb">UnknownDBException</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/UnknownDBException.html#UnknownDBException()"><B>UnknownDBException()</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb">UnknownDBException</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/UnknownDBException.html#UnknownDBException(java.lang.String, java.lang.Throwable)"><B>UnknownDBException(String, Throwable)</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb">UnknownDBException</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/UnknownDBException.html#UnknownDBException(java.lang.Throwable)"><B>UnknownDBException(Throwable)</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb">UnknownDBException</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/BasicDB.html#update(java.lang.String, java.lang.String, java.util.HashMap)"><B>update(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<DD>Update a record in the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient5.html#update(java.lang.String, java.lang.String, java.util.HashMap)"><B>update(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db">CassandraClient5</A> -<DD>Update a record in the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient6.html#update(java.lang.String, java.lang.String, java.util.HashMap)"><B>update(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db">CassandraClient6</A> -<DD>Update a record in the database. -<DT><A HREF="./com/yahoo/ycsb/db/CassandraClient7.html#update(java.lang.String, java.lang.String, java.util.HashMap)"><B>update(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db">CassandraClient7</A> -<DD>Update a record in the database. -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#update(java.lang.String, java.lang.String, java.util.HashMap)"><B>update(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD>Update a record in the database. -<DT><A HREF="./com/yahoo/ycsb/db/MongoDbClient.html#update(java.lang.String, java.lang.String, java.util.HashMap)"><B>update(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db">MongoDbClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/DB.html#update(java.lang.String, java.lang.String, java.util.HashMap)"><B>update(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb">DB</A> -<DD>Update a record in the database. -<DT><A HREF="./com/yahoo/ycsb/DBWrapper.html#update(java.lang.String, java.lang.String, java.util.HashMap)"><B>update(String, String, HashMap<String, String>)</B></A> - -Method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb">DBWrapper</A> -<DD>Update a record in the database. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#UPDATE_PROPORTION_PROPERTY"><B>UPDATE_PROPORTION_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The name of the property for the proportion of transactions that are updates. -<DT><A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html#UPDATE_PROPORTION_PROPERTY_DEFAULT"><B>UPDATE_PROPORTION_PROPERTY_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.workloads.<A HREF="./com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads">CoreWorkload</A> -<DD>The default proportion of transactions that are updates. -<DT><A HREF="./com/yahoo/ycsb/Client.html#usageMessage()"><B>usageMessage()</B></A> - -Static method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb">Client</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/CommandLine.html#usageMessage()"><B>usageMessage()</B></A> - -Static method in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb">CommandLine</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb"><B>Utils</B></A> - Class in <A HREF="./com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A><DD>Utility functions.<DT><A HREF="./com/yahoo/ycsb/Utils.html#Utils()"><B>Utils()</B></A> - -Constructor for class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb">Utils</A> -<DD> -</DL> -<HR> -<A NAME="_V_"><!-- --></A><H2> -<B>V</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/BasicDB.html#VERBOSE"><B>VERBOSE</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/BasicDB.html#VERBOSE_DEFAULT"><B>VERBOSE_DEFAULT</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb">BasicDB</A> -<DD> -</DL> -<HR> -<A NAME="_W_"><!-- --></A><H2> -<B>W</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb"><B>Workload</B></A> - Class in <A HREF="./com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A><DD>One experiment scenario.<DT><A HREF="./com/yahoo/ycsb/Workload.html#Workload()"><B>Workload()</B></A> - -Constructor for class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb">Workload</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/Client.html#WORKLOAD_PROPERTY"><B>WORKLOAD_PROPERTY</B></A> - -Static variable in class com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb">Client</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb"><B>WorkloadException</B></A> - Exception in <A HREF="./com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A><DD>The workload tried to do something bad.<DT><A HREF="./com/yahoo/ycsb/WorkloadException.html#WorkloadException(java.lang.String)"><B>WorkloadException(String)</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/WorkloadException.html#WorkloadException()"><B>WorkloadException()</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/WorkloadException.html#WorkloadException(java.lang.String, java.lang.Throwable)"><B>WorkloadException(String, Throwable)</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/WorkloadException.html#WorkloadException(java.lang.Throwable)"><B>WorkloadException(Throwable)</B></A> - -Constructor for exception com.yahoo.ycsb.<A HREF="./com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">WorkloadException</A> -<DD> -</DL> -<HR> -<A NAME="_Z_"><!-- --></A><H2> -<B>Z</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html#ZETAN"><B>ZETAN</B></A> - -Static variable in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ScrambledZipfianGenerator</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html#ZIPFIAN_CONSTANT"><B>ZIPFIAN_CONSTANT</B></A> - -Static variable in class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator"><B>ZipfianGenerator</B></A> - Class in <A HREF="./com/yahoo/ycsb/generator/package-summary.html">com.yahoo.ycsb.generator</A><DD>A generator of a zipfian distribution.<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html#ZipfianGenerator(long)"><B>ZipfianGenerator(long)</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<DD>Create a zipfian generator for the specified number of items. -<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html#ZipfianGenerator(long, long)"><B>ZipfianGenerator(long, long)</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<DD>Create a zipfian generator for items between min and max. -<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html#ZipfianGenerator(long, double)"><B>ZipfianGenerator(long, double)</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<DD>Create a zipfian generator for the specified number of items using the specified zipfian constant. -<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html#ZipfianGenerator(long, long, double)"><B>ZipfianGenerator(long, long, double)</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<DD>Create a zipfian generator for items between min and max (inclusive) for the specified zipfian constant. -<DT><A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html#ZipfianGenerator(long, long, double, double)"><B>ZipfianGenerator(long, long, double, double)</B></A> - -Constructor for class com.yahoo.ycsb.generator.<A HREF="./com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator">ZipfianGenerator</A> -<DD>Create a zipfian generator for items between min and max (inclusive) for the specified zipfian constant, using the precomputed value of zeta. -</DL> -<HR> -<A NAME="___"><!-- --></A><H2> -<B>_</B></H2> -<DL> -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#_columnFamily"><B>_columnFamily</B></A> - -Variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#_columnFamilyBytes"><B>_columnFamilyBytes</B></A> - -Variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#_debug"><B>_debug</B></A> - -Variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#_hTable"><B>_hTable</B></A> - -Variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -<DT><A HREF="./com/yahoo/ycsb/db/HBaseClient.html#_table"><B>_table</B></A> - -Variable in class com.yahoo.ycsb.db.<A HREF="./com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db">HBaseClient</A> -<DD> -</DL> -<HR> -<A HREF="#_A_">A</A> <A HREF="#_B_">B</A> <A HREF="#_C_">C</A> <A HREF="#_D_">D</A> <A HREF="#_E_">E</A> <A HREF="#_F_">F</A> <A HREF="#_G_">G</A> <A HREF="#_H_">H</A> <A HREF="#_I_">I</A> <A HREF="#_L_">L</A> <A HREF="#_M_">M</A> <A HREF="#_N_">N</A> <A HREF="#_O_">O</A> <A HREF="#_P_">P</A> <A HREF="#_R_">R</A> <A HREF="#_S_">S</A> <A HREF="#_T_">T</A> <A HREF="#_U_">U</A> <A HREF="#_V_">V</A> <A HREF="#_W_">W</A> <A HREF="#_Z_">Z</A> <A HREF="#___">_</A> - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="./overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="./overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="./deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="./help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="./index.html?index-all.html" target="_top"><B>FRAMES</B></A> - <A HREF="index-all.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="./allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="./allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/index.html b/doc/javadoc/index.html deleted file mode 100644 index 4d37a41ff3cd576020c519172f3b337f60c4b4d4..0000000000000000000000000000000000000000 --- a/doc/javadoc/index.html +++ /dev/null @@ -1,39 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc on Wed May 12 14:51:53 PDT 2010--> -<TITLE> -Generated Documentation (Untitled) -</TITLE> -<SCRIPT type="text/javascript"> - targetPage = "" + window.location.search; - if (targetPage != "" && targetPage != "undefined") - targetPage = targetPage.substring(1); - if (targetPage.indexOf(":") != -1) - targetPage = "undefined"; - function loadFrames() { - if (targetPage != "" && targetPage != "undefined") - top.classFrame.location = top.targetPage; - } -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> -</HEAD> -<FRAMESET cols="20%,80%" title="" onLoad="top.loadFrames()"> -<FRAMESET rows="30%,70%" title="" onLoad="top.loadFrames()"> -<FRAME src="overview-frame.html" name="packageListFrame" title="All Packages"> -<FRAME src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)"> -</FRAMESET> -<FRAME src="overview-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes"> -<NOFRAMES> -<H2> -Frame Alert</H2> - -<P> -This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. -<BR> -Link to<A HREF="overview-summary.html">Non-frame version.</A> -</NOFRAMES> -</FRAMESET> -</HTML> diff --git a/doc/javadoc/overview-frame.html b/doc/javadoc/overview-frame.html deleted file mode 100644 index 4fb6a8e96220f86bb62584473f8f08b77a1fd6d4..0000000000000000000000000000000000000000 --- a/doc/javadoc/overview-frame.html +++ /dev/null @@ -1,50 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -Overview List -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> - - -</HEAD> - -<BODY BGCOLOR="white"> - -<TABLE BORDER="0" WIDTH="100%" SUMMARY=""> -<TR> -<TH ALIGN="left" NOWRAP><FONT size="+1" CLASS="FrameTitleFont"> -<B></B></FONT></TH> -</TR> -</TABLE> - -<TABLE BORDER="0" WIDTH="100%" SUMMARY=""> -<TR> -<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="allclasses-frame.html" target="packageFrame">All Classes</A></FONT> -<P> -<FONT size="+1" CLASS="FrameHeadingFont"> -Packages</FONT> -<BR> -<FONT CLASS="FrameItemFont"><A HREF="com/yahoo/ycsb/package-frame.html" target="packageFrame">com.yahoo.ycsb</A></FONT> -<BR> -<FONT CLASS="FrameItemFont"><A HREF="com/yahoo/ycsb/db/package-frame.html" target="packageFrame">com.yahoo.ycsb.db</A></FONT> -<BR> -<FONT CLASS="FrameItemFont"><A HREF="com/yahoo/ycsb/generator/package-frame.html" target="packageFrame">com.yahoo.ycsb.generator</A></FONT> -<BR> -<FONT CLASS="FrameItemFont"><A HREF="com/yahoo/ycsb/measurements/package-frame.html" target="packageFrame">com.yahoo.ycsb.measurements</A></FONT> -<BR> -<FONT CLASS="FrameItemFont"><A HREF="com/yahoo/ycsb/workloads/package-frame.html" target="packageFrame">com.yahoo.ycsb.workloads</A></FONT> -<BR> -</TD> -</TR> -</TABLE> - -<P> - -</BODY> -</HTML> diff --git a/doc/javadoc/overview-summary.html b/doc/javadoc/overview-summary.html deleted file mode 100644 index b73bd3b31eb24d0bb13ec1e369175d5241abfab2..0000000000000000000000000000000000000000 --- a/doc/javadoc/overview-summary.html +++ /dev/null @@ -1,165 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -Overview -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Overview"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Overview</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?overview-summary.html" target="_top"><B>FRAMES</B></A> - <A HREF="overview-summary.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> - -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Packages</B></FONT></TH> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="20%"><B><A HREF="com/yahoo/ycsb/package-summary.html">com.yahoo.ycsb</A></B></TD> -<TD> </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="20%"><B><A HREF="com/yahoo/ycsb/db/package-summary.html">com.yahoo.ycsb.db</A></B></TD> -<TD> </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="20%"><B><A HREF="com/yahoo/ycsb/generator/package-summary.html">com.yahoo.ycsb.generator</A></B></TD> -<TD> </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="20%"><B><A HREF="com/yahoo/ycsb/measurements/package-summary.html">com.yahoo.ycsb.measurements</A></B></TD> -<TD> </TD> -</TR> -<TR BGCOLOR="white" CLASS="TableRowColor"> -<TD WIDTH="20%"><B><A HREF="com/yahoo/ycsb/workloads/package-summary.html">com.yahoo.ycsb.workloads</A></B></TD> -<TD> </TD> -</TR> -</TABLE> - -<P> - <HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Overview</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?overview-summary.html" target="_top"><B>FRAMES</B></A> - <A HREF="overview-summary.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/overview-tree.html b/doc/javadoc/overview-tree.html deleted file mode 100644 index 2012c90fc5f53fc8ff5c5eeac46aeaf636e406af..0000000000000000000000000000000000000000 --- a/doc/javadoc/overview-tree.html +++ /dev/null @@ -1,165 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -Class Hierarchy -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Class Hierarchy"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?overview-tree.html" target="_top"><B>FRAMES</B></A> - <A HREF="overview-tree.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<CENTER> -<H2> -Hierarchy For All Packages</H2> -</CENTER> -<DL> -<DT><B>Package Hierarchies:</B><DD><A HREF="com/yahoo/ycsb/package-tree.html">com.yahoo.ycsb</A>, <A HREF="com/yahoo/ycsb/db/package-tree.html">com.yahoo.ycsb.db</A>, <A HREF="com/yahoo/ycsb/generator/package-tree.html">com.yahoo.ycsb.generator</A>, <A HREF="com/yahoo/ycsb/measurements/package-tree.html">com.yahoo.ycsb.measurements</A>, <A HREF="com/yahoo/ycsb/workloads/package-tree.html">com.yahoo.ycsb.workloads</A></DL> -<HR> -<H2> -Class Hierarchy -</H2> -<UL> -<LI TYPE="circle">java.lang.Object<UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/Client.html" title="class in com.yahoo.ycsb"><B>Client</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/CommandLine.html" title="class in com.yahoo.ycsb"><B>CommandLine</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/DB.html" title="class in com.yahoo.ycsb"><B>DB</B></A><UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/BasicDB.html" title="class in com.yahoo.ycsb"><B>BasicDB</B></A><LI TYPE="circle">com.yahoo.ycsb.db.<A HREF="com/yahoo/ycsb/db/CassandraClient5.html" title="class in com.yahoo.ycsb.db"><B>CassandraClient5</B></A><LI TYPE="circle">com.yahoo.ycsb.db.<A HREF="com/yahoo/ycsb/db/CassandraClient6.html" title="class in com.yahoo.ycsb.db"><B>CassandraClient6</B></A><LI TYPE="circle">com.yahoo.ycsb.db.<A HREF="com/yahoo/ycsb/db/CassandraClient7.html" title="class in com.yahoo.ycsb.db"><B>CassandraClient7</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/DBWrapper.html" title="class in com.yahoo.ycsb"><B>DBWrapper</B></A><LI TYPE="circle">com.yahoo.ycsb.db.<A HREF="com/yahoo/ycsb/db/HBaseClient.html" title="class in com.yahoo.ycsb.db"><B>HBaseClient</B></A><LI TYPE="circle">com.yahoo.ycsb.db.<A HREF="com/yahoo/ycsb/db/MongoDbClient.html" title="class in com.yahoo.ycsb.db"><B>MongoDbClient</B></A></UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/DBFactory.html" title="class in com.yahoo.ycsb"><B>DBFactory</B></A><LI TYPE="circle">com.yahoo.ycsb.generator.<A HREF="com/yahoo/ycsb/generator/Generator.html" title="class in com.yahoo.ycsb.generator"><B>Generator</B></A><UL> -<LI TYPE="circle">com.yahoo.ycsb.generator.<A HREF="com/yahoo/ycsb/generator/DiscreteGenerator.html" title="class in com.yahoo.ycsb.generator"><B>DiscreteGenerator</B></A><LI TYPE="circle">com.yahoo.ycsb.generator.<A HREF="com/yahoo/ycsb/generator/IntegerGenerator.html" title="class in com.yahoo.ycsb.generator"><B>IntegerGenerator</B></A><UL> -<LI TYPE="circle">com.yahoo.ycsb.generator.<A HREF="com/yahoo/ycsb/generator/CounterGenerator.html" title="class in com.yahoo.ycsb.generator"><B>CounterGenerator</B></A><LI TYPE="circle">com.yahoo.ycsb.generator.<A HREF="com/yahoo/ycsb/generator/ScrambledZipfianGenerator.html" title="class in com.yahoo.ycsb.generator"><B>ScrambledZipfianGenerator</B></A><LI TYPE="circle">com.yahoo.ycsb.generator.<A HREF="com/yahoo/ycsb/generator/SkewedLatestGenerator.html" title="class in com.yahoo.ycsb.generator"><B>SkewedLatestGenerator</B></A><LI TYPE="circle">com.yahoo.ycsb.generator.<A HREF="com/yahoo/ycsb/generator/UniformIntegerGenerator.html" title="class in com.yahoo.ycsb.generator"><B>UniformIntegerGenerator</B></A><LI TYPE="circle">com.yahoo.ycsb.generator.<A HREF="com/yahoo/ycsb/generator/ZipfianGenerator.html" title="class in com.yahoo.ycsb.generator"><B>ZipfianGenerator</B></A></UL> -<LI TYPE="circle">com.yahoo.ycsb.generator.<A HREF="com/yahoo/ycsb/generator/UniformGenerator.html" title="class in com.yahoo.ycsb.generator"><B>UniformGenerator</B></A></UL> -<LI TYPE="circle">com.yahoo.ycsb.measurements.<A HREF="com/yahoo/ycsb/measurements/Measurements.html" title="class in com.yahoo.ycsb.measurements"><B>Measurements</B></A><LI TYPE="circle">com.yahoo.ycsb.measurements.<A HREF="com/yahoo/ycsb/measurements/OneMeasurement.html" title="class in com.yahoo.ycsb.measurements"><B>OneMeasurement</B></A><UL> -<LI TYPE="circle">com.yahoo.ycsb.measurements.<A HREF="com/yahoo/ycsb/measurements/OneMeasurementHistogram.html" title="class in com.yahoo.ycsb.measurements"><B>OneMeasurementHistogram</B></A><LI TYPE="circle">com.yahoo.ycsb.measurements.<A HREF="com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.html" title="class in com.yahoo.ycsb.measurements"><B>OneMeasurementTimeSeries</B></A></UL> -<LI TYPE="circle">java.lang.Throwable (implements java.io.Serializable) -<UL> -<LI TYPE="circle">java.lang.Exception<UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb"><B>DBException</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb"><B>UnknownDBException</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb"><B>WorkloadException</B></A></UL> -</UL> -<LI TYPE="circle">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/Utils.html" title="class in com.yahoo.ycsb"><B>Utils</B></A><LI TYPE="circle">com.yahoo.ycsb.<A HREF="com/yahoo/ycsb/Workload.html" title="class in com.yahoo.ycsb"><B>Workload</B></A><UL> -<LI TYPE="circle">com.yahoo.ycsb.workloads.<A HREF="com/yahoo/ycsb/workloads/CoreWorkload.html" title="class in com.yahoo.ycsb.workloads"><B>CoreWorkload</B></A></UL> -</UL> -</UL> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?overview-tree.html" target="_top"><B>FRAMES</B></A> - <A HREF="overview-tree.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/package-list b/doc/javadoc/package-list deleted file mode 100644 index 13443e193bc6a707ba38f222a7fe03cb8b0e608c..0000000000000000000000000000000000000000 --- a/doc/javadoc/package-list +++ /dev/null @@ -1,5 +0,0 @@ -com.yahoo.ycsb -com.yahoo.ycsb.db -com.yahoo.ycsb.generator -com.yahoo.ycsb.measurements -com.yahoo.ycsb.workloads diff --git a/doc/javadoc/resources/inherit.gif b/doc/javadoc/resources/inherit.gif deleted file mode 100644 index c814867a13deb0ca7ea2156c6ca1d5a03372af7e..0000000000000000000000000000000000000000 Binary files a/doc/javadoc/resources/inherit.gif and /dev/null differ diff --git a/doc/javadoc/serialized-form.html b/doc/javadoc/serialized-form.html deleted file mode 100644 index 3cff57be04d9176e044c773021b087804b4525d7..0000000000000000000000000000000000000000 --- a/doc/javadoc/serialized-form.html +++ /dev/null @@ -1,192 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!--NewPage--> -<HTML> -<HEAD> -<!-- Generated by javadoc (build 1.6.0_03) on Wed May 12 14:51:53 PDT 2010 --> -<TITLE> -Serialized Form -</TITLE> - -<META NAME="date" CONTENT="2010-05-12"> - -<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> - -<SCRIPT type="text/javascript"> -function windowTitle() -{ - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Serialized Form"; - } -} -</SCRIPT> -<NOSCRIPT> -</NOSCRIPT> - -</HEAD> - -<BODY BGCOLOR="white" onload="windowTitle();"> -<HR> - - -<!-- ========= START OF TOP NAVBAR ======= --> -<A NAME="navbar_top"><!-- --></A> -<A HREF="#skip-navbar_top" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_top_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?serialized-form.html" target="_top"><B>FRAMES</B></A> - <A HREF="serialized-form.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_top"></A> -<!-- ========= END OF TOP NAVBAR ========= --> - -<HR> -<CENTER> -<H1> -Serialized Form</H1> -</CENTER> -<HR SIZE="4" NOSHADE> - -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="center"><FONT SIZE="+2"> -<B>Package</B> <B>com.yahoo.ycsb</B></FONT></TH> -</TR> -</TABLE> - -<P> -<A NAME="com.yahoo.ycsb.DBException"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Class <A HREF="com/yahoo/ycsb/DBException.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.DBException</A> extends java.lang.Exception implements Serializable</B></FONT></TH> -</TR> -</TABLE> - -<P> -<B>serialVersionUID: </B>6646883591588721475L - -<P> - -<P> -<A NAME="com.yahoo.ycsb.UnknownDBException"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Class <A HREF="com/yahoo/ycsb/UnknownDBException.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.UnknownDBException</A> extends java.lang.Exception implements Serializable</B></FONT></TH> -</TR> -</TABLE> - -<P> -<B>serialVersionUID: </B>459099842269616836L - -<P> - -<P> -<A NAME="com.yahoo.ycsb.WorkloadException"><!-- --></A> -<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> -<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> -<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> -<B>Class <A HREF="com/yahoo/ycsb/WorkloadException.html" title="class in com.yahoo.ycsb">com.yahoo.ycsb.WorkloadException</A> extends java.lang.Exception implements Serializable</B></FONT></TH> -</TR> -</TABLE> - -<P> -<B>serialVersionUID: </B>8844396756042772132L - -<P> - -<P> -<HR> - - -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<A NAME="navbar_bottom"><!-- --></A> -<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> -<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> -<TR> -<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> -<A NAME="navbar_bottom_firstrow"><!-- --></A> -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> - <TR ALIGN="center" VALIGN="top"> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> - <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> - </TR> -</TABLE> -</TD> -<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> -</EM> -</TD> -</TR> - -<TR> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - PREV - NEXT</FONT></TD> -<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> - <A HREF="index.html?serialized-form.html" target="_top"><B>FRAMES</B></A> - <A HREF="serialized-form.html" target="_top"><B>NO FRAMES</B></A> - <SCRIPT type="text/javascript"> - <!-- - if(window==top) { - document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); - } - //--> -</SCRIPT> -<NOSCRIPT> - <A HREF="allclasses-noframe.html"><B>All Classes</B></A> -</NOSCRIPT> - - -</FONT></TD> -</TR> -</TABLE> -<A NAME="skip-navbar_bottom"></A> -<!-- ======== END OF BOTTOM NAVBAR ======= --> - -<HR> - -</BODY> -</HTML> diff --git a/doc/javadoc/stylesheet.css b/doc/javadoc/stylesheet.css deleted file mode 100644 index 6ea9e5161615fcf6cdb0d194d913139c26fa417a..0000000000000000000000000000000000000000 --- a/doc/javadoc/stylesheet.css +++ /dev/null @@ -1,29 +0,0 @@ -/* Javadoc style sheet */ - -/* Define colors, fonts and other style attributes here to override the defaults */ - -/* Page background color */ -body { background-color: #FFFFFF; color:#000000 } - -/* Headings */ -h1 { font-size: 145% } - -/* Table colors */ -.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ -.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ -.TableRowColor { background: #FFFFFF; color:#000000 } /* White */ - -/* Font used in left-hand frame lists */ -.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } -.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } -.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } - -/* Navigation bar fonts and colors */ -.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ -.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ -.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} -.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} - -.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} -.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} - diff --git a/dynamodb/README b/dynamodb/README.md similarity index 59% rename from dynamodb/README rename to dynamodb/README.md index 42f84e7228c72ea625372f24b0078c1e41fa5dd9..61455ed919c6a7e9c98f8abcfe6cb035877e4b09 100644 --- a/dynamodb/README +++ b/dynamodb/README.md @@ -1,22 +1,44 @@ -CONFIGURE +<!-- +Copyright (c) 2010 Yahoo! Inc., 2012 - 2015 YCSB contributors. +All rights reserved. -YCSB_HOME - YCSB home directory -DYNAMODB_HOME - Amazon DynamoDB package files +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. +--> + +# DynamoDB Binding + +http://aws.amazon.com/documentation/dynamodb/ + +## Configure + + YCSB_HOME - YCSB home directory + DYNAMODB_HOME - Amazon DynamoDB package files Please refer to https://github.com/brianfrankcooper/YCSB/wiki/Using-the-Database-Libraries for more information on setup. -BENCHMARK +# Benchmark -$YCSB_HOME/bin/ycsb load dynamodb -P workloads/workloada -P dynamodb.properties -$YCSB_HOME/bin/ycsb run dynamodb -P workloads/workloada -P dynamodb.properties + $YCSB_HOME/bin/ycsb load dynamodb -P workloads/workloada -P dynamodb.properties + $YCSB_HOME/bin/ycsb run dynamodb -P workloads/workloada -P dynamodb.properties -PROPERTIES +# Properties -$DYNAMODB_HOME/conf/dynamodb.properties -$DYNAMODB_HOME/conf/AWSCredentials.properties + $DYNAMODB_HOME/conf/dynamodb.properties + $DYNAMODB_HOME/conf/AWSCredentials.properties -FAQs +# FAQs * Why is the recommended workload distribution set to 'uniform'? This is to conform with the best practices for using DynamoDB - uniform, evenly distributed workload is the recommended pattern for scaling and @@ -27,12 +49,12 @@ http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/BestPract * How does workload size affect provisioned throughput? The default payload size requires double the provisioned throughput to execute -the workload. This translates to double the provisioned throughput cost for testing. -The default item size in YCSB are 1000 bytes plus metadata overhead, which makes the -item exceed 1024 bytes. DynamoDB charges one capacity unit per 1024 bytes for read -or writes. An item that is greater than 1024 bytes but less than or equal to 2048 bytes -would cost 2 capacity units. With the change in payload size, each request would cost -1 capacity unit as opposed to 2, saving the cost of running the benchmark. +the workload. This translates to double the provisioned throughput cost for testing. +The default item size in YCSB are 1000 bytes plus metadata overhead, which makes the +item exceed 1024 bytes. DynamoDB charges one capacity unit per 1024 bytes for read +or writes. An item that is greater than 1024 bytes but less than or equal to 2048 bytes +would cost 2 capacity units. With the change in payload size, each request would cost +1 capacity unit as opposed to 2, saving the cost of running the benchmark. For more information refer to http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/WorkingWithDDTables.html @@ -43,7 +65,7 @@ than zero, either increase the DynamoDB table provisioned throughput or reduce YCSB throughput by reducing YCSB target throughput, adjusting the number of YCSB client threads, or combination of both. -For more information please refer to +For more information please refer to https://github.com/brianfrankcooper/YCSB/blob/master/doc/tipsfaq.html When requests are throttled, latency measurements by YCSB can increase. diff --git a/dynamodb/conf/dynamodb.properties b/dynamodb/conf/dynamodb.properties index 870d3dc5f6780a000e1de483ef1dad65961cc6f8..691e20e80c60281b433d21334832478df05037dd 100644 --- a/dynamodb/conf/dynamodb.properties +++ b/dynamodb/conf/dynamodb.properties @@ -24,8 +24,50 @@ # Primarykey of table 'usertable' #dynamodb.primaryKey = <firstname> +# If you set dynamodb.primaryKeyType to HASH_AND_RANGE, you must specify the +# hash key name of your primary key here. (see documentation below for details) +#dynamodb.hashKeyName = <hashid> + ## Optional parameters +# The property "primaryKeyType" below specifies the type of primary key +# you have setup for the test table. There are two choices: +# - HASH (default) +# - HASH_AND_RANGE +# +# When testing the DB in HASH mode (which is the default), your table's +# primary key must be of the "HASH" key type, and the name of the primary key +# is specified via the dynamodb.primaryKey property. In this mode, all +# keys from YCSB are hashed across multiple hash partitions and +# performance of individual operations are good. However, query across +# multiple items is eventually consistent in this mode and relies on the +# global secondary index. +# +# +# When testing the DB in HASH_AND_RANGE mode, your table's primary key must be +# of the "HASH_AND_RANGE" key type. You need to specify the name of the +# hash key via the "dynamodb.hashKeyName" property and you also need to +# specify the name of the range key via the "dynamodb.primaryKey" property. +# In this mode, keys supplied by YCSB will be used as the range part of +# the primary key and the hash part of the primary key will have a fixed value. +# Optionally you can designate the value used in the hash part of the primary +# key via the dynamodb.hashKeyValue. +# +# The purpose of the HASH_AND_RANGE mode is to benchmark the performance +# characteristics of a single logical hash partition. This is useful because +# so far the only practical way to do strongly consistent query is to do it +# in a single hash partition (Whole table scan can be consistent but it becomes +# less practical when the table is really large). Therefore, for users who +# really want to have strongly consistent query, it's important for them to +# know the performance capabilities of a single logical hash partition so +# they can plan their application accordingly. + +#dynamodb.primaryKeyType = HASH + +#Optionally you can specify a value for the hash part of the primary key +#when testing in HASH_AND_RANG mode. +#dynamodb.hashKeyValue = <some value of your choice> + # Endpoint to connect to.For best latency, it is recommended # to choose the endpoint which is closer to the client. # Default is us-east-1 diff --git a/dynamodb/pom.xml b/dynamodb/pom.xml index 1fe96f76482733463be533154e152ec96b2465c2..acde4cb089227ae2b10c79d4d76c54023cd6d382 100644 --- a/dynamodb/pom.xml +++ b/dynamodb/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -21,18 +21,22 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> <artifactId>dynamodb-binding</artifactId> <name>DynamoDB DB Binding</name> + <properties> + <checkstyle.failOnViolation>false</checkstyle.failOnViolation> + </properties> + <dependencies> <dependency> <groupId>com.amazonaws</groupId> <artifactId>aws-java-sdk</artifactId> - <version>1.3.14</version> + <version>1.10.48</version> </dependency> <dependency> <groupId>log4j</groupId> diff --git a/dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java b/dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java index 56808b8ccfa07d8a8070e10acd4bf75cd62aec94..e529976031992435cd3b10b0263b640d8b73ba44 100644 --- a/dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java +++ b/dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java @@ -16,76 +16,93 @@ package com.yahoo.ycsb.db; -import java.io.FileInputStream; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Properties; -import java.util.Set; -import java.util.Vector; -import java.io.File; - -import org.apache.log4j.Level; -import org.apache.log4j.Logger; - -import com.amazonaws.auth.AWSCredentials; -import com.amazonaws.auth.PropertiesCredentials; -import com.amazonaws.ClientConfiguration; -import com.amazonaws.services.dynamodb.AmazonDynamoDBClient; import com.amazonaws.AmazonClientException; import com.amazonaws.AmazonServiceException; -import com.amazonaws.services.dynamodb.model.AttributeValue; -import com.amazonaws.services.dynamodb.model.AttributeValueUpdate; -import com.amazonaws.services.dynamodb.model.DeleteItemRequest; -import com.amazonaws.services.dynamodb.model.DeleteItemResult; -import com.amazonaws.services.dynamodb.model.GetItemRequest; -import com.amazonaws.services.dynamodb.model.GetItemResult; -import com.amazonaws.services.dynamodb.model.Key; -import com.amazonaws.services.dynamodb.model.PutItemRequest; -import com.amazonaws.services.dynamodb.model.PutItemResult; -import com.amazonaws.services.dynamodb.model.ScanRequest; -import com.amazonaws.services.dynamodb.model.ScanResult; -import com.amazonaws.services.dynamodb.model.UpdateItemRequest; +import com.amazonaws.ClientConfiguration; +import com.amazonaws.auth.AWSCredentials; +import com.amazonaws.auth.PropertiesCredentials; +import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient; +import com.amazonaws.services.dynamodbv2.model.AttributeValue; +import com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate; +import com.amazonaws.services.dynamodbv2.model.DeleteItemRequest; +import com.amazonaws.services.dynamodbv2.model.GetItemRequest; +import com.amazonaws.services.dynamodbv2.model.GetItemResult; +import com.amazonaws.services.dynamodbv2.model.PutItemRequest; +import com.amazonaws.services.dynamodbv2.model.ScanRequest; +import com.amazonaws.services.dynamodbv2.model.ScanResult; +import com.amazonaws.services.dynamodbv2.model.UpdateItemRequest; import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; import com.yahoo.ycsb.StringByteIterator; +import org.apache.log4j.Level; +import org.apache.log4j.Logger; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.Vector; + /** - * DynamoDB v1.3.14 client for YCSB + * DynamoDB v1.10.48 client for YCSB */ public class DynamoDBClient extends DB { - private static final int OK = 0; - private static final int SERVER_ERROR = 1; - private static final int CLIENT_ERROR = 2; + /** + * Defines the primary key type used in this particular DB instance. + * + * By default, the primary key type is "HASH". Optionally, the user can + * choose to use hash_and_range key type. See documentation in the + * DynamoDB.Properties file for more details. + */ + private enum PrimaryKeyType { + HASH, + HASH_AND_RANGE + } + private AmazonDynamoDBClient dynamoDB; private String primaryKeyName; + private PrimaryKeyType primaryKeyType = PrimaryKeyType.HASH; + + // If the user choose to use HASH_AND_RANGE as primary key type, then + // the following two variables become relevant. See documentation in the + // DynamoDB.Properties file for more details. + private String hashKeyValue; + private String hashKeyName; + private boolean debug = false; private boolean consistentRead = false; private String endpoint = "http://dynamodb.us-east-1.amazonaws.com"; private int maxConnects = 50; private static Logger logger = Logger.getLogger(DynamoDBClient.class); - public DynamoDBClient() {} + private static final Status CLIENT_ERROR = new Status("CLIENT_ERROR", + "An error occurred on the client."); + private static final String DEFAULT_HASH_KEY_VALUE = "YCSB_0"; /** * Initialize any state for this DB. Called once per DB instance; there is * one DB instance per client thread. */ + @Override public void init() throws DBException { // initialize DynamoDb driver & table. - String debug = getProperties().getProperty("dynamodb.debug",null); + String debug = getProperties().getProperty("dynamodb.debug", null); if (null != debug && "true".equalsIgnoreCase(debug)) { logger.setLevel(Level.DEBUG); } - String endpoint = getProperties().getProperty("dynamodb.endpoint",null); - String credentialsFile = getProperties().getProperty("dynamodb.awsCredentialsFile",null); - String primaryKey = getProperties().getProperty("dynamodb.primaryKey",null); - String consistentReads = getProperties().getProperty("dynamodb.consistentReads",null); - String connectMax = getProperties().getProperty("dynamodb.connectMax",null); + String endpoint = getProperties().getProperty("dynamodb.endpoint", null); + String credentialsFile = getProperties().getProperty("dynamodb.awsCredentialsFile", null); + String primaryKey = getProperties().getProperty("dynamodb.primaryKey", null); + String primaryKeyTypeString = getProperties().getProperty("dynamodb.primaryKeyType", null); + String consistentReads = getProperties().getProperty("dynamodb.consistentReads", null); + String connectMax = getProperties().getProperty("dynamodb.connectMax", null); if (null != connectMax) { this.maxConnects = Integer.parseInt(connectMax); @@ -104,11 +121,37 @@ public class DynamoDBClient extends DB { logger.error(errMsg); } + if (null != primaryKeyTypeString) { + try { + this.primaryKeyType = PrimaryKeyType.valueOf( + primaryKeyTypeString.trim().toUpperCase()); + } catch (IllegalArgumentException e) { + throw new DBException("Invalid primary key mode specified: " + + primaryKeyTypeString + ". Expecting HASH or HASH_AND_RANGE."); + } + } + + if (this.primaryKeyType == PrimaryKeyType.HASH_AND_RANGE) { + // When the primary key type is HASH_AND_RANGE, keys used by YCSB + // are range keys so we can benchmark performance of individual hash + // partitions. In this case, the user must specify the hash key's name + // and optionally can designate a value for the hash key. + + String hashKeyName = getProperties().getProperty("dynamodb.hashKeyName", null); + if (null == hashKeyName || hashKeyName.isEmpty()) { + throw new DBException("Must specify a non-empty hash key name " + + "when the primary key type is HASH_AND_RANGE."); + } + this.hashKeyName = hashKeyName; + this.hashKeyValue = getProperties().getProperty( + "dynamodb.hashKeyValue", DEFAULT_HASH_KEY_VALUE); + } + try { AWSCredentials credentials = new PropertiesCredentials(new File(credentialsFile)); ClientConfiguration cconfig = new ClientConfiguration(); cconfig.setMaxConnections(maxConnects); - dynamoDB = new AmazonDynamoDBClient(credentials,cconfig); + dynamoDB = new AmazonDynamoDBClient(credentials, cconfig); dynamoDB.setEndpoint(this.endpoint); primaryKeyName = primaryKey; logger.info("dynamodb connection created with " + this.endpoint); @@ -119,7 +162,7 @@ public class DynamoDBClient extends DB { } @Override - public int read(String table, String key, Set<String> fields, + public Status read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { logger.debug("readkey: " + key + " from table: " + table); @@ -132,22 +175,21 @@ public class DynamoDBClient extends DB { res = dynamoDB.getItem(req); }catch (AmazonServiceException ex) { logger.error(ex.getMessage()); - return SERVER_ERROR; + return Status.ERROR; }catch (AmazonClientException ex){ logger.error(ex.getMessage()); return CLIENT_ERROR; } - if (null != res.getItem()) - { + if (null != res.getItem()) { result.putAll(extractResult(res.getItem())); logger.debug("Result: " + res.toString()); } - return OK; + return Status.OK; } @Override - public int scan(String table, String startkey, int recordcount, + public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { logger.debug("scan " + recordcount + " records from key: " + startkey + " on table: " + table); /* @@ -163,7 +205,7 @@ public class DynamoDBClient extends DB { gres = dynamoDB.getItem(greq); }catch (AmazonServiceException ex) { logger.error(ex.getMessage()); - return SERVER_ERROR; + return Status.ERROR; }catch (AmazonClientException ex){ logger.error(ex.getMessage()); return CLIENT_ERROR; @@ -175,7 +217,7 @@ public class DynamoDBClient extends DB { int count = 1; // startKey is done, rest to go. - Key startKey = createPrimaryKey(startkey); + Map<String, AttributeValue> startKey = createPrimaryKey(startkey); ScanRequest req = new ScanRequest(table); req.setAttributesToGet(fields); while (count < recordcount) { @@ -187,7 +229,7 @@ public class DynamoDBClient extends DB { }catch (AmazonServiceException ex) { logger.error(ex.getMessage()); ex.printStackTrace(); - return SERVER_ERROR; + return Status.ERROR; }catch (AmazonClientException ex){ logger.error(ex.getMessage()); ex.printStackTrace(); @@ -202,11 +244,11 @@ public class DynamoDBClient extends DB { } - return OK; + return Status.OK; } @Override - public int update(String table, String key, HashMap<String, ByteIterator> values) { + public Status update(String table, String key, HashMap<String, ByteIterator> values) { logger.debug("updatekey: " + key + " from table: " + table); Map<String, AttributeValueUpdate> attributes = new HashMap<String, AttributeValueUpdate>( @@ -223,51 +265,55 @@ public class DynamoDBClient extends DB { dynamoDB.updateItem(req); }catch (AmazonServiceException ex) { logger.error(ex.getMessage()); - return SERVER_ERROR; + return Status.ERROR; }catch (AmazonClientException ex){ logger.error(ex.getMessage()); return CLIENT_ERROR; } - return OK; + return Status.OK; } @Override - public int insert(String table, String key,HashMap<String, ByteIterator> values) { + public Status insert(String table, String key, HashMap<String, ByteIterator> values) { logger.debug("insertkey: " + primaryKeyName + "-" + key + " from table: " + table); Map<String, AttributeValue> attributes = createAttributes(values); // adding primary key attributes.put(primaryKeyName, new AttributeValue(key)); + if (primaryKeyType == PrimaryKeyType.HASH_AND_RANGE) { + // If the primary key type is HASH_AND_RANGE, then what has been put + // into the attributes map above is the range key part of the primary + // key, we still need to put in the hash key part here. + attributes.put(hashKeyName, new AttributeValue(hashKeyValue)); + } PutItemRequest putItemRequest = new PutItemRequest(table, attributes); - PutItemResult res = null; try { - res = dynamoDB.putItem(putItemRequest); + dynamoDB.putItem(putItemRequest); }catch (AmazonServiceException ex) { logger.error(ex.getMessage()); - return SERVER_ERROR; + return Status.ERROR; }catch (AmazonClientException ex){ logger.error(ex.getMessage()); return CLIENT_ERROR; } - return OK; + return Status.OK; } @Override - public int delete(String table, String key) { + public Status delete(String table, String key) { logger.debug("deletekey: " + key + " from table: " + table); DeleteItemRequest req = new DeleteItemRequest(table, createPrimaryKey(key)); - DeleteItemResult res = null; try { - res = dynamoDB.deleteItem(req); + dynamoDB.deleteItem(req); }catch (AmazonServiceException ex) { logger.error(ex.getMessage()); - return SERVER_ERROR; + return Status.ERROR; }catch (AmazonClientException ex){ logger.error(ex.getMessage()); return CLIENT_ERROR; } - return OK; + return Status.OK; } private static Map<String, AttributeValue> createAttributes( @@ -287,14 +333,23 @@ public class DynamoDBClient extends DB { HashMap<String, ByteIterator> rItems = new HashMap<String, ByteIterator>(item.size()); for (Entry<String, AttributeValue> attr : item.entrySet()) { - logger.debug(String.format("Result- key: %s, value: %s", attr.getKey(), attr.getValue()) ); + logger.debug(String.format("Result- key: %s, value: %s", attr.getKey(), attr.getValue())); rItems.put(attr.getKey(), new StringByteIterator(attr.getValue().getS())); } return rItems; } - private static Key createPrimaryKey(String key) { - Key k = new Key().withHashKeyElement(new AttributeValue().withS(key)); + private Map<String, AttributeValue> createPrimaryKey(String key) { + Map<String, AttributeValue> k = new HashMap<String, AttributeValue>(); + if (primaryKeyType == PrimaryKeyType.HASH) { + k.put(primaryKeyName, new AttributeValue().withS(key)); + } else if (primaryKeyType == PrimaryKeyType.HASH_AND_RANGE) { + k.put(hashKeyName, new AttributeValue().withS(hashKeyValue)); + k.put(primaryKeyName, new AttributeValue().withS(key)); + } else { + throw new RuntimeException("Assertion Error: impossible primary key" + + " type"); + } return k; } } diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 32c6d2b27d59384be47ded52a3071041b99a6554..92bcdf355315222e6b7a1f24dac9f3c0c8dd666b 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -80,3 +80,11 @@ otherwise you will run out of memory. If you wish to change the default index name you can set the following property: es.index.key=my_index_key + +### Troubleshoot +If you encounter error messages such as : +"Primary shard is not active or isn't assigned is a known node." + +Try removing /tmp/esdata/ folder. + rm -rf /tmp/esdata + diff --git a/elasticsearch/pom.xml b/elasticsearch/pom.xml index 019d58704b50b5c4be341443b28491e6b1e97f5a..49e3d96e21a66678f3ed167f57d0bd403a67e9da 100644 --- a/elasticsearch/pom.xml +++ b/elasticsearch/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> @@ -29,16 +29,16 @@ LICENSE file. <name>ElasticSearch Binding</name> <packaging>jar</packaging> <properties> - <elasticsearch-version>0.19.8</elasticsearch-version> + <elasticsearch-version>2.1.1</elasticsearch-version> </properties> - <repositories> - <repository> - <id>sonatype-nexus-snapshots</id> - <name>Sonatype releases</name> - <url>https://oss.sonatype.org/content/repositories/releases</url> - </repository> - </repositories> <dependencies> + <dependency> + <!-- jna is supported in ES and will be used when provided + otherwise a fallback is used --> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>4.1.0</version> + </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> <artifactId>core</artifactId> diff --git a/elasticsearch/src/main/java/com/yahoo/ycsb/db/ElasticSearchClient.java b/elasticsearch/src/main/java/com/yahoo/ycsb/db/ElasticSearchClient.java index c86baf7f3dba1402356fb7addad297f302785306..4e88c19bf61f8acca4727bef096729e5f7b171fe 100644 --- a/elasticsearch/src/main/java/com/yahoo/ycsb/db/ElasticSearchClient.java +++ b/elasticsearch/src/main/java/com/yahoo/ycsb/db/ElasticSearchClient.java @@ -17,297 +17,346 @@ package com.yahoo.ycsb.db; +import static org.elasticsearch.common.settings.Settings.Builder; +import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.elasticsearch.index.query.QueryBuilders.rangeQuery; +import static org.elasticsearch.node.NodeBuilder.nodeBuilder; + + import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; import com.yahoo.ycsb.StringByteIterator; -import java.util.HashMap; -import java.util.Map.Entry; -import java.util.Properties; -import java.util.Set; -import java.util.Vector; + +import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest; import org.elasticsearch.action.get.GetResponse; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.client.Client; import org.elasticsearch.client.Requests; -import static org.elasticsearch.common.settings.ImmutableSettings.*; - import org.elasticsearch.client.transport.TransportClient; -import org.elasticsearch.common.settings.ImmutableSettings.Builder; +import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.InetSocketTransportAddress; import org.elasticsearch.common.xcontent.XContentBuilder; -import static org.elasticsearch.common.xcontent.XContentFactory.*; -import static org.elasticsearch.index.query.FilterBuilders.*; -import static org.elasticsearch.index.query.QueryBuilders.*; -import org.elasticsearch.index.query.RangeFilterBuilder; +import org.elasticsearch.index.query.RangeQueryBuilder; import org.elasticsearch.node.Node; -import static org.elasticsearch.node.NodeBuilder.*; import org.elasticsearch.search.SearchHit; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.HashMap; +import java.util.Map.Entry; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; + /** * ElasticSearch client for YCSB framework. * - * <p>Default properties to set:</p> <ul> <li>es.cluster.name = es.ycsb.cluster - * <li>es.client = true <li>es.index.key = es.ycsb</ul> + * <p> + * Default properties to set: + * </p> + * <ul> + * <li>es.cluster.name = es.ycsb.cluster + * <li>es.client = true + * <li>es.index.key = es.ycsb + * </ul> * * @author Sharmarke Aden * */ public class ElasticSearchClient extends DB { - public static final String DEFAULT_CLUSTER_NAME = "es.ycsb.cluster"; - public static final String DEFAULT_INDEX_KEY = "es.ycsb"; - public static final String DEFAULT_REMOTE_HOST = "localhost:9300"; - private Node node; - private Client client; - private String indexKey; - - private Boolean remoteMode; + public static final String DEFAULT_CLUSTER_NAME = "es.ycsb.cluster"; + public static final String DEFAULT_INDEX_KEY = "es.ycsb"; + public static final String DEFAULT_REMOTE_HOST = "localhost:9300"; + private Node node; + private Client client; + private String indexKey; + private Boolean remoteMode; - /** - * Initialize any state for this DB. Called once per DB instance; there is - * one DB instance per client thread. - */ - @Override - public void init() throws DBException { - // initialize OrientDB driver - Properties props = getProperties(); - this.indexKey = props.getProperty("es.index.key", DEFAULT_INDEX_KEY); - String clusterName = props.getProperty("cluster.name", DEFAULT_CLUSTER_NAME); - //Check if transport client needs to be used (To connect to multiple elasticsearch nodes) - remoteMode = Boolean.parseBoolean(props.getProperty("elasticsearch.remote", "false")); - Boolean newdb = Boolean.parseBoolean(props.getProperty("elasticsearch.newdb", "false")); - Builder settings = settingsBuilder() - .put("node.local", "true") - .put("path.data", System.getProperty("java.io.tmpdir") + "/esdata") - .put("discovery.zen.ping.multicast.enabled", "false") - .put("index.mapping._id.indexed", "true") - .put("index.gateway.type", "none") - .put("gateway.type", "none") - .put("index.number_of_shards", "1") - .put("index.number_of_replicas", "0"); + /** + * Initialize any state for this DB. Called once per DB instance; there is one + * DB instance per client thread. + */ + @Override + public void init() throws DBException { + Properties props = getProperties(); + this.indexKey = props.getProperty("es.index.key", DEFAULT_INDEX_KEY); + String clusterName = + props.getProperty("cluster.name", DEFAULT_CLUSTER_NAME); + // Check if transport client needs to be used (To connect to multiple + // elasticsearch nodes) + remoteMode = Boolean + .parseBoolean(props.getProperty("elasticsearch.remote", "false")); + Boolean newdb = + Boolean.parseBoolean(props.getProperty("elasticsearch.newdb", "false")); + Builder settings = Settings.settingsBuilder() + .put("node.local", "true") + .put("path.data", System.getProperty("java.io.tmpdir") + "/esdata") + .put("discovery.zen.ping.multicast.enabled", "false") + .put("index.mapping._id.indexed", "true") + .put("index.gateway.type", "none") + .put("index.number_of_shards", "1") + .put("index.number_of_replicas", "0") + .put("path.home", System.getProperty("java.io.tmpdir")); - - //if properties file contains elasticsearch user defined properties - //add it to the settings file (will overwrite the defaults). - settings.put(props); - System.out.println("ElasticSearch starting node = " + settings.get("cluster.name")); - System.out.println("ElasticSearch node data path = " + settings.get("path.data")); - System.out.println("ElasticSearch Remote Mode = " +remoteMode); - //Remote mode support for connecting to remote elasticsearch cluster - if(remoteMode) { - settings.put("client.transport.sniff", true) - .put("client.transport.ignore_cluster_name", false) - .put("client.transport.ping_timeout", "30s") - .put("client.transport.nodes_sampler_interval", "30s"); - //Default it to localhost:9300 - String nodeList[] = props.getProperty("elasticsearch.hosts.list", DEFAULT_REMOTE_HOST).split(","); - System.out.println("ElasticSearch Remote Hosts = " +props.getProperty("elasticsearch.hosts.list", DEFAULT_REMOTE_HOST)); - TransportClient tClient = new TransportClient(settings); - for(String h : nodeList) { - String node[] = h.split(":"); - tClient.addTransportAddress(new InetSocketTransportAddress(node[0], Integer.parseInt(node[1]))); - } - client = tClient; - } else { //Start node only if transport client mode is disabled - node = nodeBuilder().clusterName(clusterName).settings(settings).node(); - node.start(); - client = node.client(); + // if properties file contains elasticsearch user defined properties + // add it to the settings file (will overwrite the defaults). + settings.put(props); + System.out.println( + "ElasticSearch starting node = " + settings.get("cluster.name")); + System.out + .println("ElasticSearch node data path = " + settings.get("path.data")); + System.out.println("ElasticSearch Remote Mode = " + remoteMode); + // Remote mode support for connecting to remote elasticsearch cluster + if (remoteMode) { + settings.put("client.transport.sniff", true) + .put("client.transport.ignore_cluster_name", false) + .put("client.transport.ping_timeout", "30s") + .put("client.transport.nodes_sampler_interval", "30s"); + // Default it to localhost:9300 + String[] nodeList = + props.getProperty("elasticsearch.hosts.list", DEFAULT_REMOTE_HOST) + .split(","); + System.out.println("ElasticSearch Remote Hosts = " + + props.getProperty("elasticsearch.hosts.list", DEFAULT_REMOTE_HOST)); + TransportClient tClient = TransportClient.builder() + .settings(settings).build(); + for (String h : nodeList) { + String[] nodes = h.split(":"); + try { + tClient.addTransportAddress(new InetSocketTransportAddress( + InetAddress.getByName(nodes[0]), + Integer.parseInt(nodes[1]) + )); + } catch (NumberFormatException e) { + throw new IllegalArgumentException("Unable to parse port number.", e); + } catch (UnknownHostException e) { + throw new IllegalArgumentException("Unable to Identify host.", e); } + } + client = tClient; + } else { // Start node only if transport client mode is disabled + node = nodeBuilder().clusterName(clusterName).settings(settings).node(); + node.start(); + client = node.client(); + } - - if (newdb) { - client.admin().indices().prepareDelete(indexKey).execute().actionGet(); - client.admin().indices().prepareCreate(indexKey).execute().actionGet(); - } else { - boolean exists = client.admin().indices().exists(Requests.indicesExistsRequest(indexKey)).actionGet().isExists(); - if (!exists) { - client.admin().indices().prepareCreate(indexKey).execute().actionGet(); - } - } + //wait for shards to be ready + client.admin().cluster() + .health(new ClusterHealthRequest("lists").waitForActiveShards(1)) + .actionGet(); + if (newdb) { + client.admin().indices().prepareDelete(indexKey).execute().actionGet(); + client.admin().indices().prepareCreate(indexKey).execute().actionGet(); + } else { + boolean exists = client.admin().indices() + .exists(Requests.indicesExistsRequest(indexKey)).actionGet() + .isExists(); + if (!exists) { + client.admin().indices().prepareCreate(indexKey).execute().actionGet(); + } } + } - @Override - public void cleanup() throws DBException { - if(!remoteMode) { - if (!node.isClosed()) { - client.close(); - node.stop(); - node.close(); - } - } else { - client.close(); - } + @Override + public void cleanup() throws DBException { + if (!remoteMode) { + if (!node.isClosed()) { + client.close(); + node.close(); + } + } else { + client.close(); } + } - /** - * Insert a record in the database. Any field/value pairs in the specified - * values HashMap will be written into the record with the specified record - * key. - * - * @param table The name of the table - * @param key The record key of the record to insert. - * @param values A HashMap of field/value pairs to insert in the record - * @return Zero on success, a non-zero error code on error. See this class's - * description for a discussion of error codes. - */ - @Override - public int insert(String table, String key, HashMap<String, ByteIterator> values) { - try { - final XContentBuilder doc = jsonBuilder().startObject(); + /** + * Insert a record in the database. Any field/value pairs in the specified + * values HashMap will be written into the record with the specified record + * key. + * + * @param table + * The name of the table + * @param key + * The record key of the record to insert. + * @param values + * A HashMap of field/value pairs to insert in the record + * @return Zero on success, a non-zero error code on error. See this class's + * description for a discussion of error codes. + */ + @Override + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + try { + final XContentBuilder doc = jsonBuilder().startObject(); - for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { - doc.field(entry.getKey(), entry.getValue()); - } + for (Entry<String, String> entry : StringByteIterator.getStringMap(values) + .entrySet()) { + doc.field(entry.getKey(), entry.getValue()); + } - doc.endObject(); + doc.endObject(); - client.prepareIndex(indexKey, table, key) - .setSource(doc) - .execute() - .actionGet(); + client.prepareIndex(indexKey, table, key).setSource(doc).execute() + .actionGet(); - return 0; - } catch (Exception e) { - e.printStackTrace(); - } - return 1; + return Status.OK; + } catch (Exception e) { + e.printStackTrace(); } + return Status.ERROR; + } - /** - * Delete a record from the database. - * - * @param table The name of the table - * @param key The record key of the record to delete. - * @return Zero on success, a non-zero error code on error. See this class's - * description for a discussion of error codes. - */ - @Override - public int delete(String table, String key) { - try { - client.prepareDelete(indexKey, table, key) - .execute() - .actionGet(); - return 0; - } catch (Exception e) { - e.printStackTrace(); - } - return 1; + /** + * Delete a record from the database. + * + * @param table + * The name of the table + * @param key + * The record key of the record to delete. + * @return Zero on success, a non-zero error code on error. See this class's + * description for a discussion of error codes. + */ + @Override + public Status delete(String table, String key) { + try { + client.prepareDelete(indexKey, table, key).execute().actionGet(); + return Status.OK; + } catch (Exception e) { + e.printStackTrace(); } + return Status.ERROR; + } - /** - * Read a record from the database. Each field/value pair from the result - * will be stored in a HashMap. - * - * @param table The name of the table - * @param key The record key of the record to read. - * @param fields The list of fields to read, or null for all of them - * @param result A HashMap of field/value pairs for the result - * @return Zero on success, a non-zero error code on error or "not found". - */ - @Override - public int read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { - try { - final GetResponse response = client.prepareGet(indexKey, table, key) - .execute() - .actionGet(); + /** + * Read a record from the database. Each field/value pair from the result will + * be stored in a HashMap. + * + * @param table + * The name of the table + * @param key + * The record key of the record to read. + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A HashMap of field/value pairs for the result + * @return Zero on success, a non-zero error code on error or "not found". + */ + @Override + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + try { + final GetResponse response = + client.prepareGet(indexKey, table, key).execute().actionGet(); - if (response.isExists()) { - if (fields != null) { - for (String field : fields) { - result.put(field, new StringByteIterator((String) response.getSource().get(field))); - } - } else { - for (String field : response.getSource().keySet()) { - result.put(field, new StringByteIterator((String) response.getSource().get(field))); - } - } - return 0; - } - } catch (Exception e) { - e.printStackTrace(); + if (response.isExists()) { + if (fields != null) { + for (String field : fields) { + result.put(field, new StringByteIterator( + (String) response.getSource().get(field))); + } + } else { + for (String field : response.getSource().keySet()) { + result.put(field, new StringByteIterator( + (String) response.getSource().get(field))); + } } - return 1; + return Status.OK; + } + } catch (Exception e) { + e.printStackTrace(); } + return Status.ERROR; + } - /** - * Update a record in the database. Any field/value pairs in the specified - * values HashMap will be written into the record with the specified record - * key, overwriting any existing values with the same field name. - * - * @param table The name of the table - * @param key The record key of the record to write. - * @param values A HashMap of field/value pairs to update in the record - * @return Zero on success, a non-zero error code on error. See this class's - * description for a discussion of error codes. - */ - @Override - public int update(String table, String key, HashMap<String, ByteIterator> values) { - try { - final GetResponse response = client.prepareGet(indexKey, table, key) - .execute() - .actionGet(); + /** + * Update a record in the database. Any field/value pairs in the specified + * values HashMap will be written into the record with the specified record + * key, overwriting any existing values with the same field name. + * + * @param table + * The name of the table + * @param key + * The record key of the record to write. + * @param values + * A HashMap of field/value pairs to update in the record + * @return Zero on success, a non-zero error code on error. See this class's + * description for a discussion of error codes. + */ + @Override + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { + try { + final GetResponse response = + client.prepareGet(indexKey, table, key).execute().actionGet(); - if (response.isExists()) { - for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { - response.getSource().put(entry.getKey(), entry.getValue()); - } + if (response.isExists()) { + for (Entry<String, String> entry : StringByteIterator + .getStringMap(values).entrySet()) { + response.getSource().put(entry.getKey(), entry.getValue()); + } - client.prepareIndex(indexKey, table, key) - .setSource(response.getSource()) - .execute() - .actionGet(); + client.prepareIndex(indexKey, table, key) + .setSource(response.getSource()).execute().actionGet(); - return 0; - } + return Status.OK; + } - } catch (Exception e) { - e.printStackTrace(); - } - return 1; + } catch (Exception e) { + e.printStackTrace(); } + return Status.ERROR; + } - /** - * Perform a range scan for a set of records in the database. Each - * field/value pair from the result will be stored in a HashMap. - * - * @param table The name of the table - * @param startkey The record key of the first record to read. - * @param recordcount The number of records to read - * @param fields The list of fields to read, or null for all of them - * @param result A Vector of HashMaps, where each HashMap is a set - * field/value pairs for one record - * @return Zero on success, a non-zero error code on error. See this class's - * description for a discussion of error codes. - */ - @Override - public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { - try { - final RangeFilterBuilder filter = rangeFilter("_id").gte(startkey); - final SearchResponse response = client.prepareSearch(indexKey) - .setTypes(table) - .setQuery(matchAllQuery()) - .setFilter(filter) - .setSize(recordcount) - .execute() - .actionGet(); + /** + * Perform a range scan for a set of records in the database. Each field/value + * pair from the result will be stored in a HashMap. + * + * @param table + * The name of the table + * @param startkey + * The record key of the first record to read. + * @param recordcount + * The number of records to read + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A Vector of HashMaps, where each HashMap is a set field/value + * pairs for one record + * @return Zero on success, a non-zero error code on error. See this class's + * description for a discussion of error codes. + */ + @Override + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + try { + final RangeQueryBuilder rangeQuery = rangeQuery("_id").gte(startkey); + final SearchResponse response = client.prepareSearch(indexKey) + .setTypes(table) + .setQuery(rangeQuery) + .setSize(recordcount) + .execute() + .actionGet(); - HashMap<String, ByteIterator> entry; + HashMap<String, ByteIterator> entry; - for (SearchHit hit : response.getHits()) { - entry = new HashMap<String, ByteIterator>(fields.size()); + for (SearchHit hit : response.getHits()) { + entry = new HashMap<String, ByteIterator>(fields.size()); - for (String field : fields) { - entry.put(field, new StringByteIterator((String) hit.getSource().get(field))); - } + for (String field : fields) { + entry.put(field, + new StringByteIterator((String) hit.getSource().get(field))); + } - result.add(entry); - } + result.add(entry); + } - return 0; - } catch (Exception e) { - e.printStackTrace(); - } - return 1; + return Status.OK; + } catch (Exception e) { + e.printStackTrace(); } + return Status.ERROR; + } } diff --git a/elasticsearch/src/main/java/com/yahoo/ycsb/db/package-info.java b/elasticsearch/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..5b831713b253d01a0c1ffc1b844a09b63a5e389a --- /dev/null +++ b/elasticsearch/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2014, Yahoo!, Inc. 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. + */ + +/** + * The YCSB binding for + * <a href="https://www.elastic.co/products/elasticsearch">Elasticsearch</a>. + */ +package com.yahoo.ycsb.db; + diff --git a/elasticsearch/src/test/java/com/yahoo/ycsb/db/ElasticSearchClientTest.java b/elasticsearch/src/test/java/com/yahoo/ycsb/db/ElasticSearchClientTest.java index 72177f494c3f21ad57706d470fa49d6629f2f0db..cc559c7f39d9df27972098efeec7dfefab9fbe08 100644 --- a/elasticsearch/src/test/java/com/yahoo/ycsb/db/ElasticSearchClientTest.java +++ b/elasticsearch/src/test/java/com/yahoo/ycsb/db/ElasticSearchClientTest.java @@ -21,19 +21,23 @@ */ package com.yahoo.ycsb.db; +import static org.testng.AssertJUnit.assertEquals; + import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; import com.yahoo.ycsb.StringByteIterator; -import java.util.HashMap; -import java.util.Set; -import java.util.Vector; -import static org.testng.AssertJUnit.*; + import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; +import java.util.HashMap; +import java.util.Set; +import java.util.Vector; + /** * * @author saden @@ -82,9 +86,8 @@ public class ElasticSearchClientTest { @Test public void testInsert() { System.out.println("insert"); - int expResult = 0; - int result = instance.insert(MOCK_TABLE, MOCK_KEY0, MOCK_DATA); - assertEquals(expResult, result); + Status result = instance.insert(MOCK_TABLE, MOCK_KEY0, MOCK_DATA); + assertEquals(Status.OK, result); } /** @@ -93,9 +96,8 @@ public class ElasticSearchClientTest { @Test public void testDelete() { System.out.println("delete"); - int expResult = 0; - int result = instance.delete(MOCK_TABLE, MOCK_KEY1); - assertEquals(expResult, result); + Status result = instance.delete(MOCK_TABLE, MOCK_KEY1); + assertEquals(Status.OK, result); } /** @@ -106,9 +108,8 @@ public class ElasticSearchClientTest { System.out.println("read"); Set<String> fields = MOCK_DATA.keySet(); HashMap<String, ByteIterator> resultParam = new HashMap<String, ByteIterator>(10); - int expResult = 0; - int result = instance.read(MOCK_TABLE, MOCK_KEY1, fields, resultParam); - assertEquals(expResult, result); + Status result = instance.read(MOCK_TABLE, MOCK_KEY1, fields, resultParam); + assertEquals(Status.OK, result); } /** @@ -124,9 +125,8 @@ public class ElasticSearchClientTest { newValues.put("field" + i, new StringByteIterator("newvalue" + i)); } - int expResult = 0; - int result = instance.update(MOCK_TABLE, MOCK_KEY1, newValues); - assertEquals(expResult, result); + Status result = instance.update(MOCK_TABLE, MOCK_KEY1, newValues); + assertEquals(Status.OK, result); //validate that the values changed HashMap<String, ByteIterator> resultParam = new HashMap<String, ByteIterator>(10); @@ -147,8 +147,7 @@ public class ElasticSearchClientTest { int recordcount = 10; Set<String> fields = MOCK_DATA.keySet(); Vector<HashMap<String, ByteIterator>> resultParam = new Vector<HashMap<String, ByteIterator>>(10); - int expResult = 0; - int result = instance.scan(MOCK_TABLE, MOCK_KEY1, recordcount, fields, resultParam); - assertEquals(expResult, result); + Status result = instance.scan(MOCK_TABLE, MOCK_KEY1, recordcount, fields, resultParam); + assertEquals(Status.OK, result); } } diff --git a/geode/pom.xml b/geode/pom.xml index dd463b155d9d3a46aa56bbe0402619992361faec..5ec92eefd09ffa34bedcc65b6a22de077cb57898 100644 --- a/geode/pom.xml +++ b/geode/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> @@ -29,6 +29,10 @@ LICENSE file. <name>Geode DB Binding</name> <packaging>jar</packaging> + <properties> + <checkstyle.failOnViolation>false</checkstyle.failOnViolation> + </properties> + <dependencies> <dependency> <groupId>org.apache.geode</groupId> diff --git a/geode/src/main/java/com/yahoo/ycsb/db/GeodeClient.java b/geode/src/main/java/com/yahoo/ycsb/db/GeodeClient.java index 9fb8b63b096a6f81b187a7a6be3790d7068dee31..5a36bef0d95633a3d14f9eb66ea4ff2de56669c7 100644 --- a/geode/src/main/java/com/yahoo/ycsb/db/GeodeClient.java +++ b/geode/src/main/java/com/yahoo/ycsb/db/GeodeClient.java @@ -17,12 +17,6 @@ package com.yahoo.ycsb.db; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.Vector; - import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.cache.CacheFactory; import com.gemstone.gemfire.cache.GemFireCache; @@ -39,7 +33,13 @@ import com.yahoo.ycsb.ByteArrayByteIterator; import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; -import com.yahoo.ycsb.StringByteIterator; +import com.yahoo.ycsb.Status; + +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; /** * Apache Geode (incubating) client for the YCSB benchmark.<br /> @@ -66,12 +66,6 @@ import com.yahoo.ycsb.StringByteIterator; */ public class GeodeClient extends DB { - /** Return code when operation succeeded */ - private static final int SUCCESS = 0; - - /** Return code when operation did not succeed */ - private static final int ERROR = -1; - /** property name of the port where Geode server is listening for connections */ private static final String SERVERPORT_PROPERTY_NAME = "geode.serverport"; @@ -143,54 +137,54 @@ public class GeodeClient extends DB { } @Override - public int read(String table, String key, Set<String> fields, + public Status read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { Region<String, Map<String, byte[]>> r = getRegion(table); Map<String, byte[]> val = r.get(key); if (val != null) { if (fields == null) { - for (String k : val.keySet()) { - result.put(k, new ByteArrayByteIterator(val.get(k))); + for (Map.Entry<String, byte[]> entry : val.entrySet()) { + result.put(entry.getKey(), new ByteArrayByteIterator(entry.getValue())); } } else { for (String field : fields) { result.put(field, new ByteArrayByteIterator(val.get(field))); } } - return SUCCESS; + return Status.OK; } - return ERROR; + return Status.ERROR; } @Override - public int scan(String table, String startkey, int recordcount, + public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { // Geode does not support scan - return ERROR; + return Status.ERROR; } @Override - public int update(String table, String key, HashMap<String, ByteIterator> values) { + public Status update(String table, String key, HashMap<String, ByteIterator> values) { getRegion(table).put(key, convertToBytearrayMap(values)); - return 0; + return Status.OK; } @Override - public int insert(String table, String key, HashMap<String, ByteIterator> values) { + public Status insert(String table, String key, HashMap<String, ByteIterator> values) { getRegion(table).put(key, convertToBytearrayMap(values)); - return 0; + return Status.OK; } @Override - public int delete(String table, String key) { + public Status delete(String table, String key) { getRegion(table).destroy(key); - return 0; + return Status.OK; } private Map<String, byte[]> convertToBytearrayMap(Map<String,ByteIterator> values) { Map<String, byte[]> retVal = new HashMap<String, byte[]>(); - for (String key : values.keySet()) { - retVal.put(key, values.get(key).toArray()); + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { + retVal.put(entry.getKey(), entry.getValue().toArray()); } return retVal; } diff --git a/googledatastore/README.md b/googledatastore/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a6755a6522ee100c5ab1a3c3ebad088a2ba31d7b --- /dev/null +++ b/googledatastore/README.md @@ -0,0 +1,91 @@ +<!-- +Copyright (c) 2015 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. +--> + +# Google Cloud Datastore Binding + +https://cloud.google.com/datastore/docs/concepts/overview?hl=en + +## Configure + + YCSB_HOME - YCSB home directory + DATASTORE_HOME - Google Cloud Datastore YCSB client package files + +Please refer to https://github.com/brianfrankcooper/YCSB/wiki/Using-the-Database-Libraries +for more information on setup. + +# Benchmark + + $YCSB_HOME/bin/ycsb load googledatastore -P workloads/workloada -P googledatastore.properties + $YCSB_HOME/bin/ycsb run googledatastore -P workloads/workloada -P googledatastore.properties + +# Properties + + $DATASTORE_HOME/conf/googledatastore.properties + +# Details + +A. Configuration and setup: + +See this link for instructions about setting up Google Cloud Datastore and +authentication: + +https://cloud.google.com/datastore/docs/getstarted/start_java/ + +After you setup your environment, you will have 3 pieces of information ready: +- datasetId, +- service account email, and +- a private key file in P12 format. + +These will be configured via corresponding properties in the googledatastore.properties file. + +B. EntityGroupingMode + +In Google Datastore, Entity Group is the unit in which the user can +perform strongly consistent query on multiple items; Meanwhile, Entity group +also has certain limitations in performance, especially with write QPS. + +We support two modes here: + +1. [default] One entity per group (ONE_ENTITY_PER_GROUP) + +In this mode, every entity is a "root" entity and sits in one group, +and every entity group has only one entity. Write QPS is high in this +mode (and there is no documented limitation on this). But query across +multiple entities are eventually consistent. + +When this mode is set, every entity is created with no ancestor key (meaning +the entity itself is the "root" entity). + +2. Multiple entities per group (MULTI_ENTITY_PER_GROUP) + +In this mode, all entities in one benchmark run are placed under one +ancestor (root) node therefore inside one entity group. Query/scan +performed on these entities will be strongly consistent but write QPS +will be subject to documented limitation (current is at 1 QPS). + +Because of the write QPS limit, it's highly recommended that you rate +limit your benchmark's test rate to avoid excessive errors. + +The goal of this MULTI_ENTITY_PER_GROUP mode is to allow user to +benchmark and understand performance characteristics of a single entity +group of the Google Datastore. + +While in this mode, one can optionally specify a root key name. If not +specified, a default name will be used. + + diff --git a/googledatastore/conf/googledatastore.properties b/googledatastore/conf/googledatastore.properties new file mode 100644 index 0000000000000000000000000000000000000000..ac95b570c4ec4f469d6d6ceda0c6c13b3bdd9d29 --- /dev/null +++ b/googledatastore/conf/googledatastore.properties @@ -0,0 +1,56 @@ +# Copyright (c) 2015 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. + +# +# Sample property file for Google Cloud Datastore DB client + +## Mandatory parameters +# +# Your credentials to Google datastore. See README.md for details. +# +# googledatastore.datasetId=<string id of your dataset> +# googledatastore.privateKeyFile=<full path to your private key file> +# googledatastore.serviceAccountEmail=<Your service account email> + +# Google Cloud Datastore's read and update APIs do not support +# reading or updating a select subset of properties for an entity. +# (as of version v1beta2-rev1-3.0.2) +# Therefore, it's recommended that you set writeallfields and readallfields +# to true to get stable and comparable performance numbers. +writeallfields = true +readallfields = true + +## Optional parameters +# +# Decides the consistency level of read requests. Acceptable values are: +# EVENTUAL, STRONG (default is STRONG) +# +# googledatastore.readConsistency=STRONG + +# Decides how we group entities into entity groups. +# (See the details section in README.md for documentation) +# +# googledatastore.entityGroupingMode=ONE_ENTITY_PER_GROUP + +# If you set the googledatastore.entityGroupingMode property to +# MULTI_ENTITY_PER_GROUP, you can optionally specify the name of the root entity +# +# googledatastore.rootEntityName="YCSB_ROOT_ENTITY" + +# Strongly recommended to set to uniform. +# requestdistribution = uniform + +# Enable/disable debug message, default is false. +# googledatastore.debug = false \ No newline at end of file diff --git a/googledatastore/pom.xml b/googledatastore/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..4618a6058afda617743ccd64426f046a296b4522 --- /dev/null +++ b/googledatastore/pom.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (c) 2015-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. +--> + +<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.7.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> + </parent> + + <artifactId>googledatastore-binding</artifactId> + <name>Google Cloud Datastore Binding</name> + <url>https://github.com/GoogleCloudPlatform/google-cloud-datastore</url> + + <dependencies> + <dependency> + <groupId>com.google.apis</groupId> + <artifactId>google-api-services-datastore-protobuf</artifactId> + <version>v1beta2-rev1-3.0.2</version> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.17</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> +</project> diff --git a/googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java b/googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java new file mode 100644 index 0000000000000000000000000000000000000000..12fc0fac96ab0b442d4e1710160ab0fadb2d8842 --- /dev/null +++ b/googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java @@ -0,0 +1,336 @@ +/* + * Copyright 2015 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. + */ + +package com.yahoo.ycsb.db; + +import com.google.api.client.auth.oauth2.Credential; +import com.google.api.services.datastore.DatastoreV1.*; +import com.google.api.services.datastore.DatastoreV1.CommitRequest.Mode; +import com.google.api.services.datastore.DatastoreV1.ReadOptions + .ReadConsistency; +import com.google.api.services.datastore.client.Datastore; +import com.google.api.services.datastore.client.DatastoreException; +import com.google.api.services.datastore.client.DatastoreFactory; +import com.google.api.services.datastore.client.DatastoreHelper; +import com.google.api.services.datastore.client.DatastoreOptions; + +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.StringByteIterator; + +import org.apache.log4j.Level; +import org.apache.log4j.Logger; + +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.Vector; + +import javax.annotation.Nullable; + +/** + * Google Cloud Datastore Client for YCSB. + */ + +public class GoogleDatastoreClient extends DB { + /** + * Defines a MutationType used in this class. + */ + private enum MutationType { + UPSERT, + UPDATE, + DELETE + } + + /** + * Defines a EntityGroupingMode enum used in this class. + */ + private enum EntityGroupingMode { + ONE_ENTITY_PER_GROUP, + MULTI_ENTITY_PER_GROUP + } + + private static Logger logger = + Logger.getLogger(GoogleDatastoreClient.class); + + // Read consistency defaults to "STRONG" per YCSB guidance. + // User can override this via configure. + private ReadConsistency readConsistency = ReadConsistency.STRONG; + + private EntityGroupingMode entityGroupingMode = + EntityGroupingMode.ONE_ENTITY_PER_GROUP; + + private String rootEntityName; + + private Datastore datastore = null; + + /** + * Initialize any state for this DB. Called once per DB instance; there is + * one DB instance per client thread. + */ + @Override + public void init() throws DBException { + String debug = getProperties().getProperty("googledatastore.debug", null); + if (null != debug && "true".equalsIgnoreCase(debug)) { + logger.setLevel(Level.DEBUG); + } + + // We need the following 3 essential properties to initialize datastore: + // + // - DatasetId, + // - Path to private key file, + // - Service account email address. + String datasetId = getProperties().getProperty( + "googledatastore.datasetId", null); + if (datasetId == null) { + throw new DBException( + "Required property \"datasetId\" missing."); + } + + String privateKeyFile = getProperties().getProperty( + "googledatastore.privateKeyFile", null); + if (privateKeyFile == null) { + throw new DBException( + "Required property \"privateKeyFile\" missing."); + } + + String serviceAccountEmail = getProperties().getProperty( + "googledatastore.serviceAccountEmail", null); + if (serviceAccountEmail == null) { + throw new DBException( + "Required property \"serviceAccountEmail\" missing."); + } + + // Below are properties related to benchmarking. + + String readConsistencyConfig = getProperties().getProperty( + "googledatastore.readConsistency", null); + if (readConsistencyConfig != null) { + try { + this.readConsistency = ReadConsistency.valueOf( + readConsistencyConfig.trim().toUpperCase()); + } catch (IllegalArgumentException e) { + throw new DBException("Invalid read consistency specified: " + + readConsistencyConfig + ". Expecting STRONG or EVENTUAL."); + } + } + + // + // Entity Grouping Mode (googledatastore.entitygroupingmode), see + // documentation in conf/googledatastore.properties. + // + String entityGroupingConfig = getProperties().getProperty( + "googledatastore.entityGroupingMode", null); + if (entityGroupingConfig != null) { + try { + this.entityGroupingMode = EntityGroupingMode.valueOf( + entityGroupingConfig.trim().toUpperCase()); + } catch (IllegalArgumentException e) { + throw new DBException("Invalid entity grouping mode specified: " + + entityGroupingConfig + ". Expecting ONE_ENTITY_PER_GROUP or " + + "MULTI_ENTITY_PER_GROUP."); + } + } + + this.rootEntityName = getProperties().getProperty( + "googledatastore.rootEntityName", "YCSB_ROOT_ENTITY"); + + try { + // Setup the connection to Google Cloud Datastore with the credentials + // obtained from the configure. + DatastoreOptions.Builder options = new DatastoreOptions.Builder(); + Credential credential = DatastoreHelper.getServiceAccountCredential( + serviceAccountEmail, privateKeyFile); + logger.info("Using JWT Service Account credential."); + logger.info("DatasetID: " + datasetId + ", Service Account Email: " + + serviceAccountEmail + ", Private Key File Path: " + privateKeyFile); + + datastore = DatastoreFactory.get().create( + options.credential(credential).dataset(datasetId).build()); + + } catch (GeneralSecurityException exception) { + throw new DBException("Security error connecting to the datastore: " + + exception.getMessage(), exception); + + } catch (IOException exception) { + throw new DBException("I/O error connecting to the datastore: " + + exception.getMessage(), exception); + } + + logger.info("Datastore client instance created: " + + datastore.toString()); + } + + @Override + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + LookupRequest.Builder lookupRequest = LookupRequest.newBuilder(); + lookupRequest.addKey(buildPrimaryKey(table, key)); + lookupRequest.getReadOptionsBuilder().setReadConsistency( + this.readConsistency); + // Note above, datastore lookupRequest always reads the entire entity, it + // does not support reading a subset of "fields" (properties) of an entity. + + logger.debug("Built lookup request as: " + lookupRequest.toString()); + + LookupResponse response = null; + try { + response = datastore.lookup(lookupRequest.build()); + + } catch (DatastoreException exception) { + logger.error( + String.format("Datastore Exception when reading (%s): %s %s", + exception.getMessage(), + exception.getMethodName(), + exception.getCode())); + + // DatastoreException.getCode() returns an HTTP response code which we + // will bubble up to the user as part of the YCSB Status "name". + return new Status("ERROR-" + exception.getCode(), exception.getMessage()); + } + + if (response.getFoundCount() == 0) { + return new Status("ERROR-404", "Not Found, key is: " + key); + } else if (response.getFoundCount() > 1) { + // We only asked to lookup for one key, shouldn't have got more than one + // entity back. Unexpected State. + return Status.UNEXPECTED_STATE; + } + + Entity entity = response.getFound(0).getEntity(); + logger.debug("Read entity: " + entity.toString()); + + Map<String, Value> properties = DatastoreHelper.getPropertyMap(entity); + Set<String> propertiesToReturn = + (fields == null ? properties.keySet() : fields); + + for (String name : propertiesToReturn) { + if (properties.containsKey(name)) { + result.put(name, new StringByteIterator(properties.get(name) + .getStringValue())); + } + } + + return Status.OK; + } + + @Override + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + // TODO: Implement Scan as query on primary key. + return Status.NOT_IMPLEMENTED; + } + + @Override + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { + + return doSingleItemMutation(table, key, values, MutationType.UPDATE); + } + + @Override + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + // Use Upsert to allow overwrite of existing key instead of failing the + // load (or run) just because the DB already has the key. + // This is the same behavior as what other DB does here (such as + // the DynamoDB client). + return doSingleItemMutation(table, key, values, MutationType.UPSERT); + } + + @Override + public Status delete(String table, String key) { + return doSingleItemMutation(table, key, null, MutationType.DELETE); + } + + private Key.Builder buildPrimaryKey(String table, String key) { + Key.Builder result = Key.newBuilder(); + + if (this.entityGroupingMode == EntityGroupingMode.MULTI_ENTITY_PER_GROUP) { + // All entities are in side the same group when we are in this mode. + result.addPathElement(Key.PathElement.newBuilder().setKind(table). + setName(rootEntityName)); + } + + return result.addPathElement(Key.PathElement.newBuilder().setKind(table) + .setName(key)); + } + + private Status doSingleItemMutation(String table, String key, + @Nullable HashMap<String, ByteIterator> values, + MutationType mutationType) { + // First build the key. + Key.Builder datastoreKey = buildPrimaryKey(table, key); + + // Build a commit request in non-transactional mode. + // Single item mutation to google datastore + // is always atomic and strongly consistent. Transaction is only necessary + // for multi-item mutation, or Read-modify-write operation. + CommitRequest.Builder commitRequest = CommitRequest.newBuilder(); + commitRequest.setMode(Mode.NON_TRANSACTIONAL); + + if (mutationType == MutationType.DELETE) { + commitRequest.getMutationBuilder().addDelete(datastoreKey); + + } else { + // If this is not for delete, build the entity. + Entity.Builder entityBuilder = Entity.newBuilder(); + entityBuilder.setKey(datastoreKey); + for (Entry<String, ByteIterator> val : values.entrySet()) { + entityBuilder.addProperty(Property.newBuilder() + .setName(val.getKey()) + .setValue(Value.newBuilder() + .setStringValue(val.getValue().toString()))); + } + Entity entity = entityBuilder.build(); + logger.debug("entity built as: " + entity.toString()); + + if (mutationType == MutationType.UPSERT) { + commitRequest.getMutationBuilder().addUpsert(entity); + } else if (mutationType == MutationType.UPDATE){ + commitRequest.getMutationBuilder().addUpdate(entity); + } else { + throw new RuntimeException("Impossible MutationType, code bug."); + } + } + + try { + datastore.commit(commitRequest.build()); + logger.debug("successfully committed."); + + } catch (DatastoreException exception) { + // Catch all Datastore rpc errors. + // Log the exception, the name of the method called and the error code. + logger.error( + String.format("Datastore Exception when committing (%s): %s %s", + exception.getMessage(), + exception.getMethodName(), + exception.getCode())); + + // DatastoreException.getCode() returns an HTTP response code which we + // will bubble up to the user as part of the YCSB Status "name". + return new Status("ERROR-" + exception.getCode(), exception.getMessage()); + } + + return Status.OK; + } +} diff --git a/googledatastore/src/main/java/com/yahoo/ycsb/db/package-info.java b/googledatastore/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..bccdf1e648e6b9cab0f7c84660c2e884efa2a5db --- /dev/null +++ b/googledatastore/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2015 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. + */ + +/** + * YCSB binding for +<a href="https://cloud.google.com/datastore/">Google Cloud Datastore</a>. + */ +package com.yahoo.ycsb.db; diff --git a/googledatastore/src/main/resources/log4j.properties b/googledatastore/src/main/resources/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..f8f8689ef8d7d311f1f3e6e77e343c9fab303482 --- /dev/null +++ b/googledatastore/src/main/resources/log4j.properties @@ -0,0 +1,25 @@ +# Copyright (c) 2015 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. + +#define the console appender +log4j.appender.consoleAppender = org.apache.log4j.ConsoleAppender + +# now define the layout for the appender +log4j.appender.consoleAppender.layout = org.apache.log4j.PatternLayout +log4j.appender.consoleAppender.layout.ConversionPattern=%-4r [%t] %-5p %c %x -%m%n + +# now map our console appender as a root logger, means all log messages will go +# to this appender +log4j.rootLogger = INFO, consoleAppender diff --git a/hbase/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java b/hbase/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java deleted file mode 100644 index b4e949873f5797920b9e4005c3f183a33b5c2486..0000000000000000000000000000000000000000 --- a/hbase/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java +++ /dev/null @@ -1,500 +0,0 @@ -/** - * 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. - */ - -package com.yahoo.ycsb.db; - - -import com.google.common.base.Preconditions; - -import com.yahoo.ycsb.ByteArrayByteIterator; -import com.yahoo.ycsb.ByteIterator; -import com.yahoo.ycsb.DBException; -import com.yahoo.ycsb.measurements.Measurements; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hbase.Cell; -import org.apache.hadoop.hbase.CellUtil; -import org.apache.hadoop.hbase.HBaseConfiguration; -import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.KeyValue; -import org.apache.hadoop.hbase.TableName; -import org.apache.hadoop.hbase.client.BufferedMutator; -import org.apache.hadoop.hbase.client.BufferedMutatorParams; -import org.apache.hadoop.hbase.client.Connection; -import org.apache.hadoop.hbase.client.ConnectionFactory; -import org.apache.hadoop.hbase.client.Delete; -import org.apache.hadoop.hbase.client.Durability; -import org.apache.hadoop.hbase.client.Get; -import org.apache.hadoop.hbase.client.HTable; -import org.apache.hadoop.hbase.client.Put; -import org.apache.hadoop.hbase.client.Result; -import org.apache.hadoop.hbase.client.ResultScanner; -import org.apache.hadoop.hbase.client.Scan; -import org.apache.hadoop.hbase.client.Table; -import org.apache.hadoop.hbase.util.Bytes; - -import java.io.IOException; -import java.util.ConcurrentModificationException; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Properties; -import java.util.Random; -import java.util.Set; -import java.util.Vector; - -/** - * HBase 1.0 client for YCSB framework. - * - * A modified version of HBaseClient (which targets HBase v0.9) utilizing the - * HBase 1.0.0 API. - * - * This client also adds toggleable client-side buffering and configurable write durability. - */ -public class HBaseClient10 extends com.yahoo.ycsb.DB -{ - private static final Configuration config = HBaseConfiguration.create(); - - public boolean _debug=false; - - public String _tableName=""; - public Connection _connection=null; - - // Depending on the value of _clientBuffering, either _bufferedMutator - // (_clientBuffering) or _hTable (!_clientBuffering) will be used. - public Table _table=null; - public BufferedMutator _bufferedMutator=null; - - public String _columnFamily=""; - public byte _columnFamilyBytes[]; - - /** - * Durability to use for puts and deletes. - */ - public Durability _durability = Durability.USE_DEFAULT; - - /** - * If true, buffer mutations on the client. - * This is the default behavior for HBaseClient. For measuring - * insert/update/delete latencies, client side buffering should be disabled. - */ - public boolean _clientSideBuffering = false; - public long _writeBufferSize = 1024 * 1024 * 12; - - public static final int Ok=0; - public static final int ServerError=-1; - public static final int HttpError=-2; - public static final int NoMatchingRecord=-3; - - /** - * Initialize any state for this DB. - * Called once per DB instance; there is one DB instance per client thread. - */ - @Override - public void init() throws DBException - { - if ("true".equals(getProperties().getProperty("clientbuffering", "false"))) { - this._clientSideBuffering = true; - } - if (getProperties().containsKey("writebuffersize")) { - _writeBufferSize = Long.parseLong(getProperties().getProperty("writebuffersize")); - } - - if (getProperties().getProperty("durability") != null) { - this._durability = Durability.valueOf(getProperties().getProperty("durability")); - } - - try { - _connection = ConnectionFactory.createConnection(config); - } catch (java.io.IOException e) { - throw new DBException(e); - } - - if ( (getProperties().getProperty("debug")!=null) && - (getProperties().getProperty("debug").compareTo("true")==0) ) - { - _debug=true; - } - - _columnFamily = getProperties().getProperty("columnfamily"); - if (_columnFamily == null) - { - System.err.println("Error, must specify a columnfamily for HBase table"); - throw new DBException("No columnfamily specified"); - } - _columnFamilyBytes = Bytes.toBytes(_columnFamily); - - // Terminate right now if table does not exist, since the client - // will not propagate this error upstream once the workload - // starts. - String table = com.yahoo.ycsb.workloads.CoreWorkload.table; - try - { - final TableName tableName = TableName.valueOf(table); - HTableDescriptor dsc = _connection.getTable(tableName).getTableDescriptor(); - } - catch (IOException e) - { - throw new DBException(e); - } - } - - /** - * Cleanup any state for this DB. - * Called once per DB instance; there is one DB instance per client thread. - */ - @Override - public void cleanup() throws DBException - { - // Get the measurements instance as this is the only client that should - // count clean up time like an update if client-side buffering is - // enabled. - Measurements _measurements = Measurements.getMeasurements(); - try { - long st=System.nanoTime(); - if (_bufferedMutator != null) { - _bufferedMutator.close(); - } - if (_table != null) { - _table.close(); - } - long en=System.nanoTime(); - final String type = _clientSideBuffering ? "UPDATE" : "CLEANUP"; - _measurements.measure(type, (int)((en-st)/1000)); - _connection.close(); - } catch (IOException e) { - throw new DBException(e); - } - } - - public void getHTable(String table) throws IOException - { - final TableName tableName = TableName.valueOf(table); - this._table = this._connection.getTable(tableName); - //suggestions from http://ryantwopointoh.blogspot.com/2009/01/performance-of-hbase-importing.html - if (_clientSideBuffering) { - final BufferedMutatorParams p = new BufferedMutatorParams(tableName); - p.writeBufferSize(_writeBufferSize); - this._bufferedMutator = this._connection.getBufferedMutator(p); - } - } - - /** - * Read a record from the database. Each field/value pair from the result will be stored in a HashMap. - * - * @param table The name of the table - * @param key The record key of the record to read. - * @param fields The list of fields to read, or null for all of them - * @param result A HashMap of field/value pairs for the result - * @return Zero on success, a non-zero error code on error - */ - public int read(String table, String key, Set<String> fields, HashMap<String,ByteIterator> result) - { - //if this is a "new" table, init HTable object. Else, use existing one - if (!_tableName.equals(table)) { - _table = null; - try - { - getHTable(table); - _tableName = table; - } - catch (IOException e) - { - System.err.println("Error accessing HBase table: " + e); - return ServerError; - } - } - - Result r = null; - try - { - if (_debug) { - System.out.println("Doing read from HBase columnfamily "+_columnFamily); - System.out.println("Doing read for key: "+key); - } - Get g = new Get(Bytes.toBytes(key)); - if (fields == null) { - g.addFamily(_columnFamilyBytes); - } else { - for (String field : fields) { - g.addColumn(_columnFamilyBytes, Bytes.toBytes(field)); - } - } - r = _table.get(g); - } - catch (IOException e) - { - if (_debug) { - System.err.println("Error doing get: "+e); - } - return ServerError; - } - catch (ConcurrentModificationException e) - { - //do nothing for now...need to understand HBase concurrency model better - return ServerError; - } - - if (r.isEmpty()) { - return NoMatchingRecord; - } - for (Cell c : r.listCells()) { - result.put(Bytes.toString(CellUtil.cloneQualifier(c)), - new ByteArrayByteIterator(CellUtil.cloneValue(c))); - if (_debug) { - System.out.println("Result for field: "+Bytes.toString(CellUtil.cloneQualifier(c))+ - " is: "+Bytes.toString(CellUtil.cloneValue(c))); - } - } - return Ok; - } - - /** - * Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap. - * - * @param table The name of the table - * @param startkey The record key of the first record to read. - * @param recordcount The number of records to read - * @param fields The list of fields to read, or null for all of them - * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record - * @return Zero on success, a non-zero error code on error - */ - @Override - public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String,ByteIterator>> result) - { - //if this is a "new" table, init HTable object. Else, use existing one - if (!_tableName.equals(table)) { - _table = null; - try - { - getHTable(table); - _tableName = table; - } - catch (IOException e) - { - System.err.println("Error accessing HBase table: "+e); - return ServerError; - } - } - - Scan s = new Scan(Bytes.toBytes(startkey)); - //HBase has no record limit. Here, assume recordcount is small enough to bring back in one call. - //We get back recordcount records - s.setCaching(recordcount); - - //add specified fields or else all fields - if (fields == null) - { - s.addFamily(_columnFamilyBytes); - } - else - { - for (String field : fields) - { - s.addColumn(_columnFamilyBytes,Bytes.toBytes(field)); - } - } - - //get results - ResultScanner scanner = null; - try { - scanner = _table.getScanner(s); - int numResults = 0; - for (Result rr = scanner.next(); rr != null; rr = scanner.next()) - { - //get row key - String key = Bytes.toString(rr.getRow()); - if (_debug) - { - System.out.println("Got scan result for key: "+key); - } - - HashMap<String,ByteIterator> rowResult = new HashMap<String, ByteIterator>(); - - for (KeyValue kv : rr.raw()) { - rowResult.put( - Bytes.toString(kv.getQualifier()), - new ByteArrayByteIterator(kv.getValue())); - } - //add rowResult to result vector - result.add(rowResult); - numResults++; - if (numResults >= recordcount) //if hit recordcount, bail out - { - break; - } - } //done with row - - } - - catch (IOException e) { - if (_debug) - { - System.out.println("Error in getting/parsing scan result: "+e); - } - return ServerError; - } - - finally { - if (scanner != null) - { - scanner.close(); - } - } - - return Ok; - } - - /** - * Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - * record key, overwriting any existing values with the same field name. - * - * @param table The name of the table - * @param key The record key of the record to write - * @param values A HashMap of field/value pairs to update in the record - * @return Zero on success, a non-zero error code on error - */ - @Override - public int update(String table, String key, HashMap<String,ByteIterator> values) - { - //if this is a "new" table, init HTable object. Else, use existing one - if (!_tableName.equals(table)) { - _table = null; - try - { - getHTable(table); - _tableName = table; - } - catch (IOException e) - { - System.err.println("Error accessing HBase table: "+e); - return ServerError; - } - } - - - if (_debug) { - System.out.println("Setting up put for key: "+key); - } - Put p = new Put(Bytes.toBytes(key)); - p.setDurability(_durability); - for (Map.Entry<String, ByteIterator> entry : values.entrySet()) - { - byte[] value = entry.getValue().toArray(); - if (_debug) { - System.out.println("Adding field/value " + entry.getKey() + "/"+ - Bytes.toStringBinary(value) + " to put request"); - } - p.add(_columnFamilyBytes,Bytes.toBytes(entry.getKey()), value); - } - - try - { - if (_clientSideBuffering) { - Preconditions.checkNotNull(_bufferedMutator); - _bufferedMutator.mutate(p); - } else{ - _table.put(p); - } - } - catch (IOException e) - { - if (_debug) { - System.err.println("Error doing put: "+e); - } - return ServerError; - } - catch (ConcurrentModificationException e) - { - //do nothing for now...hope this is rare - return ServerError; - } - - return Ok; - } - - /** - * Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - * record key. - * - * @param table The name of the table - * @param key The record key of the record to insert. - * @param values A HashMap of field/value pairs to insert in the record - * @return Zero on success, a non-zero error code on error - */ - @Override - public int insert(String table, String key, HashMap<String,ByteIterator> values) - { - return update(table,key,values); - } - - /** - * Delete a record from the database. - * - * @param table The name of the table - * @param key The record key of the record to delete. - * @return Zero on success, a non-zero error code on error - */ - @Override - public int delete(String table, String key) - { - //if this is a "new" table, init HTable object. Else, use existing one - if (!_tableName.equals(table)) { - _table = null; - try - { - getHTable(table); - _tableName = table; - } - catch (IOException e) - { - System.err.println("Error accessing HBase table: "+e); - return ServerError; - } - } - - if (_debug) { - System.out.println("Doing delete for key: "+key); - } - - final Delete d = new Delete(Bytes.toBytes(key)); - d.setDurability(_durability); - try - { - if (_clientSideBuffering) { - Preconditions.checkNotNull(_bufferedMutator); - _bufferedMutator.mutate(d); - } else { - _table.delete(d); - } - } - catch (IOException e) - { - if (_debug) { - System.err.println("Error doing delete: "+e); - } - return ServerError; - } - - return Ok; - } -} - -/* For customized vim control - * set autoindent - * set si - * set shiftwidth=4 - */ - diff --git a/hbase094/README.md b/hbase094/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3df8264cfd89acc63bf07b929a5c4683d534f596 --- /dev/null +++ b/hbase094/README.md @@ -0,0 +1,23 @@ +<!-- +Copyright (c) 2015 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. +--> + +# HBase (0.94.x) Driver for YCSB +This driver is a binding for the YCSB facilities to operate against a HBase 0.94.x Server cluster. It may also work against 0.92.x +To run against an HBase 0.98.x cluster, use the `hbase098` binding. +To run against an HBase >= 1.0 cluster, use the `hbase10` binding. + +See `hbase098/README.md` for configuration details. diff --git a/hbase094/pom.xml b/hbase094/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..aa852ef897322826a1a5deac5a282895d8813c2d --- /dev/null +++ b/hbase094/pom.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (c) 2012 - 2015 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.7.0-SNAPSHOT</version> + <relativePath>../binding-parent/</relativePath> + </parent> + + <artifactId>hbase094-binding</artifactId> + <name>HBase 0.94.x DB Binding</name> + + <dependencies> + <!-- This binding is identical to the HBase 0.98, other than dependencies. --> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase</artifactId> + <version>${hbase094.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-core</artifactId> + <version>1.0.4</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>hbase098-binding</artifactId> + <version>${project.version}</version> + <exclusions> + <!-- HBase 0.98.0 depends on hbase-client, HBase 0.94.0 on hbase. + Override all dependencies. --> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.12</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> +</project> diff --git a/hbase/README.md b/hbase098/README.md similarity index 79% rename from hbase/README.md rename to hbase098/README.md index 7316c6206e9bcef5801efaf113a32d15f6cfa912..e6a7fb4158f64c7d3c19e2c7e4c96a94a7cb612c 100644 --- a/hbase/README.md +++ b/hbase098/README.md @@ -15,8 +15,10 @@ permissions and limitations under the License. See accompanying LICENSE file. --> -# HBase Driver for YCSB -This driver is a binding for the YCSB facilities to operate against a HBase Server cluster. +# HBase (0.98.x) Driver for YCSB +This driver is a binding for the YCSB facilities to operate against a HBase 0.98.x Server cluster. +To run against an HBase 0.94.x cluster, use the `hbase094` binding. +To run against an HBase >= 1.0 cluster, use the `hbase10` binding. ## Quickstart @@ -68,6 +70,10 @@ bin/ycsb run hbase -P workloads/workloada -cp /HBASE-HOME-DIR/conf -p table=user Following options can be configurable using `-p`. * `columnfamily`: The HBase column family to target. -* `clientbuffering` : If true, buffer mutations on the client. The default is false. -* `writebuffersize` : Buffer size to be used when `clientbuffering` is activated. The default is 12MB. * `debug` : If true, debugging logs are activated. The default is false. +* `hbase.usepagefilter` : If true, HBase + [PageFilter](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/PageFilter.html)s + are used to limit the number of records consumed in a scan operation. The default is true. +* `principal`: If testing need to be done against a secure HBase cluster using Kerberos Keytab, + this property can be used to pass the principal in the keytab file. +* `keytab`: The Kerberos keytab file name and location can be passed through this property. diff --git a/hbase/pom.xml b/hbase098/pom.xml similarity index 80% rename from hbase/pom.xml rename to hbase098/pom.xml index a5241798a5573ba8488d554d03c44e6b5a9e6284..465189abd801719f3de84ae817c9666ae5a220fd 100644 --- a/hbase/pom.xml +++ b/hbase098/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +<!-- +Copyright (c) 2012 - 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 @@ -21,18 +21,22 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent/</relativePath> </parent> - <artifactId>hbase-binding</artifactId> - <name>HBase DB Binding</name> + <artifactId>hbase098-binding</artifactId> + <name>HBase 0.98.x DB Binding</name> + + <properties> + <checkstyle.failOnViolation>false</checkstyle.failOnViolation> + </properties> <dependencies> <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-client</artifactId> - <version>${hbase.version}</version> + <version>${hbase098.version}</version> </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> diff --git a/hbase/src/main/java/com/yahoo/ycsb/db/HBaseClient.java b/hbase098/src/main/java/com/yahoo/ycsb/db/HBaseClient.java similarity index 81% rename from hbase/src/main/java/com/yahoo/ycsb/db/HBaseClient.java rename to hbase098/src/main/java/com/yahoo/ycsb/db/HBaseClient.java index 4dc5bc7253660435b74978d81055f09675167105..9b097b37b4a39df69c4955bd9fbca36d09db124c 100644 --- a/hbase/src/main/java/com/yahoo/ycsb/db/HBaseClient.java +++ b/hbase098/src/main/java/com/yahoo/ycsb/db/HBaseClient.java @@ -17,34 +17,40 @@ package com.yahoo.ycsb.db; - -import com.yahoo.ycsb.DBException; -import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.ByteArrayByteIterator; - -import java.io.IOException; -import java.util.*; -//import java.util.HashMap; -//import java.util.Properties; -//import java.util.Set; -//import java.util.Vector; - +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; import com.yahoo.ycsb.measurements.Measurements; + +import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hbase.KeyValue; +import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HTable; -//import org.apache.hadoop.hbase.client.Scanner; +import org.apache.hadoop.hbase.KeyValue; +import org.apache.hadoop.hbase.client.HConnectionManager; +import org.apache.hadoop.hbase.client.HConnection; +import org.apache.hadoop.hbase.client.HTableInterface; +import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.Get; +import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Put; -import org.apache.hadoop.hbase.client.Delete; -import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; -//import org.apache.hadoop.hbase.io.Cell; -//import org.apache.hadoop.hbase.io.RowResult; +import org.apache.hadoop.hbase.client.Scan; +import org.apache.hadoop.hbase.filter.PageFilter; import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.hbase.HBaseConfiguration; + +import java.io.IOException; +import java.util.ConcurrentModificationException; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Properties; +import java.util.Random; +import java.util.Set; +import java.util.Vector; +import java.util.concurrent.atomic.AtomicInteger; /** * HBase client for YCSB framework @@ -54,20 +60,21 @@ public class HBaseClient extends com.yahoo.ycsb.DB // BFC: Change to fix broken build (with HBase 0.20.6) //private static final Configuration config = HBaseConfiguration.create(); private static final Configuration config = HBaseConfiguration.create(); //new HBaseConfiguration(); + private static final AtomicInteger THREAD_COUNT = new AtomicInteger(0); public boolean _debug=false; public String _table=""; - public HTable _hTable=null; + private static HConnection _hConn=null; + public HTableInterface _hTable=null; public String _columnFamily=""; public byte _columnFamilyBytes[]; public boolean _clientSideBuffering = false; public long _writeBufferSize = 1024 * 1024 * 12; + /** Whether or not a page filter should be used to limit scan length. */ + public boolean _usePageFilter = true; - public static final int Ok=0; - public static final int ServerError=-1; public static final int HttpError=-2; - public static final int NoMatchingRecord=-3; public static final Object tableLock = new Object(); @@ -91,7 +98,32 @@ public class HBaseClient extends com.yahoo.ycsb.DB { _writeBufferSize = Long.parseLong(getProperties().getProperty("writebuffersize")); } - + if ("false".equals(getProperties().getProperty("hbase.usepagefilter", "true"))) { + _usePageFilter = false; + } + if ("kerberos".equalsIgnoreCase(config.get("hbase.security.authentication"))) { + config.set("hadoop.security.authentication", "Kerberos"); + UserGroupInformation.setConfiguration(config); + } + if ( (getProperties().getProperty("principal")!=null) && (getProperties().getProperty("keytab")!=null) ){ + try { + UserGroupInformation.loginUserFromKeytab(getProperties().getProperty("principal"), getProperties().getProperty("keytab")); + } catch (IOException e) { + System.err.println("Keytab file is not readable or not found"); + throw new DBException(e); + } + } + try { + THREAD_COUNT.getAndIncrement(); + synchronized(THREAD_COUNT) { + if (_hConn == null){ + _hConn = HConnectionManager.createConnection(config); + } + } + } catch (IOException e) { + System.err.println("Connection to HBase was not successful"); + throw new DBException(e); + } _columnFamily = getProperties().getProperty("columnfamily"); if (_columnFamily == null) { @@ -106,8 +138,8 @@ public class HBaseClient extends com.yahoo.ycsb.DB String table = com.yahoo.ycsb.workloads.CoreWorkload.table; try { - HTable ht = new HTable(config, table); - HTableDescriptor dsc = ht.getTableDescriptor(); + HTableInterface ht = _hConn.getTable(table); + ht.getTableDescriptor(); } catch (IOException e) { @@ -129,6 +161,12 @@ public class HBaseClient extends com.yahoo.ycsb.DB if (_hTable != null) { _hTable.flushCommits(); } + synchronized(THREAD_COUNT) { + int threadCount = THREAD_COUNT.decrementAndGet(); + if (threadCount <= 0 && _hConn != null) { + _hConn.close(); + } + } long en=System.nanoTime(); _measurements.measure("UPDATE", (int)((en-st)/1000)); } catch (IOException e) { @@ -139,7 +177,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB public void getHTable(String table) throws IOException { synchronized (tableLock) { - _hTable = new HTable(config, table); + _hTable = _hConn.getTable(table); //2 suggestions from http://ryantwopointoh.blogspot.com/2009/01/performance-of-hbase-importing.html _hTable.setAutoFlush(!_clientSideBuffering, true); _hTable.setWriteBufferSize(_writeBufferSize); @@ -157,7 +195,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB * @param result A HashMap of field/value pairs for the result * @return Zero on success, a non-zero error code on error */ - public int read(String table, String key, Set<String> fields, HashMap<String,ByteIterator> result) + public Status read(String table, String key, Set<String> fields, HashMap<String,ByteIterator> result) { //if this is a "new" table, init HTable object. Else, use existing one if (!_table.equals(table)) { @@ -170,7 +208,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB catch (IOException e) { System.err.println("Error accessing HBase table: "+e); - return ServerError; + return Status.ERROR; } } @@ -194,12 +232,12 @@ public class HBaseClient extends com.yahoo.ycsb.DB catch (IOException e) { System.err.println("Error doing get: "+e); - return ServerError; + return Status.ERROR; } catch (ConcurrentModificationException e) { //do nothing for now...need to understand HBase concurrency model better - return ServerError; + return Status.ERROR; } for (KeyValue kv : r.raw()) { @@ -212,7 +250,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB } } - return Ok; + return Status.OK; } /** @@ -225,7 +263,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record * @return Zero on success, a non-zero error code on error */ - public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String,ByteIterator>> result) + public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String,ByteIterator>> result) { //if this is a "new" table, init HTable object. Else, use existing one if (!_table.equals(table)) { @@ -238,7 +276,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB catch (IOException e) { System.err.println("Error accessing HBase table: "+e); - return ServerError; + return Status.ERROR; } } @@ -246,6 +284,9 @@ public class HBaseClient extends com.yahoo.ycsb.DB //HBase has no record limit. Here, assume recordcount is small enough to bring back in one call. //We get back recordcount records s.setCaching(recordcount); + if (this._usePageFilter) { + s.setFilter(new PageFilter(recordcount)); + } //add specified fields or else all fields if (fields == null) @@ -284,6 +325,9 @@ public class HBaseClient extends com.yahoo.ycsb.DB //add rowResult to result vector result.add(rowResult); numResults++; + + // PageFilter does not guarantee that the number of results is <= pageSize, so this + // break is required. if (numResults >= recordcount) //if hit recordcount, bail out { break; @@ -297,14 +341,14 @@ public class HBaseClient extends com.yahoo.ycsb.DB { System.out.println("Error in getting/parsing scan result: "+e); } - return ServerError; + return Status.ERROR; } finally { scanner.close(); } - return Ok; + return Status.OK; } /** @@ -316,7 +360,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB * @param values A HashMap of field/value pairs to update in the record * @return Zero on success, a non-zero error code on error */ - public int update(String table, String key, HashMap<String,ByteIterator> values) + public Status update(String table, String key, HashMap<String,ByteIterator> values) { //if this is a "new" table, init HTable object. Else, use existing one if (!_table.equals(table)) { @@ -329,7 +373,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB catch (IOException e) { System.err.println("Error accessing HBase table: "+e); - return ServerError; + return Status.ERROR; } } @@ -357,15 +401,15 @@ public class HBaseClient extends com.yahoo.ycsb.DB if (_debug) { System.err.println("Error doing put: "+e); } - return ServerError; + return Status.ERROR; } catch (ConcurrentModificationException e) { //do nothing for now...hope this is rare - return ServerError; + return Status.ERROR; } - return Ok; + return Status.OK; } /** @@ -377,7 +421,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB * @param values A HashMap of field/value pairs to insert in the record * @return Zero on success, a non-zero error code on error */ - public int insert(String table, String key, HashMap<String,ByteIterator> values) + public Status insert(String table, String key, HashMap<String,ByteIterator> values) { return update(table,key,values); } @@ -389,7 +433,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB * @param key The record key of the record to delete. * @return Zero on success, a non-zero error code on error */ - public int delete(String table, String key) + public Status delete(String table, String key) { //if this is a "new" table, init HTable object. Else, use existing one if (!_table.equals(table)) { @@ -402,7 +446,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB catch (IOException e) { System.err.println("Error accessing HBase table: "+e); - return ServerError; + return Status.ERROR; } } @@ -420,10 +464,10 @@ public class HBaseClient extends com.yahoo.ycsb.DB if (_debug) { System.err.println("Error doing delete: "+e); } - return ServerError; + return Status.ERROR; } - return Ok; + return Status.OK; } public static void main(String[] args) @@ -473,7 +517,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB int keynum=random.nextInt(keyspace); String key="user"+keynum; long st=System.currentTimeMillis(); - int rescode; + Status result; /* HashMap hm = new HashMap(); hm.put("field1","value1"); @@ -492,15 +536,15 @@ public class HBaseClient extends com.yahoo.ycsb.DB scanFields.add("field1"); scanFields.add("field3"); Vector<HashMap<String,ByteIterator>> scanResults = new Vector<HashMap<String,ByteIterator>>(); - rescode = cli.scan("table1","user2",20,null,scanResults); + result = cli.scan("table1","user2",20,null,scanResults); long en=System.currentTimeMillis(); accum+=(en-st); - if (rescode!=Ok) + if (!result.equals(Status.OK)) { - System.out.println("Error "+rescode+" for "+key); + System.out.println("Error "+result+" for "+key); } if (i%1==0) diff --git a/hbase10/README.md b/hbase10/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1da5bc4369aa552e2ae158c217fc11b044e8cff8 --- /dev/null +++ b/hbase10/README.md @@ -0,0 +1,23 @@ +<!-- +Copyright (c) 2015 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. +--> + +# HBase (1.0.x) Driver for YCSB +This driver is a binding for the YCSB facilities to operate against a HBase 1.0.x Server cluster. +To run against an HBase 0.94.x cluster, use the `hbase094` binding. +To run against an HBase 0.98.x cluster, use the `hbase098` binding. + +See `hbase098/README.md` for configuration details. diff --git a/hbase10/pom.xml b/hbase10/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..c3e6cdc62a2648c515a50bad059bd88ef7e6d25d --- /dev/null +++ b/hbase10/pom.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (c) 2012 - 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. +--> + +<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.7.0-SNAPSHOT</version> + <relativePath>../binding-parent/</relativePath> + </parent> + + <artifactId>hbase10-binding</artifactId> + <name>HBase 1.0 DB Binding</name> + + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-client</artifactId> + <version>${hbase10.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-testing-util</artifactId> + <version>${hbase10.version}</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> diff --git a/hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java b/hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java new file mode 100644 index 0000000000000000000000000000000000000000..00fb615b6ccfd8439b6bba76011742c249924c74 --- /dev/null +++ b/hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java @@ -0,0 +1,520 @@ +/** + * 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. + */ + +package com.yahoo.ycsb.db; + +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; + +import com.yahoo.ycsb.ByteArrayByteIterator; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.measurements.Measurements; + +import org.apache.hadoop.security.UserGroupInformation; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.Cell; +import org.apache.hadoop.hbase.CellUtil; +import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.BufferedMutator; +import org.apache.hadoop.hbase.client.BufferedMutatorParams; +import org.apache.hadoop.hbase.client.Connection; +import org.apache.hadoop.hbase.client.ConnectionFactory; +import org.apache.hadoop.hbase.client.Delete; +import org.apache.hadoop.hbase.client.Durability; +import org.apache.hadoop.hbase.client.Get; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.client.Result; +import org.apache.hadoop.hbase.client.ResultScanner; +import org.apache.hadoop.hbase.client.Scan; +import org.apache.hadoop.hbase.client.Table; +import org.apache.hadoop.hbase.filter.PageFilter; +import org.apache.hadoop.hbase.util.Bytes; + +import java.io.IOException; +import java.util.ConcurrentModificationException; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.Vector; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * HBase 1.0 client for YCSB framework. + * + * A modified version of HBaseClient (which targets HBase v0.9) utilizing the + * HBase 1.0.0 API. + * + * This client also adds toggleable client-side buffering and configurable write + * durability. + */ +public class HBaseClient10 extends com.yahoo.ycsb.DB { + private Configuration config = HBaseConfiguration.create(); + private static final AtomicInteger THREAD_COUNT = new AtomicInteger(0); + + private boolean debug = false; + + private String tableName = ""; + private static Connection connection = null; + + // Depending on the value of clientSideBuffering, either bufferedMutator + // (clientSideBuffering) or currentTable (!clientSideBuffering) will be used. + private Table currentTable = null; + private BufferedMutator bufferedMutator = null; + + private String columnFamily = ""; + private byte[] columnFamilyBytes; + + /** + * Durability to use for puts and deletes. + */ + private Durability durability = Durability.USE_DEFAULT; + + /** Whether or not a page filter should be used to limit scan length. */ + private boolean usePageFilter = true; + + /** + * If true, buffer mutations on the client. This is the default behavior for + * HBaseClient. For measuring insert/update/delete latencies, client side + * buffering should be disabled. + */ + private boolean clientSideBuffering = false; + private long writeBufferSize = 1024 * 1024 * 12; + + /** + * Initialize any state for this DB. Called once per DB instance; there is one + * DB instance per client thread. + */ + @Override + public void init() throws DBException { + if ("true" + .equals(getProperties().getProperty("clientbuffering", "false"))) { + this.clientSideBuffering = true; + } + if (getProperties().containsKey("writebuffersize")) { + writeBufferSize = + Long.parseLong(getProperties().getProperty("writebuffersize")); + } + + if (getProperties().getProperty("durability") != null) { + this.durability = + Durability.valueOf(getProperties().getProperty("durability")); + } + + if ("kerberos".equalsIgnoreCase(config.get("hbase.security.authentication"))) { + config.set("hadoop.security.authentication", "Kerberos"); + UserGroupInformation.setConfiguration(config); + } + + if ((getProperties().getProperty("principal")!=null) + && (getProperties().getProperty("keytab")!=null)) { + try { + UserGroupInformation.loginUserFromKeytab(getProperties().getProperty("principal"), + getProperties().getProperty("keytab")); + } catch (IOException e) { + System.err.println("Keytab file is not readable or not found"); + throw new DBException(e); + } + } + + try { + THREAD_COUNT.getAndIncrement(); + synchronized(THREAD_COUNT) { + connection = ConnectionFactory.createConnection(config); + } + } catch (java.io.IOException e) { + throw new DBException(e); + } + + if ((getProperties().getProperty("debug") != null) + && (getProperties().getProperty("debug").compareTo("true") == 0)) { + debug = true; + } + + if ("false" + .equals(getProperties().getProperty("hbase.usepagefilter", "true"))) { + usePageFilter = false; + } + + columnFamily = getProperties().getProperty("columnfamily"); + if (columnFamily == null) { + System.err.println("Error, must specify a columnfamily for HBase table"); + throw new DBException("No columnfamily specified"); + } + columnFamilyBytes = Bytes.toBytes(columnFamily); + + // Terminate right now if table does not exist, since the client + // will not propagate this error upstream once the workload + // starts. + String table = com.yahoo.ycsb.workloads.CoreWorkload.table; + try { + final TableName tName = TableName.valueOf(table); + connection.getTable(tName).getTableDescriptor(); + } catch (IOException e) { + throw new DBException(e); + } + } + + /** + * Cleanup any state for this DB. Called once per DB instance; there is one DB + * instance per client thread. + */ + @Override + public void cleanup() throws DBException { + // Get the measurements instance as this is the only client that should + // count clean up time like an update if client-side buffering is + // enabled. + Measurements measurements = Measurements.getMeasurements(); + try { + long st = System.nanoTime(); + if (bufferedMutator != null) { + bufferedMutator.close(); + } + if (currentTable != null) { + currentTable.close(); + } + long en = System.nanoTime(); + final String type = clientSideBuffering ? "UPDATE" : "CLEANUP"; + measurements.measure(type, (int) ((en - st) / 1000)); + synchronized(THREAD_COUNT) { + int threadCount = THREAD_COUNT.decrementAndGet(); + if (threadCount <= 0 && connection != null) { + connection.close(); + } + } + } catch (IOException e) { + throw new DBException(e); + } + } + + public void getHTable(String table) throws IOException { + final TableName tName = TableName.valueOf(table); + this.currentTable = this.connection.getTable(tName); + // suggestions from + // http://ryantwopointoh.blogspot.com/2009/01/ + // performance-of-hbase-importing.html + if (clientSideBuffering) { + final BufferedMutatorParams p = new BufferedMutatorParams(tName); + p.writeBufferSize(writeBufferSize); + this.bufferedMutator = this.connection.getBufferedMutator(p); + } + } + + /** + * Read a record from the database. Each field/value pair from the result will + * be stored in a HashMap. + * + * @param table + * The name of the table + * @param key + * The record key of the record to read. + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A HashMap of field/value pairs for the result + * @return Zero on success, a non-zero error code on error + */ + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + // if this is a "new" table, init HTable object. Else, use existing one + if (!tableName.equals(table)) { + currentTable = null; + try { + getHTable(table); + tableName = table; + } catch (IOException e) { + System.err.println("Error accessing HBase table: " + e); + return Status.ERROR; + } + } + + Result r = null; + try { + if (debug) { + System.out + .println("Doing read from HBase columnfamily " + columnFamily); + System.out.println("Doing read for key: " + key); + } + Get g = new Get(Bytes.toBytes(key)); + if (fields == null) { + g.addFamily(columnFamilyBytes); + } else { + for (String field : fields) { + g.addColumn(columnFamilyBytes, Bytes.toBytes(field)); + } + } + r = currentTable.get(g); + } catch (IOException e) { + if (debug) { + System.err.println("Error doing get: " + e); + } + return Status.ERROR; + } catch (ConcurrentModificationException e) { + // do nothing for now...need to understand HBase concurrency model better + return Status.ERROR; + } + + if (r.isEmpty()) { + return Status.NOT_FOUND; + } + + while (r.advance()) { + final Cell c = r.current(); + result.put(Bytes.toString(CellUtil.cloneQualifier(c)), + new ByteArrayByteIterator(CellUtil.cloneValue(c))); + if (debug) { + System.out.println( + "Result for field: " + Bytes.toString(CellUtil.cloneQualifier(c)) + + " is: " + Bytes.toString(CellUtil.cloneValue(c))); + } + } + return Status.OK; + } + + /** + * Perform a range scan for a set of records in the database. Each field/value + * pair from the result will be stored in a HashMap. + * + * @param table + * The name of the table + * @param startkey + * The record key of the first record to read. + * @param recordcount + * The number of records to read + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A Vector of HashMaps, where each HashMap is a set field/value + * pairs for one record + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + // if this is a "new" table, init HTable object. Else, use existing one + if (!tableName.equals(table)) { + currentTable = null; + try { + getHTable(table); + tableName = table; + } catch (IOException e) { + System.err.println("Error accessing HBase table: " + e); + return Status.ERROR; + } + } + + Scan s = new Scan(Bytes.toBytes(startkey)); + // HBase has no record limit. Here, assume recordcount is small enough to + // bring back in one call. + // We get back recordcount records + s.setCaching(recordcount); + if (this.usePageFilter) { + s.setFilter(new PageFilter(recordcount)); + } + + // add specified fields or else all fields + if (fields == null) { + s.addFamily(columnFamilyBytes); + } else { + for (String field : fields) { + s.addColumn(columnFamilyBytes, Bytes.toBytes(field)); + } + } + + // get results + ResultScanner scanner = null; + try { + scanner = currentTable.getScanner(s); + int numResults = 0; + for (Result rr = scanner.next(); rr != null; rr = scanner.next()) { + // get row key + String key = Bytes.toString(rr.getRow()); + + if (debug) { + System.out.println("Got scan result for key: " + key); + } + + HashMap<String, ByteIterator> rowResult = + new HashMap<String, ByteIterator>(); + + while (rr.advance()) { + final Cell cell = rr.current(); + rowResult.put(Bytes.toString(CellUtil.cloneQualifier(cell)), + new ByteArrayByteIterator(CellUtil.cloneValue(cell))); + } + + // add rowResult to result vector + result.add(rowResult); + numResults++; + + // PageFilter does not guarantee that the number of results is <= + // pageSize, so this + // break is required. + if (numResults >= recordcount) {// if hit recordcount, bail out + break; + } + } // done with row + } catch (IOException e) { + if (debug) { + System.out.println("Error in getting/parsing scan result: " + e); + } + return Status.ERROR; + } finally { + if (scanner != null) { + scanner.close(); + } + } + + return Status.OK; + } + + /** + * Update a record in the database. Any field/value pairs in the specified + * values HashMap will be written into the record with the specified record + * key, overwriting any existing values with the same field name. + * + * @param table + * The name of the table + * @param key + * The record key of the record to write + * @param values + * A HashMap of field/value pairs to update in the record + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { + // if this is a "new" table, init HTable object. Else, use existing one + if (!tableName.equals(table)) { + currentTable = null; + try { + getHTable(table); + tableName = table; + } catch (IOException e) { + System.err.println("Error accessing HBase table: " + e); + return Status.ERROR; + } + } + + if (debug) { + System.out.println("Setting up put for key: " + key); + } + Put p = new Put(Bytes.toBytes(key)); + p.setDurability(durability); + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { + byte[] value = entry.getValue().toArray(); + if (debug) { + System.out.println("Adding field/value " + entry.getKey() + "/" + + Bytes.toStringBinary(value) + " to put request"); + } + p.addColumn(columnFamilyBytes, Bytes.toBytes(entry.getKey()), value); + } + + try { + if (clientSideBuffering) { + Preconditions.checkNotNull(bufferedMutator); + bufferedMutator.mutate(p); + } else { + currentTable.put(p); + } + } catch (IOException e) { + if (debug) { + System.err.println("Error doing put: " + e); + } + return Status.ERROR; + } catch (ConcurrentModificationException e) { + // do nothing for now...hope this is rare + return Status.ERROR; + } + + return Status.OK; + } + + /** + * Insert a record in the database. Any field/value pairs in the specified + * values HashMap will be written into the record with the specified record + * key. + * + * @param table + * The name of the table + * @param key + * The record key of the record to insert. + * @param values + * A HashMap of field/value pairs to insert in the record + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + return update(table, key, values); + } + + /** + * Delete a record from the database. + * + * @param table + * The name of the table + * @param key + * The record key of the record to delete. + * @return Zero on success, a non-zero error code on error + */ + @Override + public Status delete(String table, String key) { + // if this is a "new" table, init HTable object. Else, use existing one + if (!tableName.equals(table)) { + currentTable = null; + try { + getHTable(table); + tableName = table; + } catch (IOException e) { + System.err.println("Error accessing HBase table: " + e); + return Status.ERROR; + } + } + + if (debug) { + System.out.println("Doing delete for key: " + key); + } + + final Delete d = new Delete(Bytes.toBytes(key)); + d.setDurability(durability); + try { + if (clientSideBuffering) { + Preconditions.checkNotNull(bufferedMutator); + bufferedMutator.mutate(d); + } else { + currentTable.delete(d); + } + } catch (IOException e) { + if (debug) { + System.err.println("Error doing delete: " + e); + } + return Status.ERROR; + } + + return Status.OK; + } + + @VisibleForTesting + void setConfiguration(final Configuration newConfig) { + this.config = newConfig; + } +} + +/* + * For customized vim control set autoindent set si set shiftwidth=4 + */ diff --git a/hbase10/src/main/java/com/yahoo/ycsb/db/package-info.java b/hbase10/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..2b12ae41ec78895f8a8726b1bb4bbbee7f6b1b6f --- /dev/null +++ b/hbase10/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2014, Yahoo!, Inc. 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. + */ + +/** + * The YCSB binding for <a href="https://hbase.apache.org/">HBase</a> + * using the HBase 1.0.0 API. + */ +package com.yahoo.ycsb.db; + diff --git a/hbase10/src/test/java/com/yahoo/ycsb/db/HBaseClient10Test.java b/hbase10/src/test/java/com/yahoo/ycsb/db/HBaseClient10Test.java new file mode 100644 index 0000000000000000000000000000000000000000..631e822710d70d2227ab327e9eb0a97b5817b8e4 --- /dev/null +++ b/hbase10/src/test/java/com/yahoo/ycsb/db/HBaseClient10Test.java @@ -0,0 +1,209 @@ +/** + * 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. + */ + +package com.yahoo.ycsb.db; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.junit.Assume.assumeTrue; + +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.StringByteIterator; +import com.yahoo.ycsb.measurements.Measurements; +import com.yahoo.ycsb.workloads.CoreWorkload; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.HBaseTestingUtility; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Get; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.client.Result; +import org.apache.hadoop.hbase.client.Table; +import org.apache.hadoop.hbase.util.Bytes; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Properties; +import java.util.Vector; + +/** + * Integration tests for the YCSB HBase client 1.0, using an HBase minicluster. + */ +public class HBaseClient10Test { + + private final static String COLUMN_FAMILY = "cf"; + + private static HBaseTestingUtility testingUtil; + private HBaseClient10 client; + private Table table = null; + + private static boolean isWindows() { + final String os = System.getProperty("os.name"); + return os.startsWith("Windows"); + } + + /** + * Creates a mini-cluster for use in these tests. + * + * This is a heavy-weight operation, so invoked only once for the test class. + */ + @BeforeClass + public static void setUpClass() throws Exception { + // Minicluster setup fails on Windows with an UnsatisfiedLinkError. + // Skip if windows. + assumeTrue(!isWindows()); + testingUtil = HBaseTestingUtility.createLocalHTU(); + testingUtil.startMiniCluster(); + } + + /** + * Tears down mini-cluster. + */ + @AfterClass + public static void tearDownClass() throws Exception { + if (testingUtil != null) { + testingUtil.shutdownMiniCluster(); + } + } + + /** + * Sets up the mini-cluster for testing. + * + * We re-create the table for each test. + */ + @Before + public void setUp() throws Exception { + client = new HBaseClient10(); + client.setConfiguration(new Configuration(testingUtil.getConfiguration())); + + Properties p = new Properties(); + p.setProperty("columnfamily", COLUMN_FAMILY); + + Measurements.setProperties(p); + final CoreWorkload workload = new CoreWorkload(); + workload.init(p); + + table = testingUtil.createTable(TableName.valueOf(CoreWorkload.table), Bytes.toBytes(COLUMN_FAMILY)); + + client.setProperties(p); + client.init(); + } + + @After + public void tearDown() throws Exception { + table.close(); + testingUtil.deleteTable(CoreWorkload.table); + } + + @Test + public void testRead() throws Exception { + final String rowKey = "row1"; + final Put p = new Put(Bytes.toBytes(rowKey)); + p.addColumn(Bytes.toBytes(COLUMN_FAMILY), + Bytes.toBytes("column1"), Bytes.toBytes("value1")); + p.addColumn(Bytes.toBytes(COLUMN_FAMILY), + Bytes.toBytes("column2"), Bytes.toBytes("value2")); + table.put(p); + + final HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); + final Status status = client.read(CoreWorkload.table, rowKey, null, result); + assertEquals(Status.OK, status); + assertEquals(2, result.size()); + assertEquals("value1", result.get("column1").toString()); + assertEquals("value2", result.get("column2").toString()); + } + + @Test + public void testReadMissingRow() throws Exception { + final HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); + final Status status = client.read(CoreWorkload.table, "Missing row", null, result); + assertEquals(Status.NOT_FOUND, status); + assertEquals(0, result.size()); + } + + @Test + public void testScan() throws Exception { + // Fill with data + final String colStr = "row_number"; + final byte[] col = Bytes.toBytes(colStr); + final int n = 10; + final List<Put> puts = new ArrayList<Put>(n); + for(int i = 0; i < n; i++) { + final byte[] key = Bytes.toBytes(String.format("%05d", i)); + final byte[] value = java.nio.ByteBuffer.allocate(4).putInt(i).array(); + final Put p = new Put(key); + p.addColumn(Bytes.toBytes(COLUMN_FAMILY), col, value); + puts.add(p); + } + table.put(puts); + + // Test + final Vector<HashMap<String, ByteIterator>> result = + new Vector<HashMap<String, ByteIterator>>(); + + // Scan 5 records, skipping the first + client.scan(CoreWorkload.table, "00001", 5, null, result); + + assertEquals(5, result.size()); + for(int i = 0; i < 5; i++) { + final HashMap<String, ByteIterator> row = result.get(i); + assertEquals(1, row.size()); + assertTrue(row.containsKey(colStr)); + final byte[] bytes = row.get(colStr).toArray(); + final ByteBuffer buf = ByteBuffer.wrap(bytes); + final int rowNum = buf.getInt(); + assertEquals(i + 1, rowNum); + } + } + + @Test + public void testUpdate() throws Exception{ + final String key = "key"; + final HashMap<String, String> input = new HashMap<String, String>(); + input.put("column1", "value1"); + input.put("column2", "value2"); + final Status status = client.insert(CoreWorkload.table, key, StringByteIterator.getByteIteratorMap(input)); + assertEquals(Status.OK, status); + + // Verify result + final Get get = new Get(Bytes.toBytes(key)); + final Result result = this.table.get(get); + assertFalse(result.isEmpty()); + assertEquals(2, result.size()); + for(final java.util.Map.Entry<String, String> entry : input.entrySet()) { + assertEquals(entry.getValue(), + new String(result.getValue(Bytes.toBytes(COLUMN_FAMILY), + Bytes.toBytes(entry.getKey())))); + } + } + + @Test + @Ignore("Not yet implemented") + public void testDelete() { + fail("Not yet implemented"); + } +} + diff --git a/hbase10/src/test/resources/log4j.properties b/hbase10/src/test/resources/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..a9df32e044b9374097b9c110a79f35ff34b5a793 --- /dev/null +++ b/hbase10/src/test/resources/log4j.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2015 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. +# + +# Root logger option +log4j.rootLogger=WARN, stderr + +log4j.appender.stderr=org.apache.log4j.ConsoleAppender +log4j.appender.stderr.target=System.err +log4j.appender.stderr.layout=org.apache.log4j.PatternLayout +log4j.appender.stderr.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n + +# Suppress messages from ZKTableStateManager: Creates a large number of table +# state change messages. +log4j.logger.org.apache.hadoop.hbase.zookeeper.ZKTableStateManager=ERROR diff --git a/hypertable/README b/hypertable/README.md similarity index 60% rename from hypertable/README rename to hypertable/README.md index 671ffc0b37712d24d772e69daa92f355661708cd..1a8da55178b4a7187e8cb7397739f20bfc93b62f 100644 --- a/hypertable/README +++ b/hypertable/README.md @@ -1,39 +1,54 @@ -1 Install Hypertable +<!-- +Copyright (c) 2010 Yahoo! Inc., 2012 - 2015 YCSB contributors. +All rights reserved. -Installation instructions for Hypertable can be found at: +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 -code.google.com/p/hypertable/wiki/HypertableManual +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. +--> +# Install Hypertable -2 Set Up YCSB +Installation instructions for Hypertable can be found at: -Clone the YCSB git repository and compile: + code.google.com/p/hypertable/wiki/HypertableManual -]$ git clone git://github.com/brianfrankcooper/YCSB.git -]$ cd YCSB -]$ mvn clean package +# Set Up YCSB + +Clone the YCSB git repository and compile: + ]$ git clone git://github.com/brianfrankcooper/YCSB.git + ]$ cd YCSB + ]$ mvn clean package -3 Run Hypertable +# Run Hypertable Once it has been installed, start Hypertable by running -]$ ./bin/ht start all-servers hadoop + ]$ ./bin/ht start all-servers hadoop if an instance of HDFS is running or -]$ ./bin/ht start all-servers local + ]$ ./bin/ht start all-servers local if the database is backed by the local file system. YCSB accesses a table called 'usertable' by default. Create this table through the Hypertable shell by running -]$ ./bin/ht shell -hypertable> use '/ycsb'; -hypertable> create table usertable(family); -hypertable> quit + ]$ ./bin/ht shell + hypertable> use '/ycsb'; + hypertable> create table usertable(family); + hypertable> quit All iteractions by YCSB take place under the Hypertable namespace '/ycsb'. Hypertable also uses an additional data grouping structure called a column @@ -44,31 +59,27 @@ The name of this column family must be passed to YCSB. The table can be manipulated from within the hypertable shell without interfering with the operation of YCSB. - - -4 Run YCSB +# Run YCSB Make sure that an instance of Hypertable is running. To access the database through the YCSB shell, from the YCSB directory run: -]$ ./bin/ycsb shell hypertable -p columnfamily=family + ]$ ./bin/ycsb shell hypertable -p columnfamily=family where the value passed to columnfamily matches that used in the table creation. To run a workload, first load the data: -]$ ./bin/ycsb load hypertable -P workloads/workloada -p columnfamily=family + ]$ ./bin/ycsb load hypertable -P workloads/workloada -p columnfamily=family Then run the workload: -]$ ./bin/ycsb run hypertable -P workloads/workloada -p columnfamily=family + ]$ ./bin/ycsb run hypertable -P workloads/workloada -p columnfamily=family This example runs the core workload 'workloada' that comes packaged with YCSB. The state of the YCSB data in the Hypertable database can be reset by dropping usertable and recreating it. - - -+ Configuration Parameters +# Configuration Parameters Hypertable configuration settings can be found in conf/hypertable.cfg under your main hypertable directory. Make sure that the constant THRIFTBROKER_PORT diff --git a/hypertable/pom.xml b/hypertable/pom.xml index ce0cca4386e2f4a01c3ee2876bbd8ffece4c3180..8c41f0683c135e3e6c9e72fb3bbd12060cffe613 100644 --- a/hypertable/pom.xml +++ b/hypertable/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> @@ -29,6 +29,10 @@ LICENSE file. <name>Hypertable DB Binding</name> <packaging>jar</packaging> + <properties> + <checkstyle.failOnViolation>false</checkstyle.failOnViolation> + </properties> + <dependencies> <dependency> <groupId>com.yahoo.ycsb</groupId> diff --git a/hypertable/src/main/java/com/yahoo/ycsb/db/HypertableClient.java b/hypertable/src/main/java/com/yahoo/ycsb/db/HypertableClient.java index 44ac15da345c59b4e74333d91e4adfabf4c858d1..5d3f8998c3aa34c023230601f27f9c0d17078a07 100644 --- a/hypertable/src/main/java/com/yahoo/ycsb/db/HypertableClient.java +++ b/hypertable/src/main/java/com/yahoo/ycsb/db/HypertableClient.java @@ -16,14 +16,14 @@ package com.yahoo.ycsb.db; -import java.nio.ByteBuffer; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.Vector; +import com.yahoo.ycsb.ByteArrayByteIterator; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; import org.apache.thrift.TException; import org.hypertable.thrift.SerializedCellsFlag; +import org.hypertable.thrift.SerializedCellsReader; import org.hypertable.thrift.SerializedCellsWriter; import org.hypertable.thrift.ThriftClient; import org.hypertable.thriftgen.Cell; @@ -32,11 +32,12 @@ import org.hypertable.thriftgen.Key; import org.hypertable.thriftgen.KeyFlag; import org.hypertable.thriftgen.RowInterval; import org.hypertable.thriftgen.ScanSpec; -import org.hypertable.thrift.SerializedCellsReader; -import com.yahoo.ycsb.ByteArrayByteIterator; -import com.yahoo.ycsb.ByteIterator; -import com.yahoo.ycsb.DBException; +import java.nio.ByteBuffer; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.Vector; /** * Hypertable client for YCSB framework @@ -49,9 +50,6 @@ public class HypertableClient extends com.yahoo.ycsb.DB private long ns; private String _columnFamily = ""; - - public static final int OK = 0; - public static final int SERVERERROR = -1; public static final String NAMESPACE = "/ycsb"; public static final int THRIFTBROKER_PORT = 38080; @@ -122,7 +120,7 @@ public class HypertableClient extends com.yahoo.ycsb.DB * @return Zero on success, a non-zero error code on error */ @Override - public int read(String table, String key, Set<String> fields, + public Status read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { //SELECT _column_family:field[i] @@ -138,8 +136,8 @@ public class HypertableClient extends com.yahoo.ycsb.DB if (null != fields) { Vector<HashMap<String, ByteIterator>> resMap = new Vector<HashMap<String, ByteIterator>>(); - if (0 != scan(table, key, 1, fields, resMap)) { - return SERVERERROR; + if (!scan(table, key, 1, fields, resMap).equals(Status.OK)) { + return Status.ERROR; } if (!resMap.isEmpty()) result.putAll(resMap.firstElement()); @@ -155,14 +153,14 @@ public class HypertableClient extends com.yahoo.ycsb.DB if (_debug) { System.err.println("Error doing read: " + e.message); } - return SERVERERROR; + return Status.ERROR; } catch (TException e) { if (_debug) System.err.println("Error doing read"); - return SERVERERROR; + return Status.ERROR; } - return OK; + return Status.OK; } /** @@ -178,7 +176,7 @@ public class HypertableClient extends com.yahoo.ycsb.DB * @return Zero on success, a non-zero error code on error */ @Override - public int scan(String table, String startkey, int recordcount, + public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { @@ -230,14 +228,14 @@ public class HypertableClient extends com.yahoo.ycsb.DB if (_debug) { System.err.println("Error doing scan: " + e.message); } - return SERVERERROR; + return Status.ERROR; } catch (TException e) { if (_debug) System.err.println("Error doing scan"); - return SERVERERROR; + return Status.ERROR; } - return OK; + return Status.OK; } /** @@ -251,7 +249,7 @@ public class HypertableClient extends com.yahoo.ycsb.DB * @return Zero on success, a non-zero error code on error */ @Override - public int update(String table, String key, + public Status update(String table, String key, HashMap<String, ByteIterator> values) { return insert(table, key, values); @@ -268,7 +266,7 @@ public class HypertableClient extends com.yahoo.ycsb.DB * @return Zero on success, a non-zero error code on error */ @Override - public int insert(String table, String key, + public Status insert(String table, String key, HashMap<String, ByteIterator> values) { //INSERT INTO table VALUES @@ -294,14 +292,14 @@ public class HypertableClient extends com.yahoo.ycsb.DB if (_debug) { System.err.println("Error doing set: " + e.message); } - return SERVERERROR; + return Status.ERROR; } catch (TException e) { if (_debug) System.err.println("Error doing set"); - return SERVERERROR; + return Status.ERROR; } - return OK; + return Status.OK; } /** @@ -312,7 +310,7 @@ public class HypertableClient extends com.yahoo.ycsb.DB * @return Zero on success, a non-zero error code on error */ @Override - public int delete(String table, String key) + public Status delete(String table, String key) { //DELETE * FROM table WHERE ROW=key; @@ -331,14 +329,14 @@ public class HypertableClient extends com.yahoo.ycsb.DB if (_debug) { System.err.println("Error doing delete: " + e.message); } - return SERVERERROR; + return Status.ERROR; } catch (TException e) { if (_debug) System.err.println("Error doing delete"); - return SERVERERROR; + return Status.ERROR; } - return OK; + return Status.OK; } } diff --git a/infinispan/pom.xml b/infinispan/pom.xml index 7cd21492e5fecee24b78e54bc054387ffaab0ae4..bb75caa144759c50b0d6aac2a8ba88573e51d2ff 100644 --- a/infinispan/pom.xml +++ b/infinispan/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> @@ -29,6 +29,10 @@ LICENSE file. <name>Infinispan DB Binding</name> <packaging>jar</packaging> + <properties> + <checkstyle.failOnViolation>false</checkstyle.failOnViolation> + </properties> + <dependencies> <dependency> <groupId>org.infinispan</groupId> diff --git a/infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanClient.java b/infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanClient.java index efc0deb035bd3192a9772986de74c5c4f7a691c2..3abf7f6501456be2ca32b143bd8bab37a8f25be5 100644 --- a/infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanClient.java +++ b/infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanClient.java @@ -17,9 +17,10 @@ package com.yahoo.ycsb.db; +import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; -import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.Status; import com.yahoo.ycsb.StringByteIterator; import org.infinispan.Cache; @@ -45,10 +46,6 @@ import java.util.Vector; */ public class InfinispanClient extends DB { - private static final int OK = 0; - private static final int ERROR = -1; - private static final int NOT_FOUND = -2; - // An optimisation for clustered mode private final boolean clustered; @@ -73,7 +70,7 @@ public class InfinispanClient extends DB { infinispanManager = null; } - public int read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { + public Status read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { try { Map<String, String> row; if (clustered) { @@ -90,18 +87,18 @@ public class InfinispanClient extends DB { for (String field : fields) result.put(field, new StringByteIterator(row.get(field))); } } - return OK; + return Status.OK; } catch (Exception e) { - return ERROR; + return Status.ERROR; } } - public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { logger.warn("Infinispan does not support scan semantics"); - return OK; + return Status.OK; } - public int update(String table, String key, HashMap<String, ByteIterator> values) { + public Status update(String table, String key, HashMap<String, ByteIterator> values) { try { if (clustered) { AtomicMap<String, String> row = AtomicMapLookup.getAtomicMap(infinispanManager.getCache(table), key); @@ -117,13 +114,13 @@ public class InfinispanClient extends DB { } } - return OK; + return Status.OK; } catch (Exception e) { - return ERROR; + return Status.ERROR; } } - public int insert(String table, String key, HashMap<String, ByteIterator> values) { + public Status insert(String table, String key, HashMap<String, ByteIterator> values) { try { if (clustered) { AtomicMap<String, String> row = AtomicMapLookup.getAtomicMap(infinispanManager.getCache(table), key); @@ -133,21 +130,21 @@ public class InfinispanClient extends DB { infinispanManager.getCache(table).put(key, values); } - return OK; + return Status.OK; } catch (Exception e) { - return ERROR; + return Status.ERROR; } } - public int delete(String table, String key) { + public Status delete(String table, String key) { try { if (clustered) AtomicMapLookup.removeAtomicMap(infinispanManager.getCache(table), key); else infinispanManager.getCache(table).remove(key); - return OK; + return Status.OK; } catch (Exception e) { - return ERROR; + return Status.ERROR; } } } diff --git a/infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanRemoteClient.java b/infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanRemoteClient.java index 5f79f417c1a0c1025d293b6b7231906d19f3ccef..9b09f553aa9b43d2448b6e7f1f64fdf4d11cb707 100644 --- a/infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanRemoteClient.java +++ b/infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanRemoteClient.java @@ -17,20 +17,21 @@ package com.yahoo.ycsb.db; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.Vector; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.StringByteIterator; import org.infinispan.client.hotrod.RemoteCache; import org.infinispan.client.hotrod.RemoteCacheManager; import org.infinispan.util.logging.Log; import org.infinispan.util.logging.LogFactory; -import com.yahoo.ycsb.ByteIterator; -import com.yahoo.ycsb.DB; -import com.yahoo.ycsb.DBException; -import com.yahoo.ycsb.StringByteIterator; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.Vector; /** * This is a client implementation for Infinispan 5.x in client-server mode. @@ -46,10 +47,6 @@ public class InfinispanRemoteClient extends DB { private static final Log logger = LogFactory.getLog(InfinispanRemoteClient.class); - public InfinispanRemoteClient() { - - } - @Override public void init() throws DBException { remoteIspnManager = RemoteCacheManagerHolder.getInstance(getProperties()); @@ -63,7 +60,7 @@ public class InfinispanRemoteClient extends DB { } @Override - public int insert(String table, String recordKey, HashMap<String, ByteIterator> values) { + public Status insert(String table, String recordKey, HashMap<String, ByteIterator> values) { String compositKey = createKey(table, recordKey); Map<String, String> stringValues = new HashMap<String,String>(); StringByteIterator.putAllAsStrings(stringValues, values); @@ -76,7 +73,7 @@ public class InfinispanRemoteClient extends DB { } @Override - public int read(String table, String recordKey, Set<String> fields, HashMap<String, ByteIterator> result) { + public Status read(String table, String recordKey, Set<String> fields, HashMap<String, ByteIterator> result) { String compositKey = createKey(table, recordKey); try { Map<String, String> values = cache().get(compositKey); @@ -103,13 +100,13 @@ public class InfinispanRemoteClient extends DB { } @Override - public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { logger.warn("Infinispan does not support scan semantics"); - return Status.NOT_SUPPORT; + return Status.NOT_IMPLEMENTED; } @Override - public int update(String table, String recordKey, HashMap<String, ByteIterator> values) { + public Status update(String table, String recordKey, HashMap<String, ByteIterator> values) { String compositKey = createKey(table, recordKey); try { Map<String, String> stringValues = new HashMap<String, String>(); @@ -121,7 +118,7 @@ public class InfinispanRemoteClient extends DB { } } @Override - public int delete(String table, String recordKey) { + public Status delete(String table, String recordKey) { String compositKey = createKey(table, recordKey); try { cache().remove(compositKey); diff --git a/jdbc/README.md b/jdbc/README.md new file mode 100644 index 0000000000000000000000000000000000000000..841375a8a809a7cb6ee813dc9c9c8882e1845722 --- /dev/null +++ b/jdbc/README.md @@ -0,0 +1,105 @@ +<!-- +Copyright (c) 2015 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. +--> + +# JDBC Driver for YCSB +This driver enables YCSB to work with databases accessible via the JDBC protocol. + +## Getting Started +### 1. Start your database +This driver will connect to databases that use the JDBC protocol, please refer to your databases documentation on information on how to install, configure and start your system. + +### 2. Set up YCSB +You can clone the YCSB project and compile it to stay up to date with the latest changes. Or you can just download the latest release and unpack it. Either way, instructions for doing so can be found here: https://github.com/brianfrankcooper/YCSB. + +### 3. Configure your database and table. +You can name your database what ever you want, you will need to provide the database name in the JDBC connection string. + +You can name your table whatever you like also, but it needs to be specified using the YCSB core properties, the default is to just use 'usertable' as the table name. + +The expected table schema will look similar to the following, syntactical differences may exist with your specific database: + +```sql +CREATE TABLE usertable ( + YCSB_KEY VARCHAR(255) PRIMARY KEY, + FIELD0 TEXT, FIELD1 TEXT, + FIELD2 TEXT, FIELD3 TEXT, + FIELD4 TEXT, FIELD5 TEXT, + FIELD6 TEXT, FIELD7 TEXT, + FIELD8 TEXT, FIELD9 TEXT +); +``` + +Key take aways: + +* The primary key field needs to be named YCSB_KEY +* The other fields need to be prefixed with FIELD and count up starting from 1 +* Add the same number of FIELDs as you specify in the YCSB core properties, default is 10. +* The type of the fields is not so important as long as they can accept strings of the length that you specify in the YCSB core properties, default is 100. + +#### JdbcDBCreateTable Utility +YCSB has a utility to help create your SQL table. NOTE: It does not support all databases flavors, if it does not work for you, you will have to create your table manually with the schema given above. An example usage of the utility: + +```sh +java -cp YCSB_HOME/jdbc-binding/lib/jdbc-binding-0.4.0.jar:mysql-connector-java-5.1.37-bin.jar com.yahoo.ycsb.db.JdbcDBCreateTable -P testworkload -P db.properties -n usertable +``` + +Hint: you need to include your Driver jar in the classpath as well as specify your loading options via a workload file, JDBC connection information, and a table name with ```-n```. + +Simply executing the JdbcDBCreateTable class without any other parameters will print out usage information. + +### 4. Configure YCSB connection properties +You need to set the following connection configurations: + +```sh +db.driver=com.mysql.jdbc.Driver +db.url=jdbc:mysql://127.0.0.1:3306/ycsb +db.user=admin +db.passwd=admin +``` + +Be sure to use your driver class, a valid JDBC connection string, and credentials to your database. + +You can add these to your workload configuration or a separate properties file and specify it with ```-P``` or you can add the properties individually to your ycsb command with ```-p```. + +### 5. Add your JDBC Driver to the classpath +There are several ways to do this, but a couple easy methods are to put a copy of your Driver jar in ```YCSB_HOME/jdbc-binding/lib/``` or just specify the path to your Driver jar with ```-cp``` in your ycsb command. + +### 6. Running a workload +Before you can actually run the workload, you need to "load" the data first. + +```sh +bin/ycsb load jdbc -P workloads/workloada -P db.properties -cp mysql-connector-java.jar +``` + +Then, you can run the workload: + +```sh +bin/ycsb run jdbc -P workloads/workloada -P db.properties -cp mysql-connector-java.jar +``` + +## Configuration Properties + +```sh +db.driver=com.mysql.jdbc.Driver # The JDBC driver class to use. +db.url=jdbc:mysql://127.0.0.1:3306/ycsb # The Database connection URL. +db.user=admin # User name for the connection. +db.passwd=admin # Password for the connection. +jdbc.fetchsize=10 # The JDBC fetch size hinted to the driver. +jdbc.autocommit=true # The JDBC connection auto-commit property for the driver. +``` + +Please refer to https://github.com/brianfrankcooper/YCSB/wiki/Core-Properties for all other YCSB core properties. diff --git a/jdbc/pom.xml b/jdbc/pom.xml index 2c53b016c50a352670939513ecb4ea8aaf1b6fe7..2c8337ba80279995cd8e9f37284f120b8e51b8e7 100644 --- a/jdbc/pom.xml +++ b/jdbc/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> @@ -41,5 +41,17 @@ LICENSE file. <version>${project.version}</version> <scope>provided</scope> </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.hsqldb</groupId> + <artifactId>hsqldb</artifactId> + <version>2.3.3</version> + <scope>test</scope> + </dependency> </dependencies> </project> diff --git a/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBCli.java b/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBCli.java index d736eaf85f63dbec8e95dee4b45300fb7bdff363..fc3b67be09edec624b0bf2526791dcdb71cefc0c 100644 --- a/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBCli.java +++ b/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBCli.java @@ -1,17 +1,17 @@ /** - * Copyright (c) 2010 Yahoo! Inc. 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 + * Copyright (c) 2010 - 2016 Yahoo! Inc. 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. */ package com.yahoo.ycsb.db; @@ -29,32 +29,30 @@ import java.util.Properties; * Execute a JDBC command line. * * @author sudipto - * */ -public class JdbcDBCli implements JdbcDBClientConstants { - +public final class JdbcDBCli { + private static void usageMessage() { System.out.println("JdbcCli. Options:"); System.out.println(" -p key=value properties defined."); System.out.println(" -P location of the properties file to load."); System.out.println(" -c SQL command to execute."); } - - private static void executeCommand(Properties props, String sql) - throws SQLException { - String driver = props.getProperty(DRIVER_CLASS); - String username = props.getProperty(CONNECTION_USER); - String password = props.getProperty(CONNECTION_PASSWD, ""); - String url = props.getProperty(CONNECTION_URL); + + private static void executeCommand(Properties props, String sql) throws SQLException { + String driver = props.getProperty(JdbcDBClient.DRIVER_CLASS); + String username = props.getProperty(JdbcDBClient.CONNECTION_USER); + String password = props.getProperty(JdbcDBClient.CONNECTION_PASSWD, ""); + String url = props.getProperty(JdbcDBClient.CONNECTION_URL); if (driver == null || username == null || url == null) { throw new SQLException("Missing connection information."); } - + Connection conn = null; - + try { Class.forName(driver); - + conn = DriverManager.getConnection(url, username, password); Statement stmt = conn.createStatement(); stmt.execute(sql); @@ -73,12 +71,12 @@ public class JdbcDBCli implements JdbcDBClientConstants { * @param args */ public static void main(String[] args) { - + if (args.length == 0) { usageMessage(); System.exit(0); } - + Properties props = new Properties(); Properties fileprops = new Properties(); String sql = null; @@ -105,8 +103,7 @@ public class JdbcDBCli implements JdbcDBClientConstants { // Issue #5 - remove call to stringPropertyNames to make compilable // under Java 1.5 - for (Enumeration<?> e = myfileprops.propertyNames(); e - .hasMoreElements();) { + for (Enumeration<?> e = myfileprops.propertyNames(); e.hasMoreElements();) { String prop = (String) e.nextElement(); fileprops.setProperty(prop, myfileprops.getProperty(prop)); @@ -160,13 +157,13 @@ public class JdbcDBCli implements JdbcDBClientConstants { fileprops.setProperty(prop, props.getProperty(prop)); } - + if (sql == null) { System.err.println("Missing command."); usageMessage(); System.exit(1); } - + try { executeCommand(fileprops, sql); } catch (SQLException e) { @@ -175,4 +172,10 @@ public class JdbcDBCli implements JdbcDBClientConstants { } } + /** + * Hidden constructor. + */ + private JdbcDBCli() { + super(); + } } diff --git a/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClient.java b/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClient.java index c800ff0ae07cb3b5e8a17011b5334ead46138b32..f6d5c3e2426df8f8e85b03883023ec197c3632f1 100644 --- a/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClient.java +++ b/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClient.java @@ -1,25 +1,25 @@ /** - * Copyright (c) 2010 Yahoo! Inc. 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 + * Copyright (c) 2010 - 2016 Yahoo! Inc. 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. */ - package com.yahoo.ycsb.db; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.Status; import com.yahoo.ycsb.StringByteIterator; import java.sql.*; @@ -28,54 +28,96 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; /** - * A class that wraps a JDBC compliant database to allow it to be interfaced with YCSB. - * This class extends {@link DB} and implements the database interface used by YCSB client. + * A class that wraps a JDBC compliant database to allow it to be interfaced + * with YCSB. This class extends {@link DB} and implements the database + * interface used by YCSB client. * - * <br> Each client will have its own instance of this class. This client is - * not thread safe. + * <br> + * Each client will have its own instance of this class. This client is not + * thread safe. * - * <br> This interface expects a schema <key> <field1> <field2> <field3> ... - * All attributes are of type VARCHAR. All accesses are through the primary key. Therefore, - * only one index on the primary key is needed. - * - * <p> The following options must be passed when using this database client. - * - * <ul> - * <li><b>db.driver</b> The JDBC driver class to use.</li> - * <li><b>db.url</b> The Database connection URL.</li> - * <li><b>db.user</b> User name for the connection.</li> - * <li><b>db.passwd</b> Password for the connection.</li> - * </ul> - * - * @author sudipto - * + * <br> + * This interface expects a schema <key> <field1> <field2> <field3> ... All + * attributes are of type VARCHAR. All accesses are through the primary key. + * Therefore, only one index on the primary key is needed. */ -public class JdbcDBClient extends DB implements JdbcDBClientConstants { - +public class JdbcDBClient extends DB { + + /** The class to use as the jdbc driver. */ + public static final String DRIVER_CLASS = "db.driver"; + + /** The URL to connect to the database. */ + public static final String CONNECTION_URL = "db.url"; + + /** The user name to use to connect to the database. */ + public static final String CONNECTION_USER = "db.user"; + + /** The password to use for establishing the connection. */ + public static final String CONNECTION_PASSWD = "db.passwd"; + + /** The JDBC fetch size hinted to the driver. */ + public static final String JDBC_FETCH_SIZE = "jdbc.fetchsize"; + + /** The JDBC connection auto-commit property for the driver. */ + public static final String JDBC_AUTO_COMMIT = "jdbc.autocommit"; + + /** The name of the property for the number of fields in a record. */ + public static final String FIELD_COUNT_PROPERTY = "fieldcount"; + + /** Default number of fields in a record. */ + public static final String FIELD_COUNT_PROPERTY_DEFAULT = "10"; + + /** Representing a NULL value. */ + public static final String NULL_VALUE = "NULL"; + + /** The primary key in the user table. */ + public static final String PRIMARY_KEY = "YCSB_KEY"; + + /** The field name prefix in the table. */ + public static final String COLUMN_PREFIX = "FIELD"; + private ArrayList<Connection> conns; private boolean initialized = false; private Properties props; private Integer jdbcFetchSize; private static final String DEFAULT_PROP = ""; private ConcurrentMap<StatementType, PreparedStatement> cachedStatements; - + + /** + * Ordered field information for insert and update statements. + */ + private static class OrderedFieldInfo { + private String fieldKeys; + private List<String> fieldValues; + + OrderedFieldInfo(String fieldKeys, List<String> fieldValues) { + this.fieldKeys = fieldKeys; + this.fieldValues = fieldValues; + } + + String getFieldKeys() { + return fieldKeys; + } + + List<String> getFieldValues() { + return fieldValues; + } + } + /** * The statement type for the prepared statements. */ private static class StatementType { - + enum Type { - INSERT(1), - DELETE(2), - READ(3), - UPDATE(4), - SCAN(5), - ; - int internalType; + INSERT(1), DELETE(2), READ(3), UPDATE(4), SCAN(5); + + private final int internalType; + private Type(int type) { internalType = type; } - + int getHashCode() { final int prime = 31; int result = 1; @@ -83,17 +125,19 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { return result; } } - - Type type; - int shardIndex; - int numFields; - String tableName; - - StatementType(Type type, String tableName, int numFields, int _shardIndex) { + + private Type type; + private int shardIndex; + private int numFields; + private String tableName; + private String fieldString; + + StatementType(Type type, String tableName, int numFields, String fieldString, int shardIndex) { this.type = type; this.tableName = tableName; this.numFields = numFields; - this.shardIndex = _shardIndex; + this.fieldString = fieldString; + this.shardIndex = shardIndex; } @Override @@ -101,229 +145,238 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { final int prime = 31; int result = 1; result = prime * result + numFields + 100 * shardIndex; - result = prime * result - + ((tableName == null) ? 0 : tableName.hashCode()); + result = prime * result + ((tableName == null) ? 0 : tableName.hashCode()); result = prime * result + ((type == null) ? 0 : type.getHashCode()); return result; } @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } StatementType other = (StatementType) obj; - if (numFields != other.numFields) + if (numFields != other.numFields) { return false; - if (shardIndex != other.shardIndex) + } + if (shardIndex != other.shardIndex) { return false; + } if (tableName == null) { - if (other.tableName != null) + if (other.tableName != null) { return false; - } else if (!tableName.equals(other.tableName)) + } + } else if (!tableName.equals(other.tableName)) { return false; - if (type != other.type) + } + if (type != other.type) { return false; + } + if (!fieldString.equals(other.fieldString)) { + return false; + } return true; } } - /** - * For the given key, returns what shard contains data for this key - * - * @param key Data key to do operation on - * @return Shard index - */ - private int getShardIndexByKey(String key) { - int ret = Math.abs(key.hashCode()) % conns.size(); - //System.out.println(conns.size() + ": Shard instance for "+ key + " (hash " + key.hashCode()+ " ) " + " is " + ret); - return ret; + /** + * For the given key, returns what shard contains data for this key. + * + * @param key Data key to do operation on + * @return Shard index + */ + private int getShardIndexByKey(String key) { + int ret = Math.abs(key.hashCode()) % conns.size(); + return ret; + } + + /** + * For the given key, returns Connection object that holds connection to the + * shard that contains this key. + * + * @param key Data key to get information for + * @return Connection object + */ + private Connection getShardConnectionByKey(String key) { + return conns.get(getShardIndexByKey(key)); + } + + private void cleanupAllConnections() throws SQLException { + for (Connection conn : conns) { + conn.close(); } + } - /** - * For the given key, returns Connection object that holds connection - * to the shard that contains this key - * - * @param key Data key to get information for - * @return Connection object - */ - private Connection getShardConnectionByKey(String key) { - return conns.get(getShardIndexByKey(key)); + @Override + public void init() throws DBException { + if (initialized) { + System.err.println("Client connection already initialized."); + return; } + props = getProperties(); + String urls = props.getProperty(CONNECTION_URL, DEFAULT_PROP); + String user = props.getProperty(CONNECTION_USER, DEFAULT_PROP); + String passwd = props.getProperty(CONNECTION_PASSWD, DEFAULT_PROP); + String driver = props.getProperty(DRIVER_CLASS); - private void cleanupAllConnections() throws SQLException { - for(Connection conn: conns) { - conn.close(); - } + String jdbcFetchSizeStr = props.getProperty(JDBC_FETCH_SIZE); + if (jdbcFetchSizeStr != null) { + try { + this.jdbcFetchSize = Integer.parseInt(jdbcFetchSizeStr); + } catch (NumberFormatException nfe) { + System.err.println("Invalid JDBC fetch size specified: " + jdbcFetchSizeStr); + throw new DBException(nfe); + } } - - /** - * Initialize the database connection and set it up for sending requests to the database. - * This must be called once per client. - * @throws - */ - @Override - public void init() throws DBException { - if (initialized) { - System.err.println("Client connection already initialized."); - return; - } - props = getProperties(); - String urls = props.getProperty(CONNECTION_URL, DEFAULT_PROP); - String user = props.getProperty(CONNECTION_USER, DEFAULT_PROP); - String passwd = props.getProperty(CONNECTION_PASSWD, DEFAULT_PROP); - String driver = props.getProperty(DRIVER_CLASS); - - String jdbcFetchSizeStr = props.getProperty(JDBC_FETCH_SIZE); - if (jdbcFetchSizeStr != null) { - try { - this.jdbcFetchSize = Integer.parseInt(jdbcFetchSizeStr); - } catch (NumberFormatException nfe) { - System.err.println("Invalid JDBC fetch size specified: " + jdbcFetchSizeStr); - throw new DBException(nfe); - } + + String autoCommitStr = props.getProperty(JDBC_AUTO_COMMIT, Boolean.TRUE.toString()); + Boolean autoCommit = Boolean.parseBoolean(autoCommitStr); + + try { + if (driver != null) { + Class.forName(driver); } + int shardCount = 0; + conns = new ArrayList<Connection>(3); + for (String url : urls.split(",")) { + System.out.println("Adding shard node URL: " + url); + Connection conn = DriverManager.getConnection(url, user, passwd); - String autoCommitStr = props.getProperty(JDBC_AUTO_COMMIT, Boolean.TRUE.toString()); - Boolean autoCommit = Boolean.parseBoolean(autoCommitStr); + // Since there is no explicit commit method in the DB interface, all + // operations should auto commit, except when explicitly told not to + // (this is necessary in cases such as for PostgreSQL when running a + // scan workload with fetchSize) + conn.setAutoCommit(autoCommit); - try { - if (driver != null) { - Class.forName(driver); - } - int shardCount = 0; - conns = new ArrayList<Connection>(3); - for (String url: urls.split(",")) { - System.out.println("Adding shard node URL: " + url); - Connection conn = DriverManager.getConnection(url, user, passwd); - - // Since there is no explicit commit method in the DB interface, all - // operations should auto commit, except when explicitly told not to - // (this is necessary in cases such as for PostgreSQL when running a - // scan workload with fetchSize) - conn.setAutoCommit(autoCommit); - - shardCount++; - conns.add(conn); - } + shardCount++; + conns.add(conn); + } - System.out.println("Using " + shardCount + " shards"); + System.out.println("Using " + shardCount + " shards"); - cachedStatements = new ConcurrentHashMap<StatementType, PreparedStatement>(); - } catch (ClassNotFoundException e) { - System.err.println("Error in initializing the JDBS driver: " + e); - throw new DBException(e); - } catch (SQLException e) { - System.err.println("Error in database operation: " + e); + cachedStatements = new ConcurrentHashMap<StatementType, PreparedStatement>(); + } catch (ClassNotFoundException e) { + System.err.println("Error in initializing the JDBS driver: " + e); + throw new DBException(e); + } catch (SQLException e) { + System.err.println("Error in database operation: " + e); throw new DBException(e); } catch (NumberFormatException e) { System.err.println("Invalid value for fieldcount property. " + e); throw new DBException(e); } - initialized = true; - } - + initialized = true; + } + @Override - public void cleanup() throws DBException { - try { + public void cleanup() throws DBException { + try { cleanupAllConnections(); } catch (SQLException e) { System.err.println("Error in closing the connection. " + e); throw new DBException(e); } - } - - private PreparedStatement createAndCacheInsertStatement(StatementType insertType, String key) - throws SQLException { - StringBuilder insert = new StringBuilder("INSERT INTO "); - insert.append(insertType.tableName); - insert.append(" VALUES(?"); + } + + private PreparedStatement createAndCacheInsertStatement(StatementType insertType, String key) throws SQLException { + StringBuilder insert = new StringBuilder("INSERT INTO "); + insert.append(insertType.tableName); + insert.append(" (" + PRIMARY_KEY + "," + insertType.fieldString + ")"); + insert.append(" VALUES(?"); for (int i = 0; i < insertType.numFields; i++) { insert.append(",?"); } - insert.append(");"); + insert.append(")"); PreparedStatement insertStatement = getShardConnectionByKey(key).prepareStatement(insert.toString()); PreparedStatement stmt = cachedStatements.putIfAbsent(insertType, insertStatement); - if (stmt == null) return insertStatement; - else return stmt; - } - - private PreparedStatement createAndCacheReadStatement(StatementType readType, String key) - throws SQLException { + if (stmt == null) { + return insertStatement; + } + return stmt; + } + + private PreparedStatement createAndCacheReadStatement(StatementType readType, String key) throws SQLException { StringBuilder read = new StringBuilder("SELECT * FROM "); read.append(readType.tableName); read.append(" WHERE "); read.append(PRIMARY_KEY); read.append(" = "); - read.append("?;"); + read.append("?"); PreparedStatement readStatement = getShardConnectionByKey(key).prepareStatement(read.toString()); PreparedStatement stmt = cachedStatements.putIfAbsent(readType, readStatement); - if (stmt == null) return readStatement; - else return stmt; + if (stmt == null) { + return readStatement; + } + return stmt; } - - private PreparedStatement createAndCacheDeleteStatement(StatementType deleteType, String key) - throws SQLException { + + private PreparedStatement createAndCacheDeleteStatement(StatementType deleteType, String key) throws SQLException { StringBuilder delete = new StringBuilder("DELETE FROM "); delete.append(deleteType.tableName); delete.append(" WHERE "); delete.append(PRIMARY_KEY); - delete.append(" = ?;"); + delete.append(" = ?"); PreparedStatement deleteStatement = getShardConnectionByKey(key).prepareStatement(delete.toString()); PreparedStatement stmt = cachedStatements.putIfAbsent(deleteType, deleteStatement); - if (stmt == null) return deleteStatement; - else return stmt; + if (stmt == null) { + return deleteStatement; + } + return stmt; } - - private PreparedStatement createAndCacheUpdateStatement(StatementType updateType, String key) - throws SQLException { + + private PreparedStatement createAndCacheUpdateStatement(StatementType updateType, String key) throws SQLException { + String[] fieldKeys = updateType.fieldString.split(","); StringBuilder update = new StringBuilder("UPDATE "); update.append(updateType.tableName); update.append(" SET "); - for (int i = 1; i <= updateType.numFields; i++) { - update.append(COLUMN_PREFIX); - update.append(i); + for (int i = 0; i < fieldKeys.length; i++) { + update.append(fieldKeys[i]); update.append("=?"); - if (i < updateType.numFields) update.append(", "); + if (i < fieldKeys.length - 1) { + update.append(", "); + } } update.append(" WHERE "); update.append(PRIMARY_KEY); - update.append(" = ?;"); + update.append(" = ?"); PreparedStatement insertStatement = getShardConnectionByKey(key).prepareStatement(update.toString()); PreparedStatement stmt = cachedStatements.putIfAbsent(updateType, insertStatement); - if (stmt == null) return insertStatement; - else return stmt; + if (stmt == null) { + return insertStatement; + } + return stmt; } - - private PreparedStatement createAndCacheScanStatement(StatementType scanType, String key) - throws SQLException { - StringBuilder select = new StringBuilder("SELECT * FROM "); + + private PreparedStatement createAndCacheScanStatement(StatementType scanType, String key) throws SQLException { + StringBuilder select = new StringBuilder("SELECT * FROM "); select.append(scanType.tableName); select.append(" WHERE "); select.append(PRIMARY_KEY); - select.append(" >= "); - select.append("?;"); + select.append(" >= ?"); + select.append(" ORDER BY "); + select.append(PRIMARY_KEY); + select.append(" LIMIT ?"); PreparedStatement scanStatement = getShardConnectionByKey(key).prepareStatement(select.toString()); - if (this.jdbcFetchSize != null) scanStatement.setFetchSize(this.jdbcFetchSize); + if (this.jdbcFetchSize != null) { + scanStatement.setFetchSize(this.jdbcFetchSize); + } PreparedStatement stmt = cachedStatements.putIfAbsent(scanType, scanStatement); - if (stmt == null) return scanStatement; - else return stmt; + if (stmt == null) { + return scanStatement; + } + return stmt; } - @Override - public int read(String tableName, String key, Set<String> fields, - HashMap<String, ByteIterator> result) { - if (tableName == null) { - return -1; - } - if (key == null) { - return -1; - } + @Override + public Status read(String tableName, String key, Set<String> fields, HashMap<String, ByteIterator> result) { try { - StatementType type = new StatementType(StatementType.Type.READ, tableName, 1, getShardIndexByKey(key)); + StatementType type = new StatementType(StatementType.Type.READ, tableName, 1, "", getShardIndexByKey(key)); PreparedStatement readStatement = cachedStatements.get(type); if (readStatement == null) { readStatement = createAndCacheReadStatement(type, key); @@ -332,7 +385,7 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { ResultSet resultSet = readStatement.executeQuery(); if (!resultSet.next()) { resultSet.close(); - return 1; + return Status.NOT_FOUND; } if (result != null && fields != null) { for (String field : fields) { @@ -341,29 +394,24 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { } } resultSet.close(); - return SUCCESS; + return Status.OK; } catch (SQLException e) { - System.err.println("Error in processing read of table " + tableName + ": "+e); - return -2; + System.err.println("Error in processing read of table " + tableName + ": " + e); + return Status.ERROR; } - } + } - @Override - public int scan(String tableName, String startKey, int recordcount, - Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { - if (tableName == null) { - return -1; - } - if (startKey == null) { - return -1; - } + @Override + public Status scan(String tableName, String startKey, int recordcount, Set<String> fields, + Vector<HashMap<String, ByteIterator>> result) { try { - StatementType type = new StatementType(StatementType.Type.SCAN, tableName, 1, getShardIndexByKey(startKey)); + StatementType type = new StatementType(StatementType.Type.SCAN, tableName, 1, "", getShardIndexByKey(startKey)); PreparedStatement scanStatement = cachedStatements.get(type); if (scanStatement == null) { scanStatement = createAndCacheScanStatement(type, startKey); } scanStatement.setString(1, startKey); + scanStatement.setInt(2, recordcount); ResultSet resultSet = scanStatement.executeQuery(); for (int i = 0; i < recordcount && resultSet.next(); i++) { if (result != null && fields != null) { @@ -376,93 +424,100 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { } } resultSet.close(); - return SUCCESS; + return Status.OK; } catch (SQLException e) { System.err.println("Error in processing scan of table: " + tableName + e); - return -2; + return Status.ERROR; } - } + } - @Override - public int update(String tableName, String key, HashMap<String, ByteIterator> values) { - if (tableName == null) { - return -1; - } - if (key == null) { - return -1; - } + @Override + public Status update(String tableName, String key, HashMap<String, ByteIterator> values) { try { int numFields = values.size(); - StatementType type = new StatementType(StatementType.Type.UPDATE, tableName, numFields, getShardIndexByKey(key)); + OrderedFieldInfo fieldInfo = getFieldInfo(values); + StatementType type = new StatementType(StatementType.Type.UPDATE, tableName, + numFields, fieldInfo.getFieldKeys(), getShardIndexByKey(key)); PreparedStatement updateStatement = cachedStatements.get(type); if (updateStatement == null) { updateStatement = createAndCacheUpdateStatement(type, key); } int index = 1; - for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { - updateStatement.setString(index++, entry.getValue().toString()); + for (String value: fieldInfo.getFieldValues()) { + updateStatement.setString(index++, value); } updateStatement.setString(index, key); int result = updateStatement.executeUpdate(); - if (result == 1) return SUCCESS; - else return 1; + if (result == 1) { + return Status.OK; + } + return Status.UNEXPECTED_STATE; } catch (SQLException e) { System.err.println("Error in processing update to table: " + tableName + e); - return -1; + return Status.ERROR; } - } - - @Override - public int insert(String tableName, String key, HashMap<String, ByteIterator> values) { - if (tableName == null) { - return -1; - } - if (key == null) { - return -1; - } - try { - int numFields = values.size(); - StatementType type = new StatementType(StatementType.Type.INSERT, tableName, numFields, getShardIndexByKey(key)); - PreparedStatement insertStatement = cachedStatements.get(type); - if (insertStatement == null) { - insertStatement = createAndCacheInsertStatement(type, key); - } + } + + @Override + public Status insert(String tableName, String key, HashMap<String, ByteIterator> values) { + try { + int numFields = values.size(); + OrderedFieldInfo fieldInfo = getFieldInfo(values); + StatementType type = new StatementType(StatementType.Type.INSERT, tableName, + numFields, fieldInfo.getFieldKeys(), getShardIndexByKey(key)); + PreparedStatement insertStatement = cachedStatements.get(type); + if (insertStatement == null) { + insertStatement = createAndCacheInsertStatement(type, key); + } insertStatement.setString(1, key); int index = 2; - for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { - String field = entry.getValue().toString(); - insertStatement.setString(index++, field); + for (String value: fieldInfo.getFieldValues()) { + insertStatement.setString(index++, value); } int result = insertStatement.executeUpdate(); - if (result == 1) return SUCCESS; - else return 1; + if (result == 1) { + return Status.OK; + } + return Status.UNEXPECTED_STATE; } catch (SQLException e) { System.err.println("Error in processing insert to table: " + tableName + e); - return -1; + return Status.ERROR; } - } + } - @Override - public int delete(String tableName, String key) { - if (tableName == null) { - return -1; - } - if (key == null) { - return -1; - } + @Override + public Status delete(String tableName, String key) { try { - StatementType type = new StatementType(StatementType.Type.DELETE, tableName, 1, getShardIndexByKey(key)); + StatementType type = new StatementType(StatementType.Type.DELETE, tableName, 1, "", getShardIndexByKey(key)); PreparedStatement deleteStatement = cachedStatements.get(type); if (deleteStatement == null) { deleteStatement = createAndCacheDeleteStatement(type, key); } deleteStatement.setString(1, key); int result = deleteStatement.executeUpdate(); - if (result == 1) return SUCCESS; - else return 1; + if (result == 1) { + return Status.OK; + } + return Status.UNEXPECTED_STATE; } catch (SQLException e) { System.err.println("Error in processing delete to table: " + tableName + e); - return -1; + return Status.ERROR; } - } -} + } + + private OrderedFieldInfo getFieldInfo(HashMap<String, ByteIterator> values) { + String fieldKeys = ""; + List<String> fieldValues = new ArrayList(); + int count = 0; + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { + fieldKeys += entry.getKey(); + if (count < values.size() - 1) { + fieldKeys += ","; + } + fieldValues.add(count, entry.getValue().toString()); + count++; + } + + return new OrderedFieldInfo(fieldKeys, fieldValues); + } +} \ No newline at end of file diff --git a/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClientConstants.java b/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClientConstants.java deleted file mode 100644 index 120cb6452758ab21f8c425fc11b4c96f1bed59ea..0000000000000000000000000000000000000000 --- a/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClientConstants.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) 2010 Yahoo! Inc. 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. - */ -package com.yahoo.ycsb.db; - -/** - * Constants used by the JDBC client. - * - * @author sudipto - * - */ -public interface JdbcDBClientConstants { - - /** The class to use as the jdbc driver. */ - public static final String DRIVER_CLASS = "db.driver"; - - /** The URL to connect to the database. */ - public static final String CONNECTION_URL = "db.url"; - - /** The user name to use to connect to the database. */ - public static final String CONNECTION_USER = "db.user"; - - /** The password to use for establishing the connection. */ - public static final String CONNECTION_PASSWD = "db.passwd"; - - /** The JDBC fetch size hinted to the driver. */ - public static final String JDBC_FETCH_SIZE = "jdbc.fetchsize"; - - /** The JDBC connection auto-commit property for the driver. */ - public static final String JDBC_AUTO_COMMIT = "jdbc.autocommit"; - - /** The name of the property for the number of fields in a record. */ - public static final String FIELD_COUNT_PROPERTY="fieldcount"; - - /** Default number of fields in a record. */ - public static final String FIELD_COUNT_PROPERTY_DEFAULT="10"; - - /** Representing a NULL value. */ - public static final String NULL_VALUE = "NULL"; - - /** The code to return when the call succeeds. */ - public static final int SUCCESS = 0; - - /** The primary key in the user table.*/ - public static String PRIMARY_KEY = "YCSB_KEY"; - - /** The field name prefix in the table.*/ - public static String COLUMN_PREFIX = "FIELD"; -} diff --git a/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBCreateTable.java b/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBCreateTable.java index 7416d05a4f1abb5cf8cf6c09f47561818da862f8..fbeba3c8325f3d3b900253e36b1958a9fd3c868e 100644 --- a/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBCreateTable.java +++ b/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBCreateTable.java @@ -1,17 +1,17 @@ /** - * Copyright (c) 2010 Yahoo! Inc. 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 + * Copyright (c) 2010 - 2016 Yahoo! Inc. 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. */ package com.yahoo.ycsb.db; @@ -29,9 +29,8 @@ import java.util.Properties; * Utility class to create the table to be used by the benchmark. * * @author sudipto - * */ -public class JdbcDBCreateTable implements JdbcDBClientConstants { +public final class JdbcDBCreateTable { private static void usageMessage() { System.out.println("Create Table Client. Options:"); @@ -40,47 +39,46 @@ public class JdbcDBCreateTable implements JdbcDBClientConstants { System.out.println(" -n name of the table."); System.out.println(" -f number of fields (default 10)."); } - - private static void createTable(Properties props, String tablename) - throws SQLException { - String driver = props.getProperty(DRIVER_CLASS); - String username = props.getProperty(CONNECTION_USER); - String password = props.getProperty(CONNECTION_PASSWD, ""); - String url = props.getProperty(CONNECTION_URL); - int fieldcount = Integer.parseInt(props.getProperty(FIELD_COUNT_PROPERTY, - FIELD_COUNT_PROPERTY_DEFAULT)); - + + private static void createTable(Properties props, String tablename) throws SQLException { + String driver = props.getProperty(JdbcDBClient.DRIVER_CLASS); + String username = props.getProperty(JdbcDBClient.CONNECTION_USER); + String password = props.getProperty(JdbcDBClient.CONNECTION_PASSWD, ""); + String url = props.getProperty(JdbcDBClient.CONNECTION_URL); + int fieldcount = Integer.parseInt(props.getProperty(JdbcDBClient.FIELD_COUNT_PROPERTY, + JdbcDBClient.FIELD_COUNT_PROPERTY_DEFAULT)); + if (driver == null || username == null || url == null) { throw new SQLException("Missing connection information."); } - + Connection conn = null; - + try { Class.forName(driver); - + conn = DriverManager.getConnection(url, username, password); Statement stmt = conn.createStatement(); - + StringBuilder sql = new StringBuilder("DROP TABLE IF EXISTS "); sql.append(tablename); sql.append(";"); - + stmt.execute(sql.toString()); - + sql = new StringBuilder("CREATE TABLE "); sql.append(tablename); sql.append(" (KEY VARCHAR PRIMARY KEY"); - + for (int idx = 0; idx < fieldcount; idx++) { sql.append(", FIELD"); sql.append(idx); sql.append(" VARCHAR"); } sql.append(");"); - + stmt.execute(sql.toString()); - + System.out.println("Table " + tablename + " created.."); } catch (ClassNotFoundException e) { throw new SQLException("JDBC Driver class not found."); @@ -91,17 +89,17 @@ public class JdbcDBCreateTable implements JdbcDBClientConstants { } } } - + /** * @param args */ public static void main(String[] args) { - + if (args.length == 0) { usageMessage(); System.exit(0); } - + String tablename = null; int fieldcount = -1; Properties props = new Properties(); @@ -129,8 +127,7 @@ public class JdbcDBCreateTable implements JdbcDBClientConstants { // Issue #5 - remove call to stringPropertyNames to make compilable // under Java 1.5 - for (Enumeration<?> e = myfileprops.propertyNames(); e - .hasMoreElements();) { + for (Enumeration<?> e = myfileprops.propertyNames(); e.hasMoreElements();) { String prop = (String) e.nextElement(); fileprops.setProperty(prop, myfileprops.getProperty(prop)); @@ -199,17 +196,17 @@ public class JdbcDBCreateTable implements JdbcDBClientConstants { } props = fileprops; - + if (tablename == null) { System.err.println("table name missing."); usageMessage(); System.exit(1); } - + if (fieldcount > 0) { - props.setProperty(FIELD_COUNT_PROPERTY, String.valueOf(fieldcount)); + props.setProperty(JdbcDBClient.FIELD_COUNT_PROPERTY, String.valueOf(fieldcount)); } - + try { createTable(props, tablename); } catch (SQLException e) { @@ -217,4 +214,11 @@ public class JdbcDBCreateTable implements JdbcDBClientConstants { System.exit(1); } } + + /** + * Hidden constructor. + */ + private JdbcDBCreateTable() { + super(); + } } diff --git a/jdbc/src/main/java/com/yahoo/ycsb/db/package-info.java b/jdbc/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..993a8817efc55acde7ede7caff60857bb2397a7f --- /dev/null +++ b/jdbc/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2014 - 2016, Yahoo!, Inc. 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. + */ + +/** + * The YCSB binding for stores that can be accessed via JDBC. + */ +package com.yahoo.ycsb.db; + diff --git a/jdbc/src/main/resources/sql/README b/jdbc/src/main/resources/sql/README deleted file mode 100644 index 3afd7047226914a1480e84b19a21b74153339cca..0000000000000000000000000000000000000000 --- a/jdbc/src/main/resources/sql/README +++ /dev/null @@ -1 +0,0 @@ -Contains all the SQL statements used by the JDBC client. diff --git a/jdbc/src/main/resources/sql/README.md b/jdbc/src/main/resources/sql/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ec41b86c04750354fd3e0abd93fc7d9a8c43fa0d --- /dev/null +++ b/jdbc/src/main/resources/sql/README.md @@ -0,0 +1,18 @@ +<!-- +Copyright (c) 2015 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. +--> +Contains all the SQL statements used by the JDBC client. diff --git a/jdbc/src/main/resources/sql/create_table.mysql b/jdbc/src/main/resources/sql/create_table.mysql index 7b89e3e5b45280901ac93acbe7ff4276b174ccc8..a88a73afeec0367ae35cb1a148542cf33fddaac6 100644 --- a/jdbc/src/main/resources/sql/create_table.mysql +++ b/jdbc/src/main/resources/sql/create_table.mysql @@ -1,3 +1,18 @@ +-- Copyright (c) 2015 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. + -- Creates a Table. -- Drop the table if it exists; @@ -5,8 +20,8 @@ DROP TABLE IF EXISTS usertable; -- Create the user table with 5 fields. CREATE TABLE usertable(YCSB_KEY VARCHAR (255) PRIMARY KEY, - FIELD1 TEXT, FIELD2 TEXT, - FIELD3 TEXT, FIELD4 TEXT, - FIELD5 TEXT, FIELD6 TEXT, - FIELD7 TEXT, FIELD8 TEXT, - FIELD9 TEXT, FIELD10 TEXT); + FIELD0 TEXT, FIELD1 TEXT, + FIELD2 TEXT, FIELD3 TEXT, + FIELD4 TEXT, FIELD5 TEXT, + FIELD6 TEXT, FIELD7 TEXT, + FIELD8 TEXT, FIELD9 TEXT); diff --git a/jdbc/src/main/resources/sql/create_table.sql b/jdbc/src/main/resources/sql/create_table.sql index c394f26f354c2a411bdfd3e5374e578806836d78..33158accdfe0d7cffc5ca3d7c24fd417a5253db7 100644 --- a/jdbc/src/main/resources/sql/create_table.sql +++ b/jdbc/src/main/resources/sql/create_table.sql @@ -1,3 +1,18 @@ +-- Copyright (c) 2015 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. + -- Creates a Table. -- Drop the table if it exists; @@ -5,8 +20,8 @@ DROP TABLE IF EXISTS usertable; -- Create the user table with 5 fields. CREATE TABLE usertable(YCSB_KEY VARCHAR PRIMARY KEY, - FIELD1 VARCHAR, FIELD2 VARCHAR, - FIELD3 VARCHAR, FIELD4 VARCHAR, - FIELD5 VARCHAR, FIELD6 VARCHAR, - FIELD7 VARCHAR, FIELD8 VARCHAR, - FIELD9 VARCHAR, FIELD10 VARCHAR); + FIELD0 VARCHAR, FIELD1 VARCHAR, + FIELD2 VARCHAR, FIELD3 VARCHAR, + FIELD4 VARCHAR, FIELD5 VARCHAR, + FIELD6 VARCHAR, FIELD7 VARCHAR, + FIELD8 VARCHAR, FIELD9 VARCHAR); diff --git a/jdbc/src/test/java/com/yahoo/ycsb/db/JdbcDBClientTest.java b/jdbc/src/test/java/com/yahoo/ycsb/db/JdbcDBClientTest.java new file mode 100644 index 0000000000000000000000000000000000000000..c3cc3024b547de02b2a96a8abb95f99831076dfc --- /dev/null +++ b/jdbc/src/test/java/com/yahoo/ycsb/db/JdbcDBClientTest.java @@ -0,0 +1,322 @@ +/** + * Copyright (c) 2015 - 2016 Yahoo! Inc. 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. + */ + +package com.yahoo.ycsb.db; + +import static org.junit.Assert.*; + +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.StringByteIterator; +import org.junit.*; + +import java.sql.*; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Properties; +import java.util.Vector; + +public class JdbcDBClientTest { + private static final String TEST_DB_DRIVER = "org.hsqldb.jdbc.JDBCDriver"; + private static final String TEST_DB_URL = "jdbc:hsqldb:mem:ycsb"; + private static final String TEST_DB_USER = "sa"; + private static final String TABLE_NAME = "USERTABLE"; + private static final int FIELD_LENGTH = 32; + private static final String FIELD_PREFIX = "FIELD"; + private static final String KEY_PREFIX = "user"; + private static final String KEY_FIELD = "YCSB_KEY"; + private static final int NUM_FIELDS = 3; + + private static Connection jdbcConnection = null; + private static JdbcDBClient jdbcDBClient = null; + + @BeforeClass + public static void setup() { + try { + jdbcConnection = DriverManager.getConnection(TEST_DB_URL); + jdbcDBClient = new JdbcDBClient(); + + Properties p = new Properties(); + p.setProperty(JdbcDBClient.CONNECTION_URL, TEST_DB_URL); + p.setProperty(JdbcDBClient.DRIVER_CLASS, TEST_DB_DRIVER); + p.setProperty(JdbcDBClient.CONNECTION_USER, TEST_DB_USER); + + jdbcDBClient.setProperties(p); + jdbcDBClient.init(); + } catch (SQLException e) { + e.printStackTrace(); + fail("Could not create local Database"); + } catch (DBException e) { + e.printStackTrace(); + fail("Could not create JdbcDBClient instance"); + } + } + + @AfterClass + public static void teardown() { + try { + if (jdbcConnection != null) { + jdbcConnection.close(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + + try { + if (jdbcDBClient != null) { + jdbcDBClient.cleanup(); + } + } catch (DBException e) { + e.printStackTrace(); + } + } + + @Before + public void prepareTest() { + try { + DatabaseMetaData metaData = jdbcConnection.getMetaData(); + ResultSet tableResults = metaData.getTables(null, null, TABLE_NAME, null); + if (tableResults.next()) { + // If the table already exists, just truncate it + jdbcConnection.prepareStatement( + String.format("TRUNCATE TABLE %s", TABLE_NAME) + ).execute(); + } else { + // If the table does not exist then create it + StringBuilder createString = new StringBuilder( + String.format("CREATE TABLE %s (%s VARCHAR(100) PRIMARY KEY", TABLE_NAME, KEY_FIELD) + ); + for (int i = 0; i < NUM_FIELDS; i++) { + createString.append( + String.format(", %s%d VARCHAR(100)", FIELD_PREFIX, i) + ); + } + createString.append(")"); + jdbcConnection.prepareStatement(createString.toString()).execute(); + } + } catch (SQLException e) { + e.printStackTrace(); + fail("Failed to prepare test"); + } + } + + /* + This is a copy of buildDeterministicValue() from core:com.yahoo.ycsb.workloads.CoreWorkload.java. + That method is neither public nor static so we need a copy. + */ + private String buildDeterministicValue(String key, String fieldkey) { + int size = FIELD_LENGTH; + StringBuilder sb = new StringBuilder(size); + sb.append(key); + sb.append(':'); + sb.append(fieldkey); + while (sb.length() < size) { + sb.append(':'); + sb.append(sb.toString().hashCode()); + } + sb.setLength(size); + + return sb.toString(); + } + + /* + Inserts a row of deterministic values for the given insertKey using the jdbcDBClient. + */ + private HashMap<String, ByteIterator> insertRow(String insertKey) { + HashMap<String, ByteIterator> insertMap = new HashMap<String, ByteIterator>(); + for (int i = 0; i < 3; i++) { + insertMap.put(FIELD_PREFIX + i, new StringByteIterator(buildDeterministicValue(insertKey, FIELD_PREFIX + i))); + } + jdbcDBClient.insert(TABLE_NAME, insertKey, insertMap); + + return insertMap; + } + + @Test + public void insertTest() { + try { + String insertKey = "user0"; + HashMap<String, ByteIterator> insertMap = insertRow(insertKey); + + ResultSet resultSet = jdbcConnection.prepareStatement( + String.format("SELECT * FROM %s", TABLE_NAME) + ).executeQuery(); + + // Check we have a result Row + assertTrue(resultSet.next()); + // Check that all the columns have expected values + assertEquals(resultSet.getString(KEY_FIELD), insertKey); + for (int i = 0; i < 3; i++) { + assertEquals(resultSet.getString(FIELD_PREFIX + i), insertMap.get(FIELD_PREFIX + i).toString()); + } + // Check that we do not have any more rows + assertFalse(resultSet.next()); + + resultSet.close(); + } catch (SQLException e) { + e.printStackTrace(); + fail("Failed insertTest"); + } + } + + @Test + public void updateTest() { + try { + String preupdateString = "preupdate"; + StringBuilder fauxInsertString = new StringBuilder( + String.format("INSERT INTO %s VALUES(?", TABLE_NAME) + ); + for (int i = 0; i < NUM_FIELDS; i++) { + fauxInsertString.append(",?"); + } + fauxInsertString.append(")"); + + PreparedStatement fauxInsertStatement = jdbcConnection.prepareStatement(fauxInsertString.toString()); + for (int i = 2; i < NUM_FIELDS + 2; i++) { + fauxInsertStatement.setString(i, preupdateString); + } + + fauxInsertStatement.setString(1, "user0"); + fauxInsertStatement.execute(); + fauxInsertStatement.setString(1, "user1"); + fauxInsertStatement.execute(); + fauxInsertStatement.setString(1, "user2"); + fauxInsertStatement.execute(); + + HashMap<String, ByteIterator> updateMap = new HashMap<String, ByteIterator>(); + for (int i = 0; i < 3; i++) { + updateMap.put(FIELD_PREFIX + i, new StringByteIterator(buildDeterministicValue("user1", FIELD_PREFIX + i))); + } + + jdbcDBClient.update(TABLE_NAME, "user1", updateMap); + + ResultSet resultSet = jdbcConnection.prepareStatement( + String.format("SELECT * FROM %s ORDER BY %s", TABLE_NAME, KEY_FIELD) + ).executeQuery(); + + // Ensure that user0 record was not changed + resultSet.next(); + assertEquals("Assert first row key is user0", resultSet.getString(KEY_FIELD), "user0"); + for (int i = 0; i < 3; i++) { + assertEquals("Assert first row fields contain preupdateString", resultSet.getString(FIELD_PREFIX + i), preupdateString); + } + + // Check that all the columns have expected values for user1 record + resultSet.next(); + assertEquals(resultSet.getString(KEY_FIELD), "user1"); + for (int i = 0; i < 3; i++) { + assertEquals(resultSet.getString(FIELD_PREFIX + i), updateMap.get(FIELD_PREFIX + i).toString()); + } + + // Ensure that user2 record was not changed + resultSet.next(); + assertEquals("Assert third row key is user2", resultSet.getString(KEY_FIELD), "user2"); + for (int i = 0; i < 3; i++) { + assertEquals("Assert third row fields contain preupdateString", resultSet.getString(FIELD_PREFIX + i), preupdateString); + } + resultSet.close(); + } catch (SQLException e) { + e.printStackTrace(); + fail("Failed updateTest"); + } + } + + @Test + public void readTest() { + String insertKey = "user0"; + HashMap<String, ByteIterator> insertMap = insertRow(insertKey); + HashSet<String> readFields = new HashSet<String>(); + HashMap<String, ByteIterator> readResultMap = new HashMap<String, ByteIterator>(); + + // Test reading a single field + readFields.add("FIELD0"); + jdbcDBClient.read(TABLE_NAME, insertKey, readFields, readResultMap); + assertEquals("Assert that result has correct number of fields", readFields.size(), readResultMap.size()); + for (String field: readFields) { + assertEquals("Assert " + field + " was read correctly", insertMap.get(field).toString(), readResultMap.get(field).toString()); + } + + readResultMap = new HashMap<String, ByteIterator>(); + + // Test reading all fields + readFields.add("FIELD1"); + readFields.add("FIELD2"); + jdbcDBClient.read(TABLE_NAME, insertKey, readFields, readResultMap); + assertEquals("Assert that result has correct number of fields", readFields.size(), readResultMap.size()); + for (String field: readFields) { + assertEquals("Assert " + field + " was read correctly", insertMap.get(field).toString(), readResultMap.get(field).toString()); + } + } + + @Test + public void deleteTest() { + try { + insertRow("user0"); + String deleteKey = "user1"; + insertRow(deleteKey); + insertRow("user2"); + + jdbcDBClient.delete(TABLE_NAME, deleteKey); + + ResultSet resultSet = jdbcConnection.prepareStatement( + String.format("SELECT * FROM %s", TABLE_NAME) + ).executeQuery(); + + int totalRows = 0; + while (resultSet.next()) { + assertNotEquals("Assert this is not the deleted row key", deleteKey, resultSet.getString(KEY_FIELD)); + totalRows++; + } + // Check we do not have a result Row + assertEquals("Assert we ended with the correct number of rows", totalRows, 2); + + resultSet.close(); + } catch (SQLException e) { + e.printStackTrace(); + fail("Failed deleteTest"); + } + } + + @Test + public void scanTest() throws SQLException { + HashMap<String, HashMap<String, ByteIterator>> keyMap = new HashMap<String, HashMap<String, ByteIterator>>(); + for (int i = 0; i < 5; i++) { + String insertKey = KEY_PREFIX + i; + keyMap.put(insertKey, insertRow(insertKey)); + } + HashSet<String> fieldSet = new HashSet<String>(); + fieldSet.add("FIELD0"); + fieldSet.add("FIELD1"); + int startIndex = 1; + int resultRows = 3; + + Vector<HashMap<String, ByteIterator>> resultVector = new Vector<HashMap<String, ByteIterator>>(); + jdbcDBClient.scan(TABLE_NAME, KEY_PREFIX + startIndex, resultRows, fieldSet, resultVector); + + // Check the resultVector is the correct size + assertEquals("Assert the correct number of results rows were returned", resultRows, resultVector.size()); + // Check each vector row to make sure we have the correct fields + int testIndex = startIndex; + for (HashMap<String, ByteIterator> result: resultVector) { + assertEquals("Assert that this row has the correct number of fields", fieldSet.size(), result.size()); + for (String field: fieldSet) { + assertEquals("Assert this field is correct in this row", keyMap.get(KEY_PREFIX + testIndex).get(field).toString(), result.get(field).toString()); + } + testIndex++; + } + } +} diff --git a/kudu/README.md b/kudu/README.md new file mode 100644 index 0000000000000000000000000000000000000000..cd5cffd6387a0d92a8327638a1a1d72c1f70d949 --- /dev/null +++ b/kudu/README.md @@ -0,0 +1,44 @@ +<!-- +Copyright (c) 2015 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. +--> + +# Kudu bindings for YCSB + +[Kudu](http://getkudu.io) is a storage engine that enables fast analytics on fast data. + +## Benchmarking Kudu + +Use the following command line to load the initial data into an existing Kudu cluster with default +configurations. + +``` +bin/ycsb load kudu -P workloads/workloada +``` + +Additional configurations: +* `kudu_master_addresses`: The master's address. The default configuration expects a master on localhost. +* `kudu_pre_split_num_tablets`: The number of tablets (or partitions) to create for the table. The default +uses 4 tablets. A good rule of thumb is to use 5 per tablet server. +* `kudu_table_num_replicas`: The number of replicas that each tablet will have. The default is 3. Should +only be configured to use 1 instead, for single node tests. +* `kudu_sync_ops`: If the client should wait after every write operation. The default is true. +* `kudu_block_size`: The data block size used to configure columns. The default is 4096 bytes. + +Then, you can run the workload: + +``` +bin/ycsb run kudu -P workloads/workloada +``` diff --git a/kudu/pom.xml b/kudu/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..8e2a8586fffe526da38b9981989d7c74ee6a3503 --- /dev/null +++ b/kudu/pom.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (c) 2015-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. +--> + +<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.7.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> + </parent> + + <artifactId>kudu-binding</artifactId> + <name>Kudu DB Binding</name> + <packaging>jar</packaging> + + <dependencies> + <dependency> + <groupId>org.kududb</groupId> + <artifactId>kudu-client</artifactId> + <version>${kudu.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <repositories> + <repository> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + <id>cloudera-repo</id> + <name>Cloudera Releases</name> + <url>https://repository.cloudera.com/artifactory/cloudera-repos</url> + </repository> + </repositories> +</project> diff --git a/kudu/src/main/conf/log4j.properties b/kudu/src/main/conf/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..7317ad1cf75bdf3b19f45d725662dee6ed0b9bf5 --- /dev/null +++ b/kudu/src/main/conf/log4j.properties @@ -0,0 +1,24 @@ +# +# Copyright (c) 2015 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. +# +# Enables getting logs from the client. + +log4j.rootLogger = INFO, out +log4j.appender.out = org.apache.log4j.ConsoleAppender +log4j.appender.out.layout = org.apache.log4j.PatternLayout +log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n + +log4j.logger.kudu = INFO diff --git a/kudu/src/main/java/com/yahoo/ycsb/db/KuduYCSBClient.java b/kudu/src/main/java/com/yahoo/ycsb/db/KuduYCSBClient.java new file mode 100644 index 0000000000000000000000000000000000000000..503c574af1f7f7dbcc2ececd8c8bff9ffc291fd1 --- /dev/null +++ b/kudu/src/main/java/com/yahoo/ycsb/db/KuduYCSBClient.java @@ -0,0 +1,348 @@ +/** + * Copyright (c) 2015 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. + */ + +package com.yahoo.ycsb.db; + +import com.stumbleupon.async.TimeoutException; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.StringByteIterator; +import com.yahoo.ycsb.workloads.CoreWorkload; +import org.kududb.ColumnSchema; +import org.kududb.Schema; +import org.kududb.client.*; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; + +import static org.kududb.Type.STRING; + +/** + * Kudu client for YCSB framework. Example to load: <blockquote> + * + * <pre> + * <code> + * $ ./bin/ycsb load kudu -P workloads/workloada -threads 5 + * </code> + * </pre> + * + * </blockquote> Example to run: <blockquote> + * + * <pre> + * <code> + * ./bin/ycsb run kudu -P workloads/workloada -p kudu_sync_ops=true -threads 5 + * </code> + * </pre> + * + * </blockquote> + */ +public class KuduYCSBClient extends com.yahoo.ycsb.DB { + public static final String KEY = "key"; + public static final Status TIMEOUT = + new Status("TIMEOUT", "The operation timed out."); + public static final int MAX_TABLETS = 9000; + public static final long DEFAULT_SLEEP = 60000; + private static final String SYNC_OPS_OPT = "kudu_sync_ops"; + private static final String DEBUG_OPT = "kudu_debug"; + private static final String PRINT_ROW_ERRORS_OPT = "kudu_print_row_errors"; + private static final String PRE_SPLIT_NUM_TABLETS_OPT = + "kudu_pre_split_num_tablets"; + private static final String TABLE_NUM_REPLICAS = "kudu_table_num_replicas"; + private static final String BLOCK_SIZE_OPT = "kudu_block_size"; + private static final String MASTER_ADDRESSES_OPT = "kudu_master_addresses"; + private static final int BLOCK_SIZE_DEFAULT = 4096; + private static final List<String> COLUMN_NAMES = new ArrayList<String>(); + private static KuduClient client; + private static Schema schema; + private static int fieldCount; + private boolean debug = false; + private boolean printErrors = false; + private String tableName; + private KuduSession session; + private KuduTable kuduTable; + + @Override + public void init() throws DBException { + if (getProperties().getProperty(DEBUG_OPT) != null) { + this.debug = getProperties().getProperty(DEBUG_OPT).equals("true"); + } + if (getProperties().getProperty(PRINT_ROW_ERRORS_OPT) != null) { + this.printErrors = + getProperties().getProperty(PRINT_ROW_ERRORS_OPT).equals("true"); + } + if (getProperties().getProperty(PRINT_ROW_ERRORS_OPT) != null) { + this.printErrors = + getProperties().getProperty(PRINT_ROW_ERRORS_OPT).equals("true"); + } + this.tableName = com.yahoo.ycsb.workloads.CoreWorkload.table; + initClient(debug, tableName, getProperties()); + this.session = client.newSession(); + if (getProperties().getProperty(SYNC_OPS_OPT) != null + && getProperties().getProperty(SYNC_OPS_OPT).equals("false")) { + this.session.setFlushMode(KuduSession.FlushMode.AUTO_FLUSH_BACKGROUND); + this.session.setMutationBufferSpace(100); + } else { + this.session.setFlushMode(KuduSession.FlushMode.AUTO_FLUSH_SYNC); + } + + try { + this.kuduTable = client.openTable(tableName); + } catch (Exception e) { + throw new DBException("Could not open a table because of:", e); + } + } + + private static synchronized void initClient(boolean debug, String tableName, + Properties prop) throws DBException { + if (client != null) { + return; + } + + String masterAddresses = prop.getProperty(MASTER_ADDRESSES_OPT); + if (masterAddresses == null) { + masterAddresses = "localhost:7051"; + } + + int numTablets = getIntFromProp(prop, PRE_SPLIT_NUM_TABLETS_OPT, 4); + if (numTablets > MAX_TABLETS) { + throw new DBException("Specified number of tablets (" + numTablets + + ") must be equal " + "or below " + MAX_TABLETS); + } + + int numReplicas = getIntFromProp(prop, TABLE_NUM_REPLICAS, 3); + + int blockSize = getIntFromProp(prop, BLOCK_SIZE_OPT, BLOCK_SIZE_DEFAULT); + + client = new KuduClient.KuduClientBuilder(masterAddresses) + .defaultSocketReadTimeoutMs(DEFAULT_SLEEP) + .defaultOperationTimeoutMs(DEFAULT_SLEEP) + .defaultAdminOperationTimeoutMs(DEFAULT_SLEEP).build(); + if (debug) { + System.out.println("Connecting to the masters at " + masterAddresses); + } + + fieldCount = getIntFromProp(prop, CoreWorkload.FIELD_COUNT_PROPERTY, + Integer.parseInt(CoreWorkload.FIELD_COUNT_PROPERTY_DEFAULT)); + + List<ColumnSchema> columns = new ArrayList<ColumnSchema>(fieldCount + 1); + + ColumnSchema keyColumn = new ColumnSchema.ColumnSchemaBuilder(KEY, STRING) + .key(true).desiredBlockSize(blockSize).build(); + columns.add(keyColumn); + COLUMN_NAMES.add(KEY); + for (int i = 0; i < fieldCount; i++) { + String name = "field" + i; + COLUMN_NAMES.add(name); + columns.add(new ColumnSchema.ColumnSchemaBuilder(name, STRING) + .desiredBlockSize(blockSize).build()); + } + schema = new Schema(columns); + + CreateTableOptions builder = new CreateTableOptions(); + builder.setNumReplicas(numReplicas); + // create n-1 split keys, which will end up being n tablets master-side + for (int i = 1; i < numTablets + 0; i++) { + // We do +1000 since YCSB starts at user1. + int startKeyInt = (MAX_TABLETS / numTablets * i) + 1000; + String startKey = String.format("%04d", startKeyInt); + PartialRow splitRow = schema.newPartialRow(); + splitRow.addString(0, "user" + startKey); + builder.addSplitRow(splitRow); + } + + try { + client.createTable(tableName, schema, builder); + } catch (Exception e) { + if (!e.getMessage().contains("ALREADY_PRESENT")) { + throw new DBException("Couldn't create the table", e); + } + } + } + + private static int getIntFromProp(Properties prop, String propName, + int defaultValue) throws DBException { + String intStr = prop.getProperty(propName); + if (intStr == null) { + return defaultValue; + } else { + try { + return Integer.valueOf(intStr); + } catch (NumberFormatException ex) { + throw new DBException( + "Provided number for " + propName + " isn't a valid integer"); + } + } + } + + @Override + public void cleanup() throws DBException { + try { + this.session.close(); + } catch (Exception e) { + throw new DBException("Couldn't cleanup the session", e); + } + } + + @Override + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + Vector<HashMap<String, ByteIterator>> results = + new Vector<HashMap<String, ByteIterator>>(); + final Status status = scan(table, key, 1, fields, results); + if (!status.equals(Status.OK)) { + return status; + } + if (results.size() != 1) { + return Status.NOT_FOUND; + } + result.putAll(results.firstElement()); + return Status.OK; + } + + @Override + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + try { + KuduScanner.KuduScannerBuilder scannerBuilder = + client.newScannerBuilder(this.kuduTable); + List<String> querySchema; + if (fields == null) { + querySchema = COLUMN_NAMES; + // No need to set the projected columns with the whole schema. + } else { + querySchema = new ArrayList<String>(fields); + scannerBuilder.setProjectedColumnNames(querySchema); + } + + PartialRow lowerBound = schema.newPartialRow(); + lowerBound.addString(0, startkey); + scannerBuilder.lowerBound(lowerBound); + if (recordcount == 1) { + PartialRow upperBound = schema.newPartialRow(); + // Keys are fixed length, just adding something at the end is safe. + upperBound.addString(0, startkey.concat(" ")); + scannerBuilder.exclusiveUpperBound(upperBound); + } + + KuduScanner scanner = scannerBuilder.limit(recordcount) // currently noop + .build(); + + while (scanner.hasMoreRows()) { + RowResultIterator data = scanner.nextRows(); + addAllRowsToResult(data, recordcount, querySchema, result); + if (recordcount == result.size()) { + break; + } + } + RowResultIterator closer = scanner.close(); + addAllRowsToResult(closer, recordcount, querySchema, result); + } catch (TimeoutException te) { + if (printErrors) { + System.err.println( + "Waited too long for a scan operation with start key=" + startkey); + } + return TIMEOUT; + } catch (Exception e) { + System.err.println("Unexpected exception " + e); + e.printStackTrace(); + return Status.ERROR; + } + return Status.OK; + } + + private void addAllRowsToResult(RowResultIterator it, int recordcount, + List<String> querySchema, Vector<HashMap<String, ByteIterator>> result) + throws Exception { + RowResult row; + HashMap<String, ByteIterator> rowResult = + new HashMap<String, ByteIterator>(querySchema.size()); + if (it == null) { + return; + } + while (it.hasNext()) { + if (result.size() == recordcount) { + return; + } + row = it.next(); + int colIdx = 0; + for (String col : querySchema) { + rowResult.put(col, new StringByteIterator(row.getString(colIdx))); + colIdx++; + } + result.add(rowResult); + } + } + + @Override + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { + Update update = this.kuduTable.newUpdate(); + PartialRow row = update.getRow(); + row.addString(KEY, key); + for (int i = 1; i < schema.getColumnCount(); i++) { + String columnName = schema.getColumnByIndex(i).getName(); + if (values.containsKey(columnName)) { + String value = values.get(columnName).toString(); + row.addString(columnName, value); + } + } + apply(update); + return Status.OK; + } + + @Override + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + Insert insert = this.kuduTable.newInsert(); + PartialRow row = insert.getRow(); + row.addString(KEY, key); + for (int i = 1; i < schema.getColumnCount(); i++) { + row.addString(i, new String( + values.get(schema.getColumnByIndex(i).getName()).toArray())); + } + apply(insert); + return Status.OK; + } + + @Override + public Status delete(String table, String key) { + Delete delete = this.kuduTable.newDelete(); + PartialRow row = delete.getRow(); + row.addString(KEY, key); + apply(delete); + return Status.OK; + } + + private void apply(Operation op) { + try { + OperationResponse response = session.apply(op); + if (response != null && response.hasRowError() && printErrors) { + System.err.println("Got a row error " + response.getRowError()); + } + } catch (Exception ex) { + if (printErrors) { + System.err.println("Failed to apply an operation " + ex.toString()); + ex.printStackTrace(); + } + } + } +} diff --git a/kudu/src/main/java/com/yahoo/ycsb/db/package-info.java b/kudu/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..5d6c49613dea051f5b251960bc5a9ad8f9f2347c --- /dev/null +++ b/kudu/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2014, Yahoo!, Inc. 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. + */ + +/** + * The YCSB binding for <a href="http://getkudu.io/">Kudu</a>. + */ +package com.yahoo.ycsb.db; + diff --git a/mapkeeper/README b/mapkeeper/README.md similarity index 100% rename from mapkeeper/README rename to mapkeeper/README.md diff --git a/mapkeeper/pom.xml b/mapkeeper/pom.xml index a8303f6f383df09aa21ce4a918ff02eda5aba4cb..a07fe4ddd3b2070631eae13717c2e48cea2d2fe7 100644 --- a/mapkeeper/pom.xml +++ b/mapkeeper/pom.xml @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> diff --git a/mapkeeper/src/main/java/com/yahoo/ycsb/db/MapKeeperClient.java b/mapkeeper/src/main/java/com/yahoo/ycsb/db/MapKeeperClient.java index 763d98e3c9ee61be9f71e7b00b0a3eb61ea322fb..012a96cbf18e0927ffbc370d0a06fa754cc75ba0 100644 --- a/mapkeeper/src/main/java/com/yahoo/ycsb/db/MapKeeperClient.java +++ b/mapkeeper/src/main/java/com/yahoo/ycsb/db/MapKeeperClient.java @@ -74,19 +74,19 @@ public class MapKeeperClient extends DB { ByteBuffer encode(HashMap<String, ByteIterator> values) { int len = 0; - for(String k : values.keySet()) { - len += (k.length() + 1 + values.get(k).bytesLeft() + 1); + for(Map.Entry<String, ByteIterator> entry : values.entrySet()) { + len += (entry.getKey().length() + 1 + entry.getValue().bytesLeft() + 1); } byte[] array = new byte[len]; int i = 0; - for(String k : values.keySet()) { - for(int j = 0; j < k.length(); j++) { - array[i] = (byte)k.charAt(j); + for(Map.Entry<String, ByteIterator> entry : values.entrySet()) { + for(int j = 0; j < entry.getKey().length(); j++) { + array[i] = (byte)entry.getKey().charAt(j); i++; } array[i] = '\t'; // XXX would like to use sane delimiter (null, 254, 255, ...) but java makes this nearly impossible i++; - ByteIterator v = values.get(k); + ByteIterator v = entry.getValue(); i = v.nextBuf(array, i); array[i] = '\t'; i++; @@ -182,8 +182,8 @@ public class MapKeeperClient extends DB { if(!writeallfields) { HashMap<String, ByteIterator> oldval = new HashMap<String, ByteIterator>(); read(table, key, null, oldval); - for(String k: values.keySet()) { - oldval.put(k, values.get(k)); + for(Map.Entry<String, ByteIterator> entry : values.entrySet()) { + oldval.put(entry.getKey(), entry.getValue())); } values = oldval; } diff --git a/memcached/README.md b/memcached/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2126b2da09eadc323458c7182081cf27e9008bb0 --- /dev/null +++ b/memcached/README.md @@ -0,0 +1,97 @@ +<!-- +Copyright (c) 2015 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. +--> + +# YCSB Memcached binding + +This section describes how to run YCSB on memcached. + +## 1. Install and start memcached service on the host(s) + +Debian / Ubuntu: + + sudo apt-get install memcached + +RedHat / CentOS: + + sudo yum install memcached + +## 2. Install Java and Maven + +See step 2 in [`../mongodb/README.md`](../mongodb/README.md). + +## 3. Set up YCSB + +Git clone YCSB and compile: + + git clone http://github.com/brianfrankcooper/YCSB.git + cd YCSB + mvn -pl com.yahoo.ycsb:memcached-binding -am clean package + +## 4. Load data and run tests + +Load the data: + + ./bin/ycsb load memcached -s -P workloads/workloada > outputLoad.txt + +Run the workload test: + + ./bin/ycsb run memcached -s -P workloads/workloada > outputRun.txt + +## 5. memcached Connection Parameters + +A sample configuration is provided in +[`conf/memcached.properties`](conf/memcached.properties). + +### Required params + +- `memcached.hosts` + + This is a comma-separated list of hosts providing the memcached interface. + You can use IPs or hostnames. The port is optional and defaults to the + memcached standard port of `11211` if not specified. + +### Optional params + +- `memcached.shutdownTimeoutMillis` + + Shutdown timeout in milliseconds. + +- `memcached.objectExpirationTime` + + Object expiration time for memcached; defaults to `Integer.MAX_VALUE`. + +- `memcached.checkOperationStatus` + + Whether to verify the success of each operation; defaults to true. + +- `memcached.readBufferSize` + + Read buffer size, in bytes. + +- `memcached.opTimeoutMillis` + + Operation timeout, in milliseconds. + +- `memcached.failureMode` + + What to do with failures; this is one of `net.spy.memcached.FailureMode` enum + values, which are currently: `Redistribute`, `Retry`, or `Cancel`. + +You can set properties on the command line via `-p`, e.g.: + + ./bin/ycsb load memcached -s -P workloads/workloada \ + -p "memcached.hosts=127.0.0.1" > outputLoad.txt diff --git a/memcached/conf/memcached.properties b/memcached/conf/memcached.properties new file mode 100644 index 0000000000000000000000000000000000000000..e65f2fa74b9c15626741158c78d919443d5eccb4 --- /dev/null +++ b/memcached/conf/memcached.properties @@ -0,0 +1,52 @@ +# Copyright (c) 2015 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. + +# +# Sample property file for Memcached Client + +## Mandatory parameters + +# A comma-separated list of memcached server endpoints, each being an IP or +# hostname with an optional port; the port defaults to the memcached-standard +# port of 11211 if not specified. +# +# memcached.hosts = + +## Optional parameters + +# Shutdown timeout in milliseconds. +# +# memcached.shutdownTimeoutMillis = 30000 + +# Object expiration time for memcached; defaults to `Integer.MAX_VALUE`. +# +# memcached.objectExpirationTime = 2147483647 + +# Whether to verify the success of each operation; defaults to true. +# +# memcached.checkOperationStatus = true + +# Read buffer size, in bytes. +# +# memcached.readBufferSize = 3000000 + +# Operation timeout, in milliseconds. +# +# memcached.opTimeoutMillis = 60000 + +# What to do with failures; this is one of `net.spy.memcached.FailureMode` enum +# values, which are currently: `Redistribute`, `Retry`, or `Cancel`. +# +# memcached.failureMode = Redistribute diff --git a/memcached/pom.xml b/memcached/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..d1d002ea8d6c6296631bdb3f735f70274b6074db --- /dev/null +++ b/memcached/pom.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> + +<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.7.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> + </parent> + + <artifactId>memcached-binding</artifactId> + <name>memcached binding</name> + <packaging>jar</packaging> + + <dependencies> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.17</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-mapper-asl</artifactId> + <version>1.9.13</version> + </dependency> + <dependency> + <groupId>net.spy</groupId> + <artifactId>spymemcached</artifactId> + <version>2.11.4</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <version>${maven.assembly.version}</version> + <configuration> + <descriptorRefs> + <descriptorRef>jar-with-dependencies</descriptorRef> + </descriptorRefs> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/memcached/src/main/java/com/yahoo/ycsb/db/MemcachedClient.java b/memcached/src/main/java/com/yahoo/ycsb/db/MemcachedClient.java new file mode 100644 index 0000000000000000000000000000000000000000..9ce0b93c9293d9dbb7daa99df531c0cc3a4b190f --- /dev/null +++ b/memcached/src/main/java/com/yahoo/ycsb/db/MemcachedClient.java @@ -0,0 +1,294 @@ +/** + * Copyright (c) 2014-2015 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. + */ + +package com.yahoo.ycsb.db; + +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.StringByteIterator; + +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; +import java.net.InetSocketAddress; +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Vector; + +import net.spy.memcached.ConnectionFactoryBuilder; +import net.spy.memcached.FailureMode; +// We also use `net.spy.memcached.MemcachedClient`; it is not imported +// explicitly and referred to with its full path to avoid conflicts with the +// class of the same name in this file. +import net.spy.memcached.internal.GetFuture; +import net.spy.memcached.internal.OperationFuture; + +import org.codehaus.jackson.JsonFactory; +import org.codehaus.jackson.JsonGenerator; +import org.codehaus.jackson.JsonNode; +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.node.ObjectNode; + +import org.apache.log4j.Logger; + +import static java.util.concurrent.TimeUnit.MILLISECONDS; + +/** + * Concrete Memcached client implementation. + */ +public class MemcachedClient extends DB { + + private final Logger logger = Logger.getLogger(getClass()); + + protected static final ObjectMapper MAPPER = new ObjectMapper(); + + private boolean checkOperationStatus; + private long shutdownTimeoutMillis; + private int objectExpirationTime; + + public static final String HOSTS_PROPERTY = "memcached.hosts"; + + public static final int DEFAULT_PORT = 11211; + + private static final String TEMPORARY_FAILURE_MSG = "Temporary failure"; + private static final String CANCELLED_MSG = "cancelled"; + + public static final String SHUTDOWN_TIMEOUT_MILLIS_PROPERTY = + "memcached.shutdownTimeoutMillis"; + public static final String DEFAULT_SHUTDOWN_TIMEOUT_MILLIS = "30000"; + + public static final String OBJECT_EXPIRATION_TIME_PROPERTY = + "memcached.objectExpirationTime"; + public static final String DEFAULT_OBJECT_EXPIRATION_TIME = + String.valueOf(Integer.MAX_VALUE); + + public static final String CHECK_OPERATION_STATUS_PROPERTY = + "memcached.checkOperationStatus"; + public static final String CHECK_OPERATION_STATUS_DEFAULT = "true"; + + public static final String READ_BUFFER_SIZE_PROPERTY = + "memcached.readBufferSize"; + public static final String DEFAULT_READ_BUFFER_SIZE = "3000000"; + + public static final String OP_TIMEOUT_PROPERTY = "memcached.opTimeoutMillis"; + public static final String DEFAULT_OP_TIMEOUT = "60000"; + + public static final String FAILURE_MODE_PROPERTY = "memcached.failureMode"; + public static final FailureMode FAILURE_MODE_PROPERTY_DEFAULT = + FailureMode.Redistribute; + + /** + * The MemcachedClient implementation that will be used to communicate + * with the memcached server. + */ + private net.spy.memcached.MemcachedClient client; + + /** + * @returns Underlying Memcached protocol client, implemented by + * SpyMemcached. + */ + protected net.spy.memcached.MemcachedClient memcachedClient() { + return client; + } + + @Override + public void init() throws DBException { + try { + client = createMemcachedClient(); + checkOperationStatus = Boolean.parseBoolean( + getProperties().getProperty(CHECK_OPERATION_STATUS_PROPERTY, + CHECK_OPERATION_STATUS_DEFAULT)); + objectExpirationTime = Integer.parseInt( + getProperties().getProperty(OBJECT_EXPIRATION_TIME_PROPERTY, + DEFAULT_OBJECT_EXPIRATION_TIME)); + shutdownTimeoutMillis = Integer.parseInt( + getProperties().getProperty(SHUTDOWN_TIMEOUT_MILLIS_PROPERTY, + DEFAULT_SHUTDOWN_TIMEOUT_MILLIS)); + } catch (Exception e) { + throw new DBException(e); + } + } + + protected net.spy.memcached.MemcachedClient createMemcachedClient() + throws Exception { + ConnectionFactoryBuilder connectionFactoryBuilder = + new ConnectionFactoryBuilder(); + + connectionFactoryBuilder.setReadBufferSize(Integer.parseInt( + getProperties().getProperty(READ_BUFFER_SIZE_PROPERTY, + DEFAULT_READ_BUFFER_SIZE))); + + connectionFactoryBuilder.setOpTimeout(Integer.parseInt( + getProperties().getProperty(OP_TIMEOUT_PROPERTY, DEFAULT_OP_TIMEOUT))); + + String failureString = getProperties().getProperty(FAILURE_MODE_PROPERTY); + connectionFactoryBuilder.setFailureMode( + failureString == null ? FAILURE_MODE_PROPERTY_DEFAULT + : FailureMode.valueOf(failureString)); + + // Note: this only works with IPv4 addresses due to its assumption of + // ":" being the separator of hostname/IP and port; this is not the case + // when dealing with IPv6 addresses. + // + // TODO(mbrukman): fix this. + List<InetSocketAddress> addresses = new ArrayList<InetSocketAddress>(); + String[] hosts = getProperties().getProperty(HOSTS_PROPERTY).split(","); + for (String address : hosts) { + int colon = address.indexOf(":"); + int port = DEFAULT_PORT; + String host = address; + if (colon != -1) { + port = Integer.parseInt(address.substring(colon + 1)); + host = address.substring(0, colon); + } + addresses.add(new InetSocketAddress(host, port)); + } + return new net.spy.memcached.MemcachedClient( + connectionFactoryBuilder.build(), addresses); + } + + @Override + public Status read( + String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + key = createQualifiedKey(table, key); + try { + GetFuture<Object> future = memcachedClient().asyncGet(key); + Object document = future.get(); + if (document != null) { + fromJson((String) document, fields, result); + } + return Status.OK; + } catch (Exception e) { + logger.error("Error encountered for key: " + key, e); + return Status.ERROR; + } + } + + @Override + public Status scan( + String table, String startkey, int recordcount, Set<String> fields, + Vector<HashMap<String, ByteIterator>> result){ + return Status.NOT_IMPLEMENTED; + } + + @Override + public Status update( + String table, String key, HashMap<String, ByteIterator> values) { + key = createQualifiedKey(table, key); + try { + OperationFuture<Boolean> future = + memcachedClient().replace(key, objectExpirationTime, toJson(values)); + return getReturnCode(future); + } catch (Exception e) { + logger.error("Error updating value with key: " + key, e); + return Status.ERROR; + } + } + + @Override + public Status insert( + String table, String key, HashMap<String, ByteIterator> values) { + key = createQualifiedKey(table, key); + try { + OperationFuture<Boolean> future = + memcachedClient().add(key, objectExpirationTime, toJson(values)); + return getReturnCode(future); + } catch (Exception e) { + logger.error("Error inserting value", e); + return Status.ERROR; + } + } + + @Override + public Status delete(String table, String key) { + key = createQualifiedKey(table, key); + try { + OperationFuture<Boolean> future = memcachedClient().delete(key); + return getReturnCode(future); + } catch (Exception e) { + logger.error("Error deleting value", e); + return Status.ERROR; + } + } + + protected Status getReturnCode(OperationFuture<Boolean> future) { + if (!checkOperationStatus) { + return Status.OK; + } + if (future.getStatus().isSuccess()) { + return Status.OK; + } else if (TEMPORARY_FAILURE_MSG.equals(future.getStatus().getMessage())) { + return new Status("TEMPORARY_FAILURE", TEMPORARY_FAILURE_MSG); + } else if (CANCELLED_MSG.equals(future.getStatus().getMessage())) { + return new Status("CANCELLED_MSG", CANCELLED_MSG); + } + return new Status("ERROR", future.getStatus().getMessage()); + } + + @Override + public void cleanup() throws DBException { + if (client != null) { + memcachedClient().shutdown(shutdownTimeoutMillis, MILLISECONDS); + } + } + + protected static String createQualifiedKey(String table, String key) { + return MessageFormat.format("{0}-{1}", table, key); + } + + protected static void fromJson( + String value, Set<String> fields, + Map<String, ByteIterator> result) throws IOException { + JsonNode json = MAPPER.readTree(value); + boolean checkFields = fields != null && !fields.isEmpty(); + for (Iterator<Map.Entry<String, JsonNode>> jsonFields = json.getFields(); + jsonFields.hasNext(); + /* increment in loop body */) { + Map.Entry<String, JsonNode> jsonField = jsonFields.next(); + String name = jsonField.getKey(); + if (checkFields && fields.contains(name)) { + continue; + } + JsonNode jsonValue = jsonField.getValue(); + if (jsonValue != null && !jsonValue.isNull()) { + result.put(name, new StringByteIterator(jsonValue.asText())); + } + } + } + + protected static String toJson(Map<String, ByteIterator> values) + throws IOException { + ObjectNode node = MAPPER.createObjectNode(); + HashMap<String, String> stringMap = StringByteIterator.getStringMap(values); + for (Map.Entry<String, String> pair : stringMap.entrySet()) { + node.put(pair.getKey(), pair.getValue()); + } + JsonFactory jsonFactory = new JsonFactory(); + Writer writer = new StringWriter(); + JsonGenerator jsonGenerator = jsonFactory.createJsonGenerator(writer); + MAPPER.writeTree(jsonGenerator, node); + return writer.toString(); + } +} diff --git a/memcached/src/main/java/com/yahoo/ycsb/db/package-info.java b/memcached/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..27dbc34c900b0461e51fa746b0385b59e7550c2c --- /dev/null +++ b/memcached/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2015 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. + */ + +/** + * YCSB binding for memcached. + */ +package com.yahoo.ycsb.db; diff --git a/mongodb/README.md b/mongodb/README.md index 16717ae2b39c8f21acffc8328d5f5084df582831..81a0eb5737529aea518e2bac60c60e4f9079ac21 100644 --- a/mongodb/README.md +++ b/mongodb/README.md @@ -68,9 +68,9 @@ Reload bash and test mvn Download the YCSB zip file and compile: - git clone git://github.com/brianfrankcooper/YCSB.git - cd YCSB - mvn -pl com.yahoo.ycsb:mongodb-binding -am clean package + curl -O --location https://github.com/brianfrankcooper/YCSB/releases/download/0.5.0/ycsb-0.5.0.tar.gz + tar xfvz ycsb-0.5.0.tar.gz + cd ycsb-0.5.0 ### 4. Run YCSB @@ -108,8 +108,14 @@ See the next section for the list of configuration parameters for MongoDB. - Useful for the insert workload as it will submit the inserts in batches inproving throughput. - Default value is `1`. +- `mongodb.upsert` + - Determines if the insert operation performs an update with the upsert operation or a insert. + Upserts have the advantage that they will continue to work for a partially loaded data set. + - Setting to `true` uses updates, `false` uses insert operations. + - Default value is `false`. + - `mongodb.writeConcern` - - **Deprecated** - Use the `w` and `journal` options on the MongoDB URI provided by the `mongodb.uri`. + - **Deprecated** - Use the `w` and `journal` options on the MongoDB URI provided by the `mongodb.url`. - Allowed values are : - `errors_ignored` - `unacknowledged` @@ -120,7 +126,7 @@ See the next section for the list of configuration parameters for MongoDB. - Default value is `acknowledged`. - `mongodb.readPreference` - - **Deprecated** - Use the `readPreference` options on the MongoDB URI provided by the `mongodb.uri`. + - **Deprecated** - Use the `readPreference` options on the MongoDB URI provided by the `mongodb.url`. - Allowed values are : - `primary` - `primary_preferred` @@ -130,11 +136,11 @@ See the next section for the list of configuration parameters for MongoDB. - Default value is `primary`. - `mongodb.maxconnections` - - **Deprecated** - Use the `maxPoolSize` options on the MongoDB URI provided by the `mongodb.uri`. + - **Deprecated** - Use the `maxPoolSize` options on the MongoDB URI provided by the `mongodb.url`. - Default value is `100`. - `mongodb.threadsAllowedToBlockForConnectionMultiplier` - - **Deprecated** - Use the `waitQueueMultiple` options on the MongoDB URI provided by the `mongodb.uri`. + - **Deprecated** - Use the `waitQueueMultiple` options on the MongoDB URI provided by the `mongodb.url`. - Default value is `5`. For example: diff --git a/mongodb/pom.xml b/mongodb/pom.xml index fe157e0ef23fafa420a2340e729541287cb1269e..25a6f4eed703702ebf3149dd8c3fbfc5af665f18 100644 --- a/mongodb/pom.xml +++ b/mongodb/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -22,7 +22,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> @@ -61,30 +61,6 @@ LICENSE file. <scope>test</scope> </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.15</version> - <configuration> - <consoleOutput>true</consoleOutput> - <configLocation>../checkstyle.xml</configLocation> - <failOnViolation>true</failOnViolation> - <failsOnError>true</failsOnError> - </configuration> - <executions> - <execution> - <id>validate</id> - <phase>validate</phase> - <goals> - <goal>checkstyle</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> <repositories> <repository> <releases> diff --git a/mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java b/mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java index 7db9b0b55e8900c9a00760d74248078863e3dd23..89eb7d250080530b309d3ed7861ab975b70162fa 100644 --- a/mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java +++ b/mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java @@ -18,14 +18,6 @@ package com.yahoo.ycsb.db; import static com.allanbank.mongodb.builder.QueryBuilder.where; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.Vector; -import java.util.concurrent.atomic.AtomicInteger; - import com.allanbank.mongodb.Durability; import com.allanbank.mongodb.LockType; import com.allanbank.mongodb.MongoClient; @@ -49,6 +41,15 @@ import com.allanbank.mongodb.builder.Sort; import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; +import java.util.concurrent.atomic.AtomicInteger; /** * MongoDB asynchronous client for YCSB framework using the <a @@ -96,6 +97,9 @@ public class AsyncMongoDbClient extends DB { /** The batch size to use for inserts. */ private static int batchSize; + + /** If true then use updates with the upsert option for inserts. */ + private static boolean useUpsert; /** The bulk inserts pending for the thread. */ private final BatchedWrite.Builder batchedWrite = BatchedWrite.builder() @@ -136,19 +140,19 @@ public class AsyncMongoDbClient extends DB { * description for a discussion of error codes. */ @Override - public final int delete(final String table, final String key) { + public final Status delete(final String table, final String key) { try { final MongoCollection collection = database.getCollection(table); final Document q = BuilderFactory.start().add("_id", key).build(); final long res = collection.delete(q, writeConcern); if (res == 0) { System.err.println("Nothing deleted for key " + key); - return 1; + return Status.NOT_FOUND; } - return 0; + return Status.OK; } catch (final Exception e) { System.err.println(e.toString()); - return 1; + return Status.ERROR; } } @@ -178,7 +182,11 @@ public class AsyncMongoDbClient extends DB { // Set insert batchsize, default 1 - to be YCSB-original equivalent batchSize = Integer.parseInt(props.getProperty("mongodb.batchsize", "1")); - + + // Set is inserts are done as upserts. Defaults to false. + useUpsert = Boolean.parseBoolean( + props.getProperty("mongodb.upsert", "false")); + // Just use the standard connection format URL // http://docs.mongodb.org/manual/reference/connection-string/ // to configure the client. @@ -242,7 +250,7 @@ public class AsyncMongoDbClient extends DB { * class's description for a discussion of error codes. */ @Override - public final int insert(final String table, final String key, + public final Status insert(final String table, final String key, final HashMap<String, ByteIterator> values) { try { final MongoCollection collection = database.getCollection(table); @@ -255,42 +263,53 @@ public class AsyncMongoDbClient extends DB { // Do an upsert. if (batchSize <= 1) { - long result = collection.update(query, toInsert, - /* multi= */false, /* upsert= */true, writeConcern); - - return result == 1 ? 0 : 1; + long result; + if (useUpsert) { + result = collection.update(query, toInsert, + /* multi= */false, /* upsert= */true, writeConcern); + } else { + // Return is not stable pre-SERVER-4381. No exception is success. + collection.insert(writeConcern, toInsert); + result = 1; + } + return result == 1 ? Status.OK : Status.NOT_FOUND; } // Use a bulk insert. try { - batchedWrite.insert(toInsert); + if (useUpsert) { + batchedWrite.update(query, toInsert, /* multi= */false, + /* upsert= */true); + } else { + batchedWrite.insert(toInsert); + } batchedWriteCount += 1; if (batchedWriteCount < batchSize) { - return 0; + return OptionsSupport.BATCHED_OK; } long count = collection.write(batchedWrite); if (count == batchedWriteCount) { batchedWrite.reset().mode(BatchedWriteMode.REORDERED); batchedWriteCount = 0; - return 0; + return Status.OK; } System.err.println("Number of inserted documents doesn't match the " + "number sent, " + count + " inserted, sent " + batchedWriteCount); batchedWrite.reset().mode(BatchedWriteMode.REORDERED); batchedWriteCount = 0; - return 1; + return Status.ERROR; } catch (Exception e) { System.err.println("Exception while trying bulk insert with " + batchedWriteCount); e.printStackTrace(); - return 1; + return Status.ERROR; } } catch (final Exception e) { e.printStackTrace(); - return 1; + return Status.ERROR; } } @@ -309,7 +328,7 @@ public class AsyncMongoDbClient extends DB { * @return Zero on success, a non-zero error code on error or "not found". */ @Override - public final int read(final String table, final String key, + public final Status read(final String table, final String key, final Set<String> fields, final HashMap<String, ByteIterator> result) { try { final MongoCollection collection = database.getCollection(table); @@ -342,10 +361,10 @@ public class AsyncMongoDbClient extends DB { if (queryResult != null) { fillMap(result, queryResult); } - return queryResult != null ? 0 : 1; + return queryResult != null ? Status.OK : Status.NOT_FOUND; } catch (final Exception e) { System.err.println(e.toString()); - return 1; + return Status.ERROR; } } @@ -369,7 +388,7 @@ public class AsyncMongoDbClient extends DB { * class's description for a discussion of error codes. */ @Override - public final int scan(final String table, final String startkey, + public final Status scan(final String table, final String startkey, final int recordcount, final Set<String> fields, final Vector<HashMap<String, ByteIterator>> result) { try { @@ -394,7 +413,7 @@ public class AsyncMongoDbClient extends DB { final MongoIterator<Document> cursor = collection.find(find); if (!cursor.hasNext()) { System.err.println("Nothing found in scan for key " + startkey); - return 1; + return Status.NOT_FOUND; } while (cursor.hasNext()) { // toMap() returns a Map but result.add() expects a @@ -408,10 +427,10 @@ public class AsyncMongoDbClient extends DB { result.add(docAsMap); } - return 0; + return Status.OK; } catch (final Exception e) { System.err.println(e.toString()); - return 1; + return Status.ERROR; } } @@ -430,7 +449,7 @@ public class AsyncMongoDbClient extends DB { * class's description for a discussion of error codes. */ @Override - public final int update(final String table, final String key, + public final Status update(final String table, final String key, final HashMap<String, ByteIterator> values) { try { final MongoCollection collection = database.getCollection(table); @@ -443,10 +462,10 @@ public class AsyncMongoDbClient extends DB { } final long res = collection.update(query, update, false, false, writeConcern); - return res == 1 ? 0 : 1; + return res == 1 ? Status.OK : Status.NOT_FOUND; } catch (final Exception e) { System.err.println(e.toString()); - return 1; + return Status.ERROR; } } diff --git a/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java b/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java index a124ef0967d333f7bd840b12b7d9d1d18de910d4..1db8f0e1cfcd0e7d28fa52b6c73b34ddf77803a8 100644 --- a/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java +++ b/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java @@ -24,19 +24,6 @@ */ package com.yahoo.ycsb.db; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.Vector; -import java.util.concurrent.atomic.AtomicInteger; - -import com.mongodb.client.model.InsertManyOptions; -import org.bson.Document; -import org.bson.types.Binary; - import com.mongodb.MongoClient; import com.mongodb.MongoClientURI; import com.mongodb.ReadPreference; @@ -45,6 +32,8 @@ import com.mongodb.client.FindIterable; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoCursor; import com.mongodb.client.MongoDatabase; +import com.mongodb.client.model.InsertManyOptions; +import com.mongodb.client.model.UpdateOneModel; import com.mongodb.client.model.UpdateOptions; import com.mongodb.client.result.DeleteResult; import com.mongodb.client.result.UpdateResult; @@ -52,9 +41,22 @@ import com.yahoo.ycsb.ByteArrayByteIterator; import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; + +import org.bson.Document; +import org.bson.types.Binary; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; +import java.util.concurrent.atomic.AtomicInteger; /** - * MongoDB asynchronous client for YCSB framework using the MongoDB Inc. <a + * MongoDB binding for YCSB framework using the MongoDB Inc. <a * href="http://docs.mongodb.org/ecosystem/drivers/java/">driver</a> * <p> * See the <code>README.md</code> for configuration information. @@ -103,6 +105,9 @@ public class MongoDbClient extends DB { /** The batch size to use for inserts. */ private static int batchSize; + /** If true then use updates with the upsert option for inserts. */ + private static boolean useUpsert; + /** The bulk inserts pending for the thread. */ private final List<Document> bulkInserts = new ArrayList<Document>(); @@ -138,7 +143,7 @@ public class MongoDbClient extends DB { * class's description for a discussion of error codes. */ @Override - public int delete(String table, String key) { + public Status delete(String table, String key) { try { MongoCollection<Document> collection = database.getCollection(table); @@ -147,12 +152,12 @@ public class MongoDbClient extends DB { collection.withWriteConcern(writeConcern).deleteOne(query); if (result.wasAcknowledged() && result.getDeletedCount() == 0) { System.err.println("Nothing deleted for key " + key); - return 1; + return Status.NOT_FOUND; } - return 0; + return Status.OK; } catch (Exception e) { System.err.println(e.toString()); - return 1; + return Status.ERROR; } } @@ -173,6 +178,10 @@ public class MongoDbClient extends DB { // Set insert batchsize, default 1 - to be YCSB-original equivalent batchSize = Integer.parseInt(props.getProperty("batchsize", "1")); + // Set is inserts are done as upserts. Defaults to false. + useUpsert = Boolean.parseBoolean( + props.getProperty("mongodb.upsert", "false")); + // Just use the standard connection format URL // http://docs.mongodb.org/manual/reference/connection-string/ // to configure the client. @@ -241,7 +250,7 @@ public class MongoDbClient extends DB { * class's description for a discussion of error codes. */ @Override - public int insert(String table, String key, + public Status insert(String table, String key, HashMap<String, ByteIterator> values) { try { MongoCollection<Document> collection = database.getCollection(table); @@ -251,24 +260,41 @@ public class MongoDbClient extends DB { } if (batchSize == 1) { - // this is effectively an insert, but using an upsert instead due - // to current inability of the framework to clean up after itself - // between test runs. - collection.replaceOne(new Document("_id", toInsert.get("_id")), - toInsert, UPDATE_WITH_UPSERT); + if (useUpsert) { + // this is effectively an insert, but using an upsert instead due + // to current inability of the framework to clean up after itself + // between test runs. + collection.replaceOne(new Document("_id", toInsert.get("_id")), + toInsert, UPDATE_WITH_UPSERT); + } else { + collection.insertOne(toInsert); + } } else { bulkInserts.add(toInsert); if (bulkInserts.size() == batchSize) { - collection.insertMany(bulkInserts, INSERT_UNORDERED); + if (useUpsert) { + List<UpdateOneModel<Document>> updates = + new ArrayList<UpdateOneModel<Document>>(bulkInserts.size()); + for (Document doc : bulkInserts) { + updates.add(new UpdateOneModel<Document>( + new Document("_id", doc.get("_id")), + doc, UPDATE_WITH_UPSERT)); + } + collection.bulkWrite(updates); + } else { + collection.insertMany(bulkInserts, INSERT_UNORDERED); + } bulkInserts.clear(); + } else { + return OptionsSupport.BATCHED_OK; } } - return 0; + return Status.OK; } catch (Exception e) { System.err.println("Exception while trying bulk insert with " + bulkInserts.size()); e.printStackTrace(); - return 1; + return Status.ERROR; } } @@ -288,7 +314,7 @@ public class MongoDbClient extends DB { * @return Zero on success, a non-zero error code on error or "not found". */ @Override - public int read(String table, String key, Set<String> fields, + public Status read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { try { MongoCollection<Document> collection = database.getCollection(table); @@ -309,10 +335,10 @@ public class MongoDbClient extends DB { if (queryResult != null) { fillMap(result, queryResult); } - return queryResult != null ? 0 : 1; + return queryResult != null ? Status.OK : Status.NOT_FOUND; } catch (Exception e) { System.err.println(e.toString()); - return 1; + return Status.ERROR; } } @@ -335,7 +361,7 @@ public class MongoDbClient extends DB { * class's description for a discussion of error codes. */ @Override - public int scan(String table, String startkey, int recordcount, + public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { MongoCursor<Document> cursor = null; try { @@ -360,7 +386,7 @@ public class MongoDbClient extends DB { if (!cursor.hasNext()) { System.err.println("Nothing found in scan for key " + startkey); - return 1; + return Status.ERROR; } result.ensureCapacity(recordcount); @@ -375,10 +401,10 @@ public class MongoDbClient extends DB { result.add(resultMap); } - return 0; + return Status.OK; } catch (Exception e) { System.err.println(e.toString()); - return 1; + return Status.ERROR; } finally { if (cursor != null) { cursor.close(); @@ -401,7 +427,7 @@ public class MongoDbClient extends DB { * description for a discussion of error codes. */ @Override - public int update(String table, String key, + public Status update(String table, String key, HashMap<String, ByteIterator> values) { try { MongoCollection<Document> collection = database.getCollection(table); @@ -416,12 +442,12 @@ public class MongoDbClient extends DB { UpdateResult result = collection.updateOne(query, update); if (result.wasAcknowledged() && result.getMatchedCount() == 0) { System.err.println("Nothing updated for key " + key); - return 1; + return Status.NOT_FOUND; } - return 0; + return Status.OK; } catch (Exception e) { System.err.println(e.toString()); - return 1; + return Status.ERROR; } } diff --git a/mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java b/mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java index 62092a0d10a51e4384156235f4a59504585ea853..c8aacd464f76946fa670f377ff0c0f853232b3ea 100644 --- a/mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java +++ b/mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java @@ -18,6 +18,8 @@ package com.yahoo.ycsb.db; import java.util.Properties; +import com.yahoo.ycsb.Status; + /** * OptionsSupport provides methods for handling legacy options. * @@ -25,6 +27,13 @@ import java.util.Properties; */ public final class OptionsSupport { + /** + * Status used for operations that have not been send to the server and have + * only been batched by the client. + */ + public static final Status BATCHED_OK = new Status("BATCHED_OK", + "The operation has been batched by the binding."); + /** Value for an unavailable property. */ private static final String UNAVAILABLE = "n/a"; diff --git a/mongodb/src/main/resources/log4j.properties b/mongodb/src/main/resources/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..266877c4aff8caf4e3145f812d85a6f2d272893b --- /dev/null +++ b/mongodb/src/main/resources/log4j.properties @@ -0,0 +1,25 @@ +# Copyright (c) 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. + +#define the console appender +log4j.appender.consoleAppender = org.apache.log4j.ConsoleAppender + +# now define the layout for the appender +log4j.appender.consoleAppender.layout = org.apache.log4j.PatternLayout +log4j.appender.consoleAppender.layout.ConversionPattern=%-4r [%t] %-5p %c %x -%m%n + +# now map our console appender as a root logger, means all log messages will go +# to this appender +log4j.rootLogger = INFO, consoleAppender diff --git a/mongodb/src/test/java/com/yahoo/ycsb/db/AbstractDBTestCases.java b/mongodb/src/test/java/com/yahoo/ycsb/db/AbstractDBTestCases.java index a2ced3f543b0d91797e63dfffc7a1989b689a65e..9a0b095f3d7c36a864b31744cd4714167704e9f6 100644 --- a/mongodb/src/test/java/com/yahoo/ycsb/db/AbstractDBTestCases.java +++ b/mongodb/src/test/java/com/yahoo/ycsb/db/AbstractDBTestCases.java @@ -24,21 +24,23 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeNoException; +import com.yahoo.ycsb.ByteArrayByteIterator; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.Status; + +import org.junit.BeforeClass; +import org.junit.Test; + import java.io.IOException; import java.net.InetAddress; import java.net.Socket; import java.util.Collections; import java.util.HashMap; +import java.util.Properties; import java.util.Set; import java.util.Vector; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.yahoo.ycsb.ByteArrayByteIterator; -import com.yahoo.ycsb.ByteIterator; -import com.yahoo.ycsb.DB; - /** * MongoDbClientTest provides runs the basic DB test cases. * <p> @@ -92,13 +94,13 @@ public abstract class AbstractDBTestCases { HashMap<String, ByteIterator> inserted = new HashMap<String, ByteIterator>(); inserted.put("a", new ByteArrayByteIterator(new byte[] { 1, 2, 3, 4 })); - int result = client.insert(table, id, inserted); - assertThat("Insert did not return success (0).", result, is(0)); + Status result = client.insert(table, id, inserted); + assertThat("Insert did not return success (0).", result, is(Status.OK)); HashMap<String, ByteIterator> read = new HashMap<String, ByteIterator>(); Set<String> keys = Collections.singleton("a"); result = client.read(table, id, keys, read); - assertThat("Read did not return success (0).", result, is(0)); + assertThat("Read did not return success (0).", result, is(Status.OK)); for (String key : keys) { ByteIterator iter = read.get(key); @@ -116,16 +118,16 @@ public abstract class AbstractDBTestCases { } result = client.delete(table, id); - assertThat("Delete did not return success (0).", result, is(0)); + assertThat("Delete did not return success (0).", result, is(Status.OK)); read.clear(); result = client.read(table, id, null, read); assertThat("Read, after delete, did not return not found (1).", result, - is(1)); + is(Status.NOT_FOUND)); assertThat("Found the deleted fields.", read.size(), is(0)); result = client.delete(table, id); - assertThat("Delete did not return not found (1).", result, is(1)); + assertThat("Delete did not return not found (1).", result, is(Status.NOT_FOUND)); } /** @@ -141,13 +143,76 @@ public abstract class AbstractDBTestCases { HashMap<String, ByteIterator> inserted = new HashMap<String, ByteIterator>(); inserted.put("a", new ByteArrayByteIterator(new byte[] { 1, 2, 3, 4 })); - int result = client.insert(table, id, inserted); - assertThat("Insert did not return success (0).", result, is(0)); + Status result = client.insert(table, id, inserted); + assertThat("Insert did not return success (0).", result, is(Status.OK)); + + HashMap<String, ByteIterator> read = new HashMap<String, ByteIterator>(); + Set<String> keys = Collections.singleton("a"); + result = client.read(table, id, keys, read); + assertThat("Read did not return success (0).", result, is(Status.OK)); + for (String key : keys) { + ByteIterator iter = read.get(key); + + assertThat("Did not read the inserted field: " + key, iter, + notNullValue()); + assertTrue(iter.hasNext()); + assertThat(iter.nextByte(), is(Byte.valueOf((byte) 1))); + assertTrue(iter.hasNext()); + assertThat(iter.nextByte(), is(Byte.valueOf((byte) 2))); + assertTrue(iter.hasNext()); + assertThat(iter.nextByte(), is(Byte.valueOf((byte) 3))); + assertTrue(iter.hasNext()); + assertThat(iter.nextByte(), is(Byte.valueOf((byte) 4))); + assertFalse(iter.hasNext()); + } + + HashMap<String, ByteIterator> updated = new HashMap<String, ByteIterator>(); + updated.put("a", new ByteArrayByteIterator(new byte[] { 5, 6, 7, 8 })); + result = client.update(table, id, updated); + assertThat("Update did not return success (0).", result, is(Status.OK)); + + read.clear(); + result = client.read(table, id, null, read); + assertThat("Read, after update, did not return success (0).", result, is(Status.OK)); + for (String key : keys) { + ByteIterator iter = read.get(key); + + assertThat("Did not read the inserted field: " + key, iter, + notNullValue()); + assertTrue(iter.hasNext()); + assertThat(iter.nextByte(), is(Byte.valueOf((byte) 5))); + assertTrue(iter.hasNext()); + assertThat(iter.nextByte(), is(Byte.valueOf((byte) 6))); + assertTrue(iter.hasNext()); + assertThat(iter.nextByte(), is(Byte.valueOf((byte) 7))); + assertTrue(iter.hasNext()); + assertThat(iter.nextByte(), is(Byte.valueOf((byte) 8))); + assertFalse(iter.hasNext()); + } + } + + /** + * Test method for {@link DB#insert}, {@link DB#read}, and {@link DB#update} . + */ + @Test + public void testInsertReadUpdateWithUpsert() { + Properties props = new Properties(); + props.setProperty("mongodb.upsert", "true"); + DB client = getDB(props); + + final String table = getClass().getSimpleName(); + final String id = "updateWithUpsert"; + + HashMap<String, ByteIterator> inserted = + new HashMap<String, ByteIterator>(); + inserted.put("a", new ByteArrayByteIterator(new byte[] { 1, 2, 3, 4 })); + Status result = client.insert(table, id, inserted); + assertThat("Insert did not return success (0).", result, is(Status.OK)); HashMap<String, ByteIterator> read = new HashMap<String, ByteIterator>(); Set<String> keys = Collections.singleton("a"); result = client.read(table, id, keys, read); - assertThat("Read did not return success (0).", result, is(0)); + assertThat("Read did not return success (0).", result, is(Status.OK)); for (String key : keys) { ByteIterator iter = read.get(key); @@ -167,11 +232,11 @@ public abstract class AbstractDBTestCases { HashMap<String, ByteIterator> updated = new HashMap<String, ByteIterator>(); updated.put("a", new ByteArrayByteIterator(new byte[] { 5, 6, 7, 8 })); result = client.update(table, id, updated); - assertThat("Update did not return success (0).", result, is(0)); + assertThat("Update did not return success (0).", result, is(Status.OK)); read.clear(); result = client.read(table, id, null, read); - assertThat("Read, after update, did not return success (0).", result, is(0)); + assertThat("Read, after update, did not return success (0).", result, is(Status.OK)); for (String key : keys) { ByteIterator iter = read.get(key); @@ -205,15 +270,15 @@ public abstract class AbstractDBTestCases { inserted.put("a", new ByteArrayByteIterator(new byte[] { (byte) (i & 0xFF), (byte) (i >> 8 & 0xFF), (byte) (i >> 16 & 0xFF), (byte) (i >> 24 & 0xFF) })); - int result = client.insert(table, padded(i), inserted); - assertThat("Insert did not return success (0).", result, is(0)); + Status result = client.insert(table, padded(i), inserted); + assertThat("Insert did not return success (0).", result, is(Status.OK)); } Set<String> keys = Collections.singleton("a"); Vector<HashMap<String, ByteIterator>> results = new Vector<HashMap<String, ByteIterator>>(); - int result = client.scan(table, "00050", 5, null, results); - assertThat("Read did not return success (0).", result, is(0)); + Status result = client.scan(table, "00050", 5, null, results); + assertThat("Read did not return success (0).", result, is(Status.OK)); assertThat(results.size(), is(5)); for (int i = 0; i < 5; ++i) { HashMap<String, ByteIterator> read = results.get(i); @@ -243,7 +308,18 @@ public abstract class AbstractDBTestCases { * * @return The test DB. */ - protected abstract DB getDB(); + protected DB getDB() { + return getDB(new Properties()); + } + + /** + * Gets the test DB. + * + * @param props + * Properties to pass to the client. + * @return The test DB. + */ + protected abstract DB getDB(Properties props); /** * Creates a zero padded integer. diff --git a/mongodb/src/test/java/com/yahoo/ycsb/db/AsyncMongoDbClientTest.java b/mongodb/src/test/java/com/yahoo/ycsb/db/AsyncMongoDbClientTest.java index 11b45b2db9b17e4dc8337a6a3472e900670c3e23..c387be491dec02f9fefd75f7e0c1398793d42a24 100644 --- a/mongodb/src/test/java/com/yahoo/ycsb/db/AsyncMongoDbClientTest.java +++ b/mongodb/src/test/java/com/yahoo/ycsb/db/AsyncMongoDbClientTest.java @@ -16,59 +16,15 @@ */ package com.yahoo.ycsb.db; -import static org.junit.Assume.assumeNoException; - -import java.util.Properties; - -import org.junit.After; -import org.junit.Before; - import com.yahoo.ycsb.DB; /** * AsyncMongoDbClientTest provides runs the basic workload operations. */ -public class AsyncMongoDbClientTest extends AbstractDBTestCases { - - /** The client to use. */ - private AsyncMongoDbClient myClient = null; - - /** - * Start a test client. - */ - @Before - public void setUp() { - myClient = new AsyncMongoDbClient(); - myClient.setProperties(new Properties()); - try { - myClient.init(); - } catch (Exception error) { - assumeNoException(error); - } - } - - /** - * Stops the test client. - */ - @After - public void tearDown() { - try { - myClient.cleanup(); - } catch (Exception error) { - // Ignore. - } finally { - myClient = null; - } - } +public class AsyncMongoDbClientTest extends MongoDbClientTest { - /** - * {@inheritDoc} - * <p> - * Overriden to return the {@link AsyncMongoDbClient}. - * </p> - */ @Override - protected DB getDB() { - return myClient; + protected DB instantiateClient() { + return new AsyncMongoDbClient(); } } diff --git a/mongodb/src/test/java/com/yahoo/ycsb/db/MongoDbClientTest.java b/mongodb/src/test/java/com/yahoo/ycsb/db/MongoDbClientTest.java index 47a926e42915d8f1a104c07474df3007212ee461..3a4b4f0277beaa0425bcb674fabbece51dc90214 100644 --- a/mongodb/src/test/java/com/yahoo/ycsb/db/MongoDbClientTest.java +++ b/mongodb/src/test/java/com/yahoo/ycsb/db/MongoDbClientTest.java @@ -21,7 +21,6 @@ import static org.junit.Assume.assumeNoException; import java.util.Properties; import org.junit.After; -import org.junit.Before; import com.yahoo.ycsb.DB; @@ -31,20 +30,10 @@ import com.yahoo.ycsb.DB; public class MongoDbClientTest extends AbstractDBTestCases { /** The client to use. */ - private MongoDbClient myClient = null; + private DB myClient = null; - /** - * Start a test client. - */ - @Before - public void setUp() { - myClient = new MongoDbClient(); - myClient.setProperties(new Properties()); - try { - myClient.init(); - } catch (Exception error) { - assumeNoException(error); - } + protected DB instantiateClient() { + return new MongoDbClient(); } /** @@ -64,11 +53,20 @@ public class MongoDbClientTest extends AbstractDBTestCases { /** * {@inheritDoc} * <p> - * Overriden to return the {@link MongoDbClient}. + * Overridden to return the {@link MongoDbClient}. * </p> */ @Override - protected DB getDB() { + protected DB getDB(Properties props) { + if( myClient == null ) { + myClient = instantiateClient(); + myClient.setProperties(props); + try { + myClient.init(); + } catch (Exception error) { + assumeNoException(error); + } + } return myClient; } } diff --git a/nosqldb/README b/nosqldb/README.md similarity index 100% rename from nosqldb/README rename to nosqldb/README.md diff --git a/nosqldb/pom.xml b/nosqldb/pom.xml index 2397840ad128c24903b0bbf9a6f57e49042c0316..434301fd0485e876c7803a2cec410e27cd4f2f90 100644 --- a/nosqldb/pom.xml +++ b/nosqldb/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -21,18 +21,19 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> <artifactId>nosqldb-binding</artifactId> <name>Oracle NoSQL Database Binding</name> + <packaging>jar</packaging> <dependencies> <dependency> - <groupId>com.oracle</groupId> - <artifactId>kvclient</artifactId> - <version>1.2.123</version> + <groupId>com.oracle.kv</groupId> + <artifactId>oracle-nosql-client</artifactId> + <version>3.0.5</version> </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> diff --git a/nosqldb/src/main/java/com/yahoo/ycsb/db/NoSqlDbClient.java b/nosqldb/src/main/java/com/yahoo/ycsb/db/NoSqlDbClient.java index 1426678dcc185c9631238c5daf69bb2c2879875a..8282062053890b0d2a3f78bf97d342519af19243 100644 --- a/nosqldb/src/main/java/com/yahoo/ycsb/db/NoSqlDbClient.java +++ b/nosqldb/src/main/java/com/yahoo/ycsb/db/NoSqlDbClient.java @@ -42,197 +42,209 @@ import com.yahoo.ycsb.ByteArrayByteIterator; import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; /** * A database interface layer for Oracle NoSQL Database. */ public class NoSqlDbClient extends DB { - - public static final int OK = 0; - public static final int ERROR = -1; - - KVStore store; - - private int getPropertyInt(Properties properties, String key, int defaultValue) throws DBException { - String p = properties.getProperty(key); - int i = defaultValue; - if (p != null) { - try { - i = Integer.parseInt(p); - } catch (NumberFormatException e) { - throw new DBException("Illegal number format in " + key + " property"); - } - } - return i; - } - - @Override - public void init() throws DBException { - Properties properties = getProperties(); - - /* Mandatory properties */ - String storeName = properties.getProperty("storeName", "kvstore"); - String[] helperHosts = properties.getProperty("helperHost", "localhost:5000").split(","); - - KVStoreConfig config = new KVStoreConfig(storeName, helperHosts); - - /* Optional properties */ - String p; - - p = properties.getProperty("consistency"); - if (p != null) { - if (p.equalsIgnoreCase("ABSOLUTE")) { - config.setConsistency(Consistency.ABSOLUTE); - } else if (p.equalsIgnoreCase("NONE_REQUIRED")) { - config.setConsistency(Consistency.NONE_REQUIRED); - } else { - throw new DBException("Illegal value in consistency property"); - } - } - - p = properties.getProperty("durability"); - if (p != null) { - if (p.equalsIgnoreCase("COMMIT_NO_SYNC")) { - config.setDurability(Durability.COMMIT_NO_SYNC); - } else if (p.equalsIgnoreCase("COMMIT_SYNC")) { - config.setDurability(Durability.COMMIT_SYNC); - } else if (p.equalsIgnoreCase("COMMIT_WRITE_NO_SYNC")) { - config.setDurability(Durability.COMMIT_WRITE_NO_SYNC); - } else { - throw new DBException("Illegal value in durability property"); - } - } - - int maxActiveRequests = getPropertyInt(properties, - "requestLimit.maxActiveRequests", RequestLimitConfig.DEFAULT_MAX_ACTIVE_REQUESTS); - int requestThresholdPercent = getPropertyInt(properties, - "requestLimit.requestThresholdPercent", RequestLimitConfig.DEFAULT_REQUEST_THRESHOLD_PERCENT); - int nodeLimitPercent = getPropertyInt(properties, - "requestLimit.nodeLimitPercent", RequestLimitConfig.DEFAULT_NODE_LIMIT_PERCENT); - RequestLimitConfig requestLimitConfig; - /* It is said that the constructor could throw NodeRequestLimitException in Javadoc, the exception is not provided */ -// try { - requestLimitConfig = new RequestLimitConfig(maxActiveRequests, requestThresholdPercent, nodeLimitPercent); -// } catch (NodeRequestLimitException e) { -// throw new DBException(e); -// } - config.setRequestLimit(requestLimitConfig); - - p = properties.getProperty("requestTimeout"); - if (p != null) { - long timeout = 1; - try { - timeout = Long.parseLong(p); - } catch (NumberFormatException e) { - throw new DBException("Illegal number format in requestTimeout property"); - } - try { - // TODO Support other TimeUnit - config.setRequestTimeout(timeout, TimeUnit.SECONDS); - } catch (IllegalArgumentException e) { - throw new DBException(e); - } - } - - try { - store = KVStoreFactory.getStore(config); - } catch (FaultException e) { - throw new DBException(e); - } - } - - @Override - public void cleanup() throws DBException { - store.close(); - } - - /** - * Create a key object. - * We map "table" and (YCSB's) "key" to a major component of the oracle.kv.Key, - * and "field" to a minor component. - * - * @return An oracle.kv.Key object. - */ - private static Key createKey(String table, String key, String field) { - List<String> majorPath = new ArrayList<String>(); - majorPath.add(table); - majorPath.add(key); - if (field == null) { - return Key.createKey(majorPath); - } - - return Key.createKey(majorPath, field); - } - - private static Key createKey(String table, String key) { - return createKey(table, key, null); - } - - private static String getFieldFromKey(Key key) { - return key.getMinorPath().get(0); - } - - @Override - public int read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { - Key kvKey = createKey(table, key); - SortedMap<Key, ValueVersion> kvResult; - try { - kvResult = store.multiGet(kvKey, null, null); - } catch (FaultException e) { - System.err.println(e); - return ERROR; - } - - for (Map.Entry<Key, ValueVersion> entry : kvResult.entrySet()) { - /* If fields is null, read all fields */ - String field = getFieldFromKey(entry.getKey()); - if (fields != null && !fields.contains(field)) { - continue; - } - result.put(field, new ByteArrayByteIterator(entry.getValue().getValue().getValue())); - } - - return OK; - } - - @Override - public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { - System.err.println("Oracle NoSQL Database does not support Scan semantics"); - return ERROR; - } - - @Override - public int update(String table, String key, HashMap<String, ByteIterator> values) { - for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { - Key kvKey = createKey(table, key, entry.getKey()); - Value kvValue = Value.createValue(entry.getValue().toArray()); - try { - store.put(kvKey, kvValue); - } catch (FaultException e) { - System.err.println(e); - return ERROR; - } - } - - return OK; - } - - @Override - public int insert(String table, String key, HashMap<String, ByteIterator> values) { - return update(table, key, values); - } - - @Override - public int delete(String table, String key) { - Key kvKey = createKey(table, key); - try { - store.multiDelete(kvKey, null, null); - } catch (FaultException e) { - System.err.println(e); - return ERROR; - } - - return OK; - } + + private KVStore store; + + private int getPropertyInt(Properties properties, String key, + int defaultValue) throws DBException { + String p = properties.getProperty(key); + int i = defaultValue; + if (p != null) { + try { + i = Integer.parseInt(p); + } catch (NumberFormatException e) { + throw new DBException("Illegal number format in " + key + " property"); + } + } + return i; + } + + @Override + public void init() throws DBException { + Properties properties = getProperties(); + + /* Mandatory properties */ + String storeName = properties.getProperty("storeName", "kvstore"); + String[] helperHosts = + properties.getProperty("helperHost", "localhost:5000").split(","); + + KVStoreConfig config = new KVStoreConfig(storeName, helperHosts); + + /* Optional properties */ + String p; + + p = properties.getProperty("consistency"); + if (p != null) { + if (p.equalsIgnoreCase("ABSOLUTE")) { + config.setConsistency(Consistency.ABSOLUTE); + } else if (p.equalsIgnoreCase("NONE_REQUIRED")) { + config.setConsistency(Consistency.NONE_REQUIRED); + } else { + throw new DBException("Illegal value in consistency property"); + } + } + + p = properties.getProperty("durability"); + if (p != null) { + if (p.equalsIgnoreCase("COMMIT_NO_SYNC")) { + config.setDurability(Durability.COMMIT_NO_SYNC); + } else if (p.equalsIgnoreCase("COMMIT_SYNC")) { + config.setDurability(Durability.COMMIT_SYNC); + } else if (p.equalsIgnoreCase("COMMIT_WRITE_NO_SYNC")) { + config.setDurability(Durability.COMMIT_WRITE_NO_SYNC); + } else { + throw new DBException("Illegal value in durability property"); + } + } + + int maxActiveRequests = + getPropertyInt(properties, "requestLimit.maxActiveRequests", + RequestLimitConfig.DEFAULT_MAX_ACTIVE_REQUESTS); + int requestThresholdPercent = + getPropertyInt(properties, "requestLimit.requestThresholdPercent", + RequestLimitConfig.DEFAULT_REQUEST_THRESHOLD_PERCENT); + int nodeLimitPercent = + getPropertyInt(properties, "requestLimit.nodeLimitPercent", + RequestLimitConfig.DEFAULT_NODE_LIMIT_PERCENT); + RequestLimitConfig requestLimitConfig; + /* + * It is said that the constructor could throw NodeRequestLimitException in + * Javadoc, the exception is not provided + */ + // try { + requestLimitConfig = new RequestLimitConfig(maxActiveRequests, + requestThresholdPercent, nodeLimitPercent); + // } catch (NodeRequestLimitException e) { + // throw new DBException(e); + // } + config.setRequestLimit(requestLimitConfig); + + p = properties.getProperty("requestTimeout"); + if (p != null) { + long timeout = 1; + try { + timeout = Long.parseLong(p); + } catch (NumberFormatException e) { + throw new DBException( + "Illegal number format in requestTimeout property"); + } + try { + // TODO Support other TimeUnit + config.setRequestTimeout(timeout, TimeUnit.SECONDS); + } catch (IllegalArgumentException e) { + throw new DBException(e); + } + } + + try { + store = KVStoreFactory.getStore(config); + } catch (FaultException e) { + throw new DBException(e); + } + } + + @Override + public void cleanup() throws DBException { + store.close(); + } + + /** + * Create a key object. We map "table" and (YCSB's) "key" to a major component + * of the oracle.kv.Key, and "field" to a minor component. + * + * @return An oracle.kv.Key object. + */ + private static Key createKey(String table, String key, String field) { + List<String> majorPath = new ArrayList<String>(); + majorPath.add(table); + majorPath.add(key); + if (field == null) { + return Key.createKey(majorPath); + } + + return Key.createKey(majorPath, field); + } + + private static Key createKey(String table, String key) { + return createKey(table, key, null); + } + + private static String getFieldFromKey(Key key) { + return key.getMinorPath().get(0); + } + + @Override + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + Key kvKey = createKey(table, key); + SortedMap<Key, ValueVersion> kvResult; + try { + kvResult = store.multiGet(kvKey, null, null); + } catch (FaultException e) { + System.err.println(e); + return Status.ERROR; + } + + for (Map.Entry<Key, ValueVersion> entry : kvResult.entrySet()) { + /* If fields is null, read all fields */ + String field = getFieldFromKey(entry.getKey()); + if (fields != null && !fields.contains(field)) { + continue; + } + result.put(field, + new ByteArrayByteIterator(entry.getValue().getValue().getValue())); + } + + return Status.OK; + } + + @Override + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + System.err.println("Oracle NoSQL Database does not support Scan semantics"); + return Status.ERROR; + } + + @Override + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { + Key kvKey = createKey(table, key, entry.getKey()); + Value kvValue = Value.createValue(entry.getValue().toArray()); + try { + store.put(kvKey, kvValue); + } catch (FaultException e) { + System.err.println(e); + return Status.ERROR; + } + } + + return Status.OK; + } + + @Override + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + return update(table, key, values); + } + + @Override + public Status delete(String table, String key) { + Key kvKey = createKey(table, key); + try { + store.multiDelete(kvKey, null, null); + } catch (FaultException e) { + System.err.println(e); + return Status.ERROR; + } + + return Status.OK; + } } diff --git a/nosqldb/src/main/java/com/yahoo/ycsb/db/package-info.java b/nosqldb/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..2e8b9c5a1220587b3a42f9b792a845db3c6789b9 --- /dev/null +++ b/nosqldb/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2014, Yahoo!, Inc. 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. + */ + +/** + * The YCSB binding for <a href= + * "http://www.oracle.com/us/products/database/nosql/overview/index.html">Oracle + * 's NoSQL DB</a>. + */ +package com.yahoo.ycsb.db; diff --git a/orientdb/README.md b/orientdb/README.md index 02d1a23ef231fabd55df70507093656ac71a57c0..09d6baf601b06a05ddc68b7fa551182de2351ec2 100644 --- a/orientdb/README.md +++ b/orientdb/README.md @@ -1,5 +1,5 @@ <!-- -Copyright (c) 2012 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -23,7 +23,7 @@ This section describes how to run YCSB on OrientDB running locally. Clone the YCSB git repository and compile: - git clone git://github.com/nuvolabase/YCSB.git + git clone https://github.com/brianfrankcooper/YCSB.git cd YCSB mvn clean package @@ -39,10 +39,38 @@ Then, run the workload: See the next section for the list of configuration parameters for OrientDB. -## OrientDB Configuration Parameters +## DB creation with the OrientDBClient +This client will create a database for you if the connection database you specify does not exists. You can also specify connection information to a preexisting database. + +You can use the ```orientdb.newdb=true``` property to allow this client to drop and create a new database instance during the ```load``` phase. -### `OrientDB.url` (default: `local:C:/temp/databases/ycsb`) +NOTE: understand that using the ```orientdb.newdb=true``` property will drop and recreate databases even if it was a preexisting instance. -### `OrientDB.user` (default `admin`) +WARNING: Creating a new database will be done safely with multiple threads on a single YCSB instance, but is not guaranteed to work when launching multiple YCSB instances. In that scenario it is suggested that you create the db before hand, or run the ```load``` phase with a single YCSB instance. + +## OrientDB Configuration Parameters -### `OrientDB.password` (default `admin`) +* ```orientdb.url``` - (required) The address to your database. + * Supported storage types: memory, plocal, remote + * EX. ```plocal:/path/to/database``` +* ```orientdb.user``` - The user to connect to the database with. + * Default: ```admin``` +* ```orientdb.password``` - The password to connect to the database with. + * Default: ```admin``` +* ```orientdb.newdb``` - Overwrite the database if it already exists. + * Only effects the ```load``` phase. + * Default: ```false``` +* ```orientdb.intent``` - Declare an Intent to the database. + * This is an optimization feature provided by OrientDB: http://orientdb.com/docs/2.1/Performance-Tuning.html#massive-insertion + * Possible values are: + * massiveinsert + * massiveread + * nocache +* ```orientdb.remote.storagetype``` - Storage type of the database on remote server + * This is only required if using a ```remote:``` connection url + +## Known Issues + +* There is a performance issue around the scan operation. This binding uses OIndex.iterateEntriesMajor() which will return unnecessarily large iterators. This has a performance impact as the recordcount goes up. There are ideas in the works to fix it, track it here: [#568](https://github.com/brianfrankcooper/YCSB/issues/568). +* The OIndexCursor used to run the scan operation currently seems to be broken. Because of this, if the startkey and recordcount combination on a particular operation were to cause the iterator to go to the end, a NullPointerException is thrown. With sufficiently high record counts, this does not happen very often, but it could cause false negatives. Track that issue here: https://github.com/orientechnologies/orientdb/issues/5541. +* Iterator methods needed to perform scans are Unsupported in the OrientDB API for remote database connections and so will return NOT_IMPLEMENTED status if attempted. diff --git a/orientdb/pom.xml b/orientdb/pom.xml index 253f389b0696a546dd3cfa1199119891b4637819..79c38873ddd1c04306f3e75ccd2208603c40fe2a 100644 --- a/orientdb/pom.xml +++ b/orientdb/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -17,35 +17,46 @@ 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.4.0-SNAPSHOT</version> - <relativePath>../binding-parent</relativePath> - </parent> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>binding-parent</artifactId> + <version>0.7.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> + </parent> - <artifactId>orientdb-binding</artifactId> - <name>OrientDB Binding</name> - <packaging>jar</packaging> - <repositories> - <repository> - <id>sonatype-nexus-snapshots</id> - <name>Sonatype Nexus Snapshots</name> - <url>https://oss.sonatype.org/content/repositories/snapshots</url> - </repository> - </repositories> - <dependencies> - <dependency> - <groupId>com.yahoo.ycsb</groupId> - <artifactId>core</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.orientechnologies</groupId> - <artifactId>orientdb-core</artifactId> - <version>1.7.10</version> - </dependency> - </dependencies> + <artifactId>orientdb-binding</artifactId> + <name>OrientDB Binding</name> + <packaging>jar</packaging> + <repositories> + <repository> + <id>sonatype-nexus-snapshots</id> + <name>Sonatype Nexus Snapshots</name> + <url>https://oss.sonatype.org/content/repositories/snapshots</url> + </repository> + </repositories> + <dependencies> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.orientechnologies</groupId> + <artifactId>orientdb-client</artifactId> + <version>${orientdb.version}</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.7.10</version> + </dependency> + </dependencies> </project> diff --git a/orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java b/orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java index fb0d7dd6ed14e4d80fc53cdf16d842821ece1d40..b776322895e5a977368ce164259a414b3287b25b 100644 --- a/orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java +++ b/orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. + * Copyright (c) 2012 - 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 @@ -15,28 +15,31 @@ * LICENSE file. */ -/** - * OrientDB client binding for YCSB. - * - * Submitted by Luca Garulli on 5/10/2012. - * - */ - package com.yahoo.ycsb.db; -import com.orientechnologies.orient.core.config.OGlobalConfiguration; +import com.orientechnologies.common.exception.OException; +import com.orientechnologies.orient.client.remote.OEngineRemote; +import com.orientechnologies.orient.client.remote.OServerAdmin; +import com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal; import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx; import com.orientechnologies.orient.core.db.record.OIdentifiable; import com.orientechnologies.orient.core.dictionary.ODictionary; +import com.orientechnologies.orient.core.exception.ODatabaseException; import com.orientechnologies.orient.core.index.OIndexCursor; import com.orientechnologies.orient.core.intent.OIntentMassiveInsert; -import com.orientechnologies.orient.core.record.ORecordInternal; +import com.orientechnologies.orient.core.intent.OIntentMassiveRead; +import com.orientechnologies.orient.core.intent.OIntentNoCache; +import com.orientechnologies.orient.core.record.ORecord; import com.orientechnologies.orient.core.record.impl.ODocument; import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; import com.yahoo.ycsb.StringByteIterator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.io.IOException; import java.util.HashMap; import java.util.Map.Entry; import java.util.Properties; @@ -45,75 +48,152 @@ import java.util.Vector; /** * OrientDB client for YCSB framework. - * - * Properties to set: - * - * orientdb.url=local:C:/temp/databases or remote:localhost:2424 <br> - * orientdb.database=ycsb <br> - * orientdb.user=admin <br> - * orientdb.password=admin <br> - * - * @author Luca Garulli - * */ public class OrientDBClient extends DB { - private static final String CLASS = "usertable"; - private ODatabaseDocumentTx db; - private ODictionary<ORecordInternal<?>> dictionary; + private static final String CLASS = "usertable"; + private ODatabaseDocumentTx db; + private ODictionary<ORecord> dictionary; + private boolean isRemote = false; + + private static final String URL_PROPERTY = "orientdb.url"; + + private static final String USER_PROPERTY = "orientdb.user"; + private static final String USER_PROPERTY_DEFAULT = "admin"; + + private static final String PASSWORD_PROPERTY = "orientdb.password"; + private static final String PASSWORD_PROPERTY_DEFAULT = "admin"; + + private static final String NEWDB_PROPERTY = "orientdb.newdb"; + private static final String NEWDB_PROPERTY_DEFAULT = "false"; + + private static final String STORAGE_TYPE_PROPERTY = "orientdb.remote.storagetype"; + + private static final String INTENT_PROPERTY = "orientdb.intent"; + private static final String INTENT_PROPERTY_DEFAULT = ""; + + private static final String DO_TRANSACTIONS_PROPERTY = "dotransactions"; + private static final String DO_TRANSACTIONS_PROPERTY_DEFAULT = "true"; + + private static final String ORIENTDB_DOCUMENT_TYPE = "document"; + private static final String ORIENTDB_MASSIVEINSERT = "massiveinsert"; + private static final String ORIENTDB_MASSIVEREAD = "massiveread"; + private static final String ORIENTDB_NOCACHE = "nocache"; + + private static final Logger LOG = LoggerFactory.getLogger(OrientDBClient.class); /** - * Initialize any state for this DB. Called once per DB instance; there is one DB instance per client thread. + * This method abstracts the administration of OrientDB namely creating and connecting to a database. + * Creating a database needs to be done in a synchronized method so that multiple threads do not all try + * to run the creation operation simultaneously, this ends in failure. + * + * @param props Workload properties object + * @return a usable ODatabaseDocumentTx object + * @throws DBException */ - public void init() throws DBException { - // initialize OrientDB driver - Properties props = getProperties(); + private static synchronized ODatabaseDocumentTx initDB(Properties props) throws DBException { + String url = props.getProperty(URL_PROPERTY); + String user = props.getProperty(USER_PROPERTY, USER_PROPERTY_DEFAULT); + String password = props.getProperty(PASSWORD_PROPERTY, PASSWORD_PROPERTY_DEFAULT); + Boolean newdb = Boolean.parseBoolean(props.getProperty(NEWDB_PROPERTY, NEWDB_PROPERTY_DEFAULT)); + String remoteStorageType = props.getProperty(STORAGE_TYPE_PROPERTY); + Boolean isrun = Boolean.parseBoolean(props.getProperty(DO_TRANSACTIONS_PROPERTY, DO_TRANSACTIONS_PROPERTY_DEFAULT)); - String url; - if (System.getProperty("os.name").toLowerCase().contains("win")) - url = props.getProperty("orientdb.url", "plocal:C:/temp/databases/ycsb"); - else - url = props.getProperty("orientdb.url", "plocal:/temp/databases/ycsb"); + ODatabaseDocumentTx dbconn; - String user = props.getProperty("orientdb.user", "admin"); - String password = props.getProperty("orientdb.password", "admin"); - Boolean newdb = Boolean.parseBoolean(props.getProperty("orientdb.newdb", "false")); + if (url == null) { + throw new DBException(String.format("Required property \"%s\" missing for OrientDBClient", URL_PROPERTY)); + } - try { - System.out.println("OrientDB loading database url = " + url); - - OGlobalConfiguration.STORAGE_KEEP_OPEN.setValue(false); - db = new ODatabaseDocumentTx(url); - if (db.exists()) { - db.open(user, password); - if (newdb) { - System.out.println("OrientDB drop and recreate fresh db"); - db.drop(); - db.create(); + LOG.info("OrientDB loading database url = " + url); + + // If using a remote database, use the OServerAdmin interface to connect + if (url.startsWith(OEngineRemote.NAME)) { + if (remoteStorageType == null) { + throw new DBException("When connecting to a remote OrientDB instance, " + + "specify a database storage type (plocal or memory) with " + STORAGE_TYPE_PROPERTY); + } + + try { + OServerAdmin server = new OServerAdmin(url).connect(user, password); + + if (server.existsDatabase()) { + if (newdb && !isrun) { + LOG.info("OrientDB dropping and recreating fresh db on remote server."); + server.dropDatabase(remoteStorageType); + server.createDatabase(server.getURL(), ORIENTDB_DOCUMENT_TYPE, remoteStorageType); + } + } else { + LOG.info("OrientDB database not found, creating fresh db"); + server.createDatabase(server.getURL(), ORIENTDB_DOCUMENT_TYPE, remoteStorageType); + } + + server.close(); + dbconn = new ODatabaseDocumentTx(url).open(user, password); + } catch (IOException | OException e) { + throw new DBException(String.format("Error interfacing with %s", url), e); + } + } else { + try { + dbconn = new ODatabaseDocumentTx(url); + if (dbconn.exists()) { + dbconn.open(user, password); + if (newdb && !isrun) { + LOG.info("OrientDB dropping and recreating fresh db."); + dbconn.drop(); + dbconn.create(); + } + } else { + LOG.info("OrientDB database not found, creating fresh db"); + dbconn.create(); } - } else { - System.out.println("OrientDB database not found, create fresh db"); - db.create(); + } catch (ODatabaseException e) { + throw new DBException(String.format("Error interfacing with %s", url), e); } + } - System.out.println("OrientDB connection created with " + url); + if (dbconn == null) { + throw new DBException("Could not establish connection to: " + url); + } - dictionary = db.getMetadata().getIndexManager().getDictionary(); - if (!db.getMetadata().getSchema().existsClass(CLASS)) - db.getMetadata().getSchema().createClass(CLASS); + LOG.info("OrientDB connection created with " + url); + return dbconn; + } - db.declareIntent(new OIntentMassiveInsert()); + @Override + public void init() throws DBException { + Properties props = getProperties(); - } catch (Exception e1) { - System.err.println("Could not initialize OrientDB connection pool for Loader: " + e1.toString()); - e1.printStackTrace(); - return; + String intent = props.getProperty(INTENT_PROPERTY, INTENT_PROPERTY_DEFAULT); + + db = initDB(props); + + if (db.getURL().startsWith(OEngineRemote.NAME)) { + isRemote = true; } + dictionary = db.getMetadata().getIndexManager().getDictionary(); + if (!db.getMetadata().getSchema().existsClass(CLASS)) { + db.getMetadata().getSchema().createClass(CLASS); + } + + if (intent.equals(ORIENTDB_MASSIVEINSERT)) { + LOG.info("Declaring intent of MassiveInsert."); + db.declareIntent(new OIntentMassiveInsert()); + } else if (intent.equals(ORIENTDB_MASSIVEREAD)) { + LOG.info("Declaring intent of MassiveRead."); + db.declareIntent(new OIntentMassiveRead()); + } else if (intent.equals(ORIENTDB_NOCACHE)) { + LOG.info("Declaring intent of NoCache."); + db.declareIntent(new OIntentNoCache()); + } } @Override public void cleanup() throws DBException { + // Set this thread's db reference (needed for thread safety in testing) + ODatabaseRecordThreadLocal.INSTANCE.set(db); + if (db != null) { db.close(); db = null; @@ -121,130 +201,111 @@ public class OrientDBClient extends DB { } @Override - /** - * Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - * record key. - * - * @param table The name of the table - * @param key The record key of the record to insert. - * @param values A HashMap of field/value pairs to insert in the record - * @return Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes. - */ - public int insert(String table, String key, HashMap<String, ByteIterator> values) { + public Status insert(String table, String key, HashMap<String, ByteIterator> values) { try { final ODocument document = new ODocument(CLASS); - for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) + for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { document.field(entry.getKey(), entry.getValue()); + } document.save(); dictionary.put(key, document); - return 0; + return Status.OK; } catch (Exception e) { e.printStackTrace(); } - return 1; + return Status.ERROR; } @Override - /** - * Delete a record from the database. - * - * @param table The name of the table - * @param key The record key of the record to delete. - * @return Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes. - */ - public int delete(String table, String key) { + public Status delete(String table, String key) { try { dictionary.remove(key); - return 0; + return Status.OK; } catch (Exception e) { e.printStackTrace(); } - return 1; + return Status.ERROR; } @Override - /** - * Read a record from the database. Each field/value pair from the result will be stored in a HashMap. - * - * @param table The name of the table - * @param key The record key of the record to read. - * @param fields The list of fields to read, or null for all of them - * @param result A HashMap of field/value pairs for the result - * @return Zero on success, a non-zero error code on error or "not found". - */ - public int read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { + public Status read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { try { final ODocument document = dictionary.get(key); if (document != null) { - if (fields != null) - for (String field : fields) + if (fields != null) { + for (String field : fields) { result.put(field, new StringByteIterator((String) document.field(field))); - else - for (String field : document.fieldNames()) + } + } else { + for (String field : document.fieldNames()) { result.put(field, new StringByteIterator((String) document.field(field))); - return 0; + } + } + return Status.OK; } } catch (Exception e) { e.printStackTrace(); } - return 1; + return Status.ERROR; } @Override - /** - * Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified - * record key, overwriting any existing values with the same field name. - * - * @param table The name of the table - * @param key The record key of the record to write. - * @param values A HashMap of field/value pairs to update in the record - * @return Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes. - */ - public int update(String table, String key, HashMap<String, ByteIterator> values) { + public Status update(String table, String key, HashMap<String, ByteIterator> values) { try { final ODocument document = dictionary.get(key); if (document != null) { - for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) + for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { document.field(entry.getKey(), entry.getValue()); + } document.save(); - return 0; + return Status.OK; } } catch (Exception e) { e.printStackTrace(); } - return 1; + return Status.ERROR; } @Override - /** - * Perform a range scan for a set of records in the database. Each field/value pair from the result will be stored in a HashMap. - * - * @param table The name of the table - * @param startkey The record key of the first record to read. - * @param recordcount The number of records to read - * @param fields The list of fields to read, or null for all of them - * @param result A Vector of HashMaps, where each HashMap is a set field/value pairs for one record - * @return Zero on success, a non-zero error code on error. See this class's description for a discussion of error codes. - */ - public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + public Status scan(String table, String startkey, int recordcount, Set<String> fields, + Vector<HashMap<String, ByteIterator>> result) { + if (isRemote) { + // Iterator methods needed for scanning are Unsupported for remote database connections. + LOG.warn("OrientDB scan operation is not implemented for remote database connections."); + return Status.NOT_IMPLEMENTED; + } + try { + int entrycount = 0; final OIndexCursor entries = dictionary.getIndex().iterateEntriesMajor(startkey, true, true); - while (entries.hasNext()) { + + while (entries.hasNext() && entrycount < recordcount) { final Entry<Object, OIdentifiable> entry = entries.nextEntry(); final ODocument document = entry.getValue().getRecord(); - final HashMap<String, ByteIterator> map = new HashMap<String, ByteIterator>(); + final HashMap<String, ByteIterator> map = + new HashMap<String, ByteIterator>(); result.add(map); - for (String field : fields) + for (String field : fields) { map.put(field, new StringByteIterator((String) document.field(field))); + } + + entrycount++; } - return 0; + return Status.OK; } catch (Exception e) { e.printStackTrace(); } - return 1; + return Status.ERROR; + } + + /** + * Access method to db variable for unit testing. + **/ + ODatabaseDocumentTx getDB() { + return db; } } diff --git a/orientdb/src/main/java/com/yahoo/ycsb/db/package-info.java b/orientdb/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..d4568271c407b3d06833d5221dc1448661b02f00 --- /dev/null +++ b/orientdb/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2015 - 2016, Yahoo!, Inc. 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. + */ + +/** + * The YCSB binding for <a href="http://orientdb.com/orientdb/">OrientDB</a>. + */ +package com.yahoo.ycsb.db; + diff --git a/orientdb/src/main/resources/log4j.properties b/orientdb/src/main/resources/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..0ede1d4c141192a2de7e00461b3cb9998a8e8a68 --- /dev/null +++ b/orientdb/src/main/resources/log4j.properties @@ -0,0 +1,8 @@ +# Root logger option +log4j.rootLogger=INFO, stderr + +# Direct log messages to stderr +log4j.appender.stderr=org.apache.log4j.ConsoleAppender +log4j.appender.stderr.Target=System.err +log4j.appender.stderr.layout=org.apache.log4j.PatternLayout +log4j.appender.stderr.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n diff --git a/orientdb/src/test/java/com/yahoo/ycsb/db/OrientDBClientTest.java b/orientdb/src/test/java/com/yahoo/ycsb/db/OrientDBClientTest.java new file mode 100644 index 0000000000000000000000000000000000000000..717637d0c368ec2a0b52a41229ca510ed4075e70 --- /dev/null +++ b/orientdb/src/test/java/com/yahoo/ycsb/db/OrientDBClientTest.java @@ -0,0 +1,238 @@ +/** + * Copyright (c) 2015 - 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. + */ + +package com.yahoo.ycsb.db; + +import com.orientechnologies.orient.core.dictionary.ODictionary; +import com.orientechnologies.orient.core.record.ORecord; +import com.orientechnologies.orient.core.record.impl.ODocument; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.StringByteIterator; + +import org.junit.*; +import java.util.*; + +import static org.junit.Assert.*; + +/** + * Created by kruthar on 12/29/15. + */ +public class OrientDBClientTest { + // TODO: This must be copied because it is private in OrientDBClient, but this should defer to table property. + private static final String CLASS = "usertable"; + private static final int FIELD_LENGTH = 32; + private static final String FIELD_PREFIX = "FIELD"; + private static final String KEY_PREFIX = "user"; + private static final int NUM_FIELDS = 3; + private static final String TEST_DB_URL = "memory:test"; + + private static ODictionary<ORecord> orientDBDictionary; + private static OrientDBClient orientDBClient = null; + + @Before + public void setup() throws DBException { + orientDBClient = new OrientDBClient(); + + Properties p = new Properties(); + // TODO: Extract the property names into final variables in OrientDBClient + p.setProperty("orientdb.url", TEST_DB_URL); + + orientDBClient.setProperties(p); + orientDBClient.init(); + orientDBDictionary = orientDBClient.getDB().getDictionary(); + } + + @After + public void teardown() throws DBException { + if (orientDBClient != null) { + orientDBClient.cleanup(); + } + } + + /* + This is a copy of buildDeterministicValue() from core:com.yahoo.ycsb.workloads.CoreWorkload.java. + That method is neither public nor static so we need a copy. + */ + private String buildDeterministicValue(String key, String fieldkey) { + int size = FIELD_LENGTH; + StringBuilder sb = new StringBuilder(size); + sb.append(key); + sb.append(':'); + sb.append(fieldkey); + while (sb.length() < size) { + sb.append(':'); + sb.append(sb.toString().hashCode()); + } + sb.setLength(size); + + return sb.toString(); + } + + /* + Inserts a row of deterministic values for the given insertKey using the orientDBClient. + */ + private Map<String, ByteIterator> insertRow(String insertKey) { + HashMap<String, ByteIterator> insertMap = new HashMap<>(); + for (int i = 0; i < 3; i++) { + insertMap.put(FIELD_PREFIX + i, new StringByteIterator(buildDeterministicValue(insertKey, FIELD_PREFIX + i))); + } + orientDBClient.insert(CLASS, insertKey, insertMap); + + return insertMap; + } + + @Test + public void insertTest() { + String insertKey = "user0"; + Map<String, ByteIterator> insertMap = insertRow(insertKey); + + ODocument result = orientDBDictionary.get(insertKey); + + assertTrue("Assert a row was inserted.", result != null); + + for (int i = 0; i < NUM_FIELDS; i++) { + assertEquals("Assert all inserted columns have correct values.", result.field(FIELD_PREFIX + i), insertMap.get(FIELD_PREFIX + i).toString()); + } + } + + @Test + public void updateTest() { + String preupdateString = "preupdate"; + String user0 = "user0"; + String user1 = "user1"; + String user2 = "user2"; + + // Manually insert three documents + for(String key: Arrays.asList(user0, user1, user2)) { + ODocument doc = new ODocument(CLASS); + for (int i = 0; i < NUM_FIELDS; i++) { + doc.field(FIELD_PREFIX + i, preupdateString); + } + doc.save(); + orientDBDictionary.put(key, doc); + } + + HashMap<String, ByteIterator> updateMap = new HashMap<>(); + for (int i = 0; i < NUM_FIELDS; i++) { + updateMap.put(FIELD_PREFIX + i, new StringByteIterator(buildDeterministicValue(user1, FIELD_PREFIX + i))); + } + + orientDBClient.update(CLASS, user1, updateMap); + + // Ensure that user0 record was not changed + ODocument result = orientDBDictionary.get(user0); + for (int i = 0; i < NUM_FIELDS; i++) { + assertEquals("Assert first row fields contain preupdateString", result.field(FIELD_PREFIX + i), preupdateString); + } + + // Check that all the columns have expected values for user1 record + result = orientDBDictionary.get(user1); + for (int i = 0; i < NUM_FIELDS; i++) { + assertEquals("Assert updated row fields are correct", result.field(FIELD_PREFIX + i), updateMap.get(FIELD_PREFIX + i).toString()); + } + + // Ensure that user2 record was not changed + result = orientDBDictionary.get(user2); + for (int i = 0; i < NUM_FIELDS; i++) { + assertEquals("Assert third row fields contain preupdateString", result.field(FIELD_PREFIX + i), preupdateString); + } + } + + @Test + public void readTest() { + String insertKey = "user0"; + Map<String, ByteIterator> insertMap = insertRow(insertKey); + HashSet<String> readFields = new HashSet<>(); + HashMap<String, ByteIterator> readResultMap = new HashMap<>(); + + // Test reading a single field + readFields.add("FIELD0"); + orientDBClient.read(CLASS, insertKey, readFields, readResultMap); + assertEquals("Assert that result has correct number of fields", readFields.size(), readResultMap.size()); + for (String field: readFields) { + assertEquals("Assert " + field + " was read correctly", insertMap.get(field).toString(), readResultMap.get(field).toString()); + } + + readResultMap = new HashMap<>(); + + // Test reading all fields + readFields.add("FIELD1"); + readFields.add("FIELD2"); + orientDBClient.read(CLASS, insertKey, readFields, readResultMap); + assertEquals("Assert that result has correct number of fields", readFields.size(), readResultMap.size()); + for (String field: readFields) { + assertEquals("Assert " + field + " was read correctly", insertMap.get(field).toString(), readResultMap.get(field).toString()); + } + } + + @Test + public void deleteTest() { + String user0 = "user0"; + String user1 = "user1"; + String user2 = "user2"; + + insertRow(user0); + insertRow(user1); + insertRow(user2); + + orientDBClient.delete(CLASS, user1); + + assertNotNull("Assert user0 still exists", orientDBDictionary.get(user0)); + assertNull("Assert user1 does not exist", orientDBDictionary.get(user1)); + assertNotNull("Assert user2 still exists", orientDBDictionary.get(user2)); + } + + @Test + public void scanTest() { + Map<String, Map<String, ByteIterator>> keyMap = new HashMap<>(); + for (int i = 0; i < 5; i++) { + String insertKey = KEY_PREFIX + i; + keyMap.put(insertKey, insertRow(insertKey)); + } + + Set<String> fieldSet = new HashSet<>(); + fieldSet.add("FIELD0"); + fieldSet.add("FIELD1"); + int startIndex = 1; + int resultRows = 3; + + Vector<HashMap<String, ByteIterator>> resultVector = new Vector<>(); + orientDBClient.scan(CLASS, KEY_PREFIX + startIndex, resultRows, fieldSet, resultVector); + + // Check the resultVector is the correct size + assertEquals("Assert the correct number of results rows were returned", resultRows, resultVector.size()); + + /** + * Part of the known issue about the broken iterator in orientdb is that the iterator + * starts at index 1 instead of index 0. Because of this, to test it we must increment + * the start index. When that known issue has been fixed, remove the increment below. + * Track the issue here: https://github.com/orientechnologies/orientdb/issues/5541 + * This fix was implemented for orientechnologies:orientdb-client:2.1.8 + */ + int testIndex = startIndex + 1; // <-- Remove the +1 when the known issue of broken iterator is fixed. + + // Check each vector row to make sure we have the correct fields + for (HashMap<String, ByteIterator> result: resultVector) { + assertEquals("Assert that this row has the correct number of fields", fieldSet.size(), result.size()); + for (String field: fieldSet) { + assertEquals("Assert this field is correct in this row", keyMap.get(KEY_PREFIX + testIndex).get(field).toString(), result.get(field).toString()); + } + testIndex++; + } + } +} diff --git a/pom.xml b/pom.xml index ea5ee4144805b1281d6d72cbfb1e34cc1544cd9e..066ac0ed82638ca483e349e5c07953c70982393a 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -21,7 +21,7 @@ LICENSE file. <groupId>com.yahoo.ycsb</groupId> <artifactId>root</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <packaging>pom</packaging> <name>YCSB Root</name> @@ -37,7 +37,6 @@ LICENSE file. </scm> <dependencyManagement> <dependencies> - <!-- voldemort --> <dependency> <groupId>checkstyle</groupId> <artifactId>checkstyle</artifactId> @@ -69,25 +68,31 @@ LICENSE file. <properties> <maven.assembly.version>2.5.5</maven.assembly.version> <maven.dependency.version>2.10</maven.dependency.version> - <hbase.version>1.0.0</hbase.version> + <hbase094.version>0.94.27</hbase094.version> + <hbase098.version>0.98.14-hadoop2</hbase098.version> + <hbase10.version>1.0.2</hbase10.version> <accumulo.version>1.6.0</accumulo.version> <cassandra.version>1.2.9</cassandra.version> <cassandra.cql.version>1.0.3</cassandra.cql.version> - <geode.version>1.0.0-incubating-SNAPSHOT</geode.version> + <cassandra2.cql.version>2.1.8</cassandra2.cql.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> <!--<mapkeeper.version>1.0</mapkeeper.version>--> <mongodb.version>3.0.3</mongodb.version> <mongodb.async.version>2.0.1</mongodb.async.version> - <orientdb.version>1.0.1</orientdb.version> + <orientdb.version>2.1.8</orientdb.version> <redis.version>2.0.0</redis.version> + <s3.version>1.10.20</s3.version> <voldemort.version>0.81</voldemort.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <thrift.version>0.8.0</thrift.version> <hypertable.version>0.9.5.6</hypertable.version> - <couchbase.version>1.1.8</couchbase.version> - <tarantool.version>1.6.1</tarantool.version> + <couchbase.version>1.4.10</couchbase.version> + <tarantool.version>1.6.5</tarantool.version> <aerospike.version>3.1.2</aerospike.version> + <solr.version>5.4.0</solr.version> </properties> <modules> @@ -98,50 +103,65 @@ LICENSE file. <module>accumulo</module> <module>aerospike</module> <module>cassandra</module> + <module>cassandra2</module> <module>couchbase</module> <module>distribution</module> <module>dynamodb</module> <module>elasticsearch</module> <module>geode</module> - <module>hbase</module> + <module>googledatastore</module> + <module>hbase094</module> + <module>hbase098</module> + <module>hbase10</module> <module>hypertable</module> <module>infinispan</module> <module>jdbc</module> + <module>kudu</module> <!--<module>mapkeeper</module>--> + <module>memcached</module> <module>mongodb</module> - <!--module>nosqldb</module--> + <module>nosqldb</module> <module>orientdb</module> <module>redis</module> + <module>s3</module> + <module>solr</module> <module>tarantool</module> <!--<module>voldemort</module>--> </modules> <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.15</version> + </plugin> + </plugins> + </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> - <source>1.6</source> - <target>1.6</target> + <source>1.7</source> + <target>1.7</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.15</version> - <configuration> - <consoleOutput>true</consoleOutput> - <configLocation>checkstyle.xml</configLocation> - </configuration> <executions> <execution> - <id>validate</id> + <id>validate</id> <phase>validate</phase> <goals> - <goal>checkstyle</goal> + <goal>check</goal> </goals> + <configuration> + <configLocation>checkstyle.xml</configLocation> + </configuration> </execution> </executions> </plugin> diff --git a/redis/README.md b/redis/README.md index ab11cfd0e71fba53e5200cdb18da9411ea25bde5..bc883271b071e9419195e4c390ed9268ef35eef7 100644 --- a/redis/README.md +++ b/redis/README.md @@ -36,7 +36,7 @@ Git clone YCSB and compile: Set the host, port, and password (do not redis auth is not turned on) in the workload you plan to run. -- `redis.url` +- `redis.host` - `redis.port` - `redis.password` diff --git a/redis/pom.xml b/redis/pom.xml index a58b59b710ad472d8ce35e351a0cdb607339b3cb..957b4b91940683f3c1f2aa75cde56cfa7fbf04e9 100644 --- a/redis/pom.xml +++ b/redis/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -21,7 +21,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> diff --git a/redis/src/main/java/com/yahoo/ycsb/db/RedisClient.java b/redis/src/main/java/com/yahoo/ycsb/db/RedisClient.java index ed6f1ec5d935d00d4a28317cd8d38ed6a210eaa9..fbcfcb0a31dfb4c36a5b68a78538448ca03a6ad8 100644 --- a/redis/src/main/java/com/yahoo/ycsb/db/RedisClient.java +++ b/redis/src/main/java/com/yahoo/ycsb/db/RedisClient.java @@ -23,12 +23,16 @@ */ package com.yahoo.ycsb.db; + +import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; -import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.Status; import com.yahoo.ycsb.StringByteIterator; -import java.util.Map; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.Protocol; + import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -36,113 +40,118 @@ import java.util.Properties; import java.util.Set; import java.util.Vector; -import redis.clients.jedis.Jedis; -import redis.clients.jedis.Protocol; - +/** + * YCSB binding for <a href="http://redis.io/">Redis</a>. + * + * See {@code redis/README.md} for details. + */ public class RedisClient extends DB { - private Jedis jedis; + private Jedis jedis; - public static final String HOST_PROPERTY = "redis.host"; - public static final String PORT_PROPERTY = "redis.port"; - public static final String PASSWORD_PROPERTY = "redis.password"; + public static final String HOST_PROPERTY = "redis.host"; + public static final String PORT_PROPERTY = "redis.port"; + public static final String PASSWORD_PROPERTY = "redis.password"; - public static final String INDEX_KEY = "_indices"; + public static final String INDEX_KEY = "_indices"; - public void init() throws DBException { - Properties props = getProperties(); - int port; + public void init() throws DBException { + Properties props = getProperties(); + int port; - String portString = props.getProperty(PORT_PROPERTY); - if (portString != null) { - port = Integer.parseInt(portString); - } - else { - port = Protocol.DEFAULT_PORT; - } - String host = props.getProperty(HOST_PROPERTY); - - jedis = new Jedis(host, port); - jedis.connect(); - - String password = props.getProperty(PASSWORD_PROPERTY); - if (password != null) { - jedis.auth(password); - } + String portString = props.getProperty(PORT_PROPERTY); + if (portString != null) { + port = Integer.parseInt(portString); + } else { + port = Protocol.DEFAULT_PORT; } + String host = props.getProperty(HOST_PROPERTY); - public void cleanup() throws DBException { - jedis.disconnect(); - } + jedis = new Jedis(host, port); + jedis.connect(); - /* Calculate a hash for a key to store it in an index. The actual return - * value of this function is not interesting -- it primarily needs to be - * fast and scattered along the whole space of doubles. In a real world - * scenario one would probably use the ASCII values of the keys. - */ - private double hash(String key) { - return key.hashCode(); + String password = props.getProperty(PASSWORD_PROPERTY); + if (password != null) { + jedis.auth(password); } - - //XXX jedis.select(int index) to switch to `table` - - @Override - public int read(String table, String key, Set<String> fields, - HashMap<String, ByteIterator> result) { - if (fields == null) { - StringByteIterator.putAllAsByteIterators(result, jedis.hgetAll(key)); - } - else { - String[] fieldArray = (String[])fields.toArray(new String[fields.size()]); - List<String> values = jedis.hmget(key, fieldArray); - - Iterator<String> fieldIterator = fields.iterator(); - Iterator<String> valueIterator = values.iterator(); - - while (fieldIterator.hasNext() && valueIterator.hasNext()) { - result.put(fieldIterator.next(), - new StringByteIterator(valueIterator.next())); - } - assert !fieldIterator.hasNext() && !valueIterator.hasNext(); - } - return result.isEmpty() ? 1 : 0; + } + + public void cleanup() throws DBException { + jedis.disconnect(); + } + + /* + * Calculate a hash for a key to store it in an index. The actual return value + * of this function is not interesting -- it primarily needs to be fast and + * scattered along the whole space of doubles. In a real world scenario one + * would probably use the ASCII values of the keys. + */ + private double hash(String key) { + return key.hashCode(); + } + + // XXX jedis.select(int index) to switch to `table` + + @Override + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + if (fields == null) { + StringByteIterator.putAllAsByteIterators(result, jedis.hgetAll(key)); + } else { + String[] fieldArray = + (String[]) fields.toArray(new String[fields.size()]); + List<String> values = jedis.hmget(key, fieldArray); + + Iterator<String> fieldIterator = fields.iterator(); + Iterator<String> valueIterator = values.iterator(); + + while (fieldIterator.hasNext() && valueIterator.hasNext()) { + result.put(fieldIterator.next(), + new StringByteIterator(valueIterator.next())); + } + assert !fieldIterator.hasNext() && !valueIterator.hasNext(); } - - @Override - public int insert(String table, String key, HashMap<String, ByteIterator> values) { - if (jedis.hmset(key, StringByteIterator.getStringMap(values)).equals("OK")) { - jedis.zadd(INDEX_KEY, hash(key), key); - return 0; - } - return 1; + return result.isEmpty() ? Status.ERROR : Status.OK; + } + + @Override + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + if (jedis.hmset(key, StringByteIterator.getStringMap(values)) + .equals("OK")) { + jedis.zadd(INDEX_KEY, hash(key), key); + return Status.OK; } - - @Override - public int delete(String table, String key) { - return jedis.del(key) == 0 - && jedis.zrem(INDEX_KEY, key) == 0 - ? 1 : 0; + return Status.ERROR; + } + + @Override + public Status delete(String table, String key) { + return jedis.del(key) == 0 && jedis.zrem(INDEX_KEY, key) == 0 ? Status.ERROR + : Status.OK; + } + + @Override + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { + return jedis.hmset(key, StringByteIterator.getStringMap(values)) + .equals("OK") ? Status.OK : Status.ERROR; + } + + @Override + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + Set<String> keys = jedis.zrangeByScore(INDEX_KEY, hash(startkey), + Double.POSITIVE_INFINITY, 0, recordcount); + + HashMap<String, ByteIterator> values; + for (String key : keys) { + values = new HashMap<String, ByteIterator>(); + read(table, key, fields, values); + result.add(values); } - @Override - public int update(String table, String key, HashMap<String, ByteIterator> values) { - return jedis.hmset(key, StringByteIterator.getStringMap(values)).equals("OK") ? 0 : 1; - } - - @Override - public int scan(String table, String startkey, int recordcount, - Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { - Set<String> keys = jedis.zrangeByScore(INDEX_KEY, hash(startkey), - Double.POSITIVE_INFINITY, 0, recordcount); - - HashMap<String, ByteIterator> values; - for (String key : keys) { - values = new HashMap<String, ByteIterator>(); - read(table, key, fields, values); - result.add(values); - } - - return 0; - } + return Status.OK; + } } diff --git a/redis/src/main/java/com/yahoo/ycsb/db/package-info.java b/redis/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..d000d6c8c0c69cc273e1f2d05a30a80b7119d996 --- /dev/null +++ b/redis/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2014, Yahoo!, Inc. 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. + */ + +/** + * The YCSB binding for <a href="http://redis.io/">Redis</a>. + */ +package com.yahoo.ycsb.db; + diff --git a/s3/README.md b/s3/README.md new file mode 100644 index 0000000000000000000000000000000000000000..347449deed6444b9c4c249458a22f87fb0a76f79 --- /dev/null +++ b/s3/README.md @@ -0,0 +1,79 @@ +<!-- +Copyright (c) 2015 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 +=============== +### 1. Set Up YCSB + +Download the YCSB from this website: + + https://github.com/brianfrankcooper/YCSB/releases/ + +You can choose to download either the full stable version or just one of the available binding. + +### 2. Configuration of the AWS credentials + +The access key ID and secret access key as well as the endPoint and region and the Client configurations like the maxErrorRetry can be set in a properties file under s3-binding/conf/s3.properties or sent by command line (see below). +It is highly suggested to use the property file instead of to send the credentials through the command line. + + +### 3. Run YCSB + +To execute the benchmark using the S3 storage binding, first files must be uploaded using the "load" option with this command: + + ./bin/ycsb load s3 -p table=theBucket -p s3.endPoint=s3.amazonaws.com -p s3.accessKeyId=yourAccessKeyId -p s3.secretKey=yourSecretKey -p fieldlength=10 -p fieldcount=20 -P workloads/workloada + +With this command, the workload A will be executing with the loading phase. The file size is determined by the number of fields (fieldcount) and by the field size (fieldlength). In this case each file is 200 bytes (10 bytes for each field multiplied by 20 fields). + +Running the command: + + ./bin/ycsb -t s3 -p table=theBucket -p s3.endPoint=s3.amazonaws.com -p s3.accessKeyId=yourAccessKeyId -p s3.secretKey=yourSecretKey -p fieldlength=10 -p fieldcount=20 -P workloads/workloada + +the workload A will be executed with file size 200 bytes. + +#### S3 Storage Configuration Parameters + +The parameters to configure the S3 client can be set using the file "s3-binding/conf/s3.properties". This is highly advisable for the parameters s3.accessKeyId and s3.secretKey. All the other parameters can be set also on the command line. Here the list of all the parameters that is possible to configure: + +- `table` + - This should be a S3 Storage bucket name and it replace the standard table name assigned by YCSB. + +- `s3.endpoint` + - This indicate the endpoint used to connect to the S3 Storage service. + - Default value is `s3.amazonaws.com`. + +- `s3.region` + - This indicate the region where your buckets are. + - Default value is `us-east-1`. + +- `s3.accessKeyId` + - This is the accessKey of your S3 account. + +- `s3.secretKey` + - This is the secret associated with your S3 account. + +- `s3.maxErrorRetry` + - This is the maxErrorRetry parameter for the S3Client. + +- `s3.protocol` + - This is the protocol parameter for the S3Client. The default value is HTTPS. + +- `s3.sse` + - This parameter set to true activates the Server Side Encryption. + +- `s3.ssec` + - This parameter if not null activates the SSE-C client side encryption. The value passed with this parameter is the client key used to encrpyt the files. + diff --git a/s3/pom.xml b/s3/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..8623a0192f80d6716d1d9e70aa6ea527adaa16c8 --- /dev/null +++ b/s3/pom.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (c) 2015-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. +--> + +<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.7.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> + </parent> + + <artifactId>s3-binding</artifactId> + <name>S3 Storage Binding</name> + <packaging>jar</packaging> + + <dependencies> + <dependency> + <groupId>com.amazonaws</groupId> + <artifactId>aws-java-sdk-s3</artifactId> + <version>${s3.version}</version> + </dependency> + + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> +</project> diff --git a/s3/src/main/conf/s3.properties b/s3/src/main/conf/s3.properties new file mode 100644 index 0000000000000000000000000000000000000000..f36c7745e617e200cd72f170de4a183b548bd92d --- /dev/null +++ b/s3/src/main/conf/s3.properties @@ -0,0 +1,31 @@ +# +# Sample S3 configuration properties +# +# You may either set properties here or via the command line. +# + +# the AWS S3 access key ID +s3.accessKeyId=yourKey + +# the AWS S3 secret access key ID +s3.secretKey=YourSecret + +# the AWS endpoint +s3.endpoint=s3.amazonaws.com + +# activating the SSE server side encryption if true +s3.sse=false + +# activating the SSE-C client side encryption if used +#s3.ssec=U2CccCI40he2mZtg2aCEzofP7nQsfy4nP14VSYu6bFA= + +# set the protocol to use for the Client, default is HTTPS +#s3.protocol=HTTPS + +# set the maxConnections to use for the Client, it should be not less than the +# threads since only one client is created and shared between threads +#s3.maxConnections= + +# set the maxErrorRetry parameter to use for the Client +#s3.maxErrorRetry= + diff --git a/s3/src/main/java/com/yahoo/ycsb/db/S3Client.java b/s3/src/main/java/com/yahoo/ycsb/db/S3Client.java new file mode 100644 index 0000000000000000000000000000000000000000..f9f5b2daddbd1e4ced604ec3e3a27cf610b016f5 --- /dev/null +++ b/s3/src/main/java/com/yahoo/ycsb/db/S3Client.java @@ -0,0 +1,525 @@ +/** + * Copyright (c) 2015 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. + * + * S3 storage client binding for YCSB. + */ +package com.yahoo.ycsb.db; + +import java.util.HashMap; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.net.*; + +import com.yahoo.ycsb.ByteArrayByteIterator; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; + +import com.amazonaws.services.s3.AmazonS3Client; +import com.amazonaws.services.s3.*; +import com.amazonaws.auth.*; +import com.amazonaws.services.s3.model.ObjectMetadata; +import com.amazonaws.services.s3.model.PutObjectResult; +import com.amazonaws.services.s3.model.S3Object; +import com.amazonaws.services.s3.model.GetObjectRequest; +import com.amazonaws.ClientConfiguration; +import com.amazonaws.regions.Region; +import com.amazonaws.regions.Regions; +import com.amazonaws.Protocol; +import com.amazonaws.services.s3.model.DeleteObjectRequest; +import com.amazonaws.services.s3.model.ObjectListing; +import com.amazonaws.services.s3.model.S3ObjectSummary; +import com.amazonaws.services.s3.model.SSECustomerKey; +import com.amazonaws.services.s3.model.PutObjectRequest; +import com.amazonaws.services.s3.model.GetObjectMetadataRequest; + +/** + * S3 Storage client for YCSB framework. + * + * Properties to set: + * + * s3.accessKeyId=access key S3 aws + * s3.secretKey=secret key S3 aws + * s3.endPoint=s3.amazonaws.com + * s3.region=us-east-1 + * The parameter table is the name of the Bucket where to upload the files. + * This must be created before to start the benchmark + * The size of the file to upload is determined by two parameters: + * - fieldcount this is the number of fields of a record in YCSB + * - fieldlength this is the size in bytes of a single field in the record + * together these two parameters define the size of the file to upload, + * the size in bytes is given by the fieldlength multiplied by the fieldcount. + * The name of the file is determined by the parameter key. + *This key is automatically generated by YCSB. + * + */ +public class S3Client extends DB { + + private static AmazonS3Client s3Client; + private static String sse; + private static SSECustomerKey ssecKey; + private static final AtomicInteger INIT_COUNT = new AtomicInteger(0); + + /** + * Cleanup any state for this storage. + * Called once per S3 instance; + */ + @Override + public void cleanup() throws DBException { + if (INIT_COUNT.decrementAndGet() == 0) { + try { + s3Client.shutdown(); + System.out.println("The client is shutdown successfully"); + } catch (Exception e){ + System.err.println("Could not shutdown the S3Client: "+e.toString()); + e.printStackTrace(); + } finally { + if (s3Client != null){ + s3Client = null; + } + } + } + } + /** + * Delete a file from S3 Storage. + * + * @param bucket + * The name of the bucket + * @param key + * The record key of the file to delete. + * @return OK on success, otherwise ERROR. See the + * {@link DB} class's description for a discussion of error codes. + */ + @Override + public Status delete(String bucket, String key) { + try { + s3Client.deleteObject(new DeleteObjectRequest(bucket, key)); + } catch (Exception e){ + System.err.println("Not possible to delete the key "+key); + e.printStackTrace(); + return Status.ERROR; + } + return Status.OK; + } + /** + * Initialize any state for the storage. + * Called once per S3 instance; If the client is not null it is re-used. + */ + @Override + public void init() throws DBException { + final int count = INIT_COUNT.incrementAndGet(); + synchronized (S3Client.class){ + Properties propsCL = getProperties(); + int recordcount = Integer.parseInt( + propsCL.getProperty("recordcount")); + int operationcount = Integer.parseInt( + propsCL.getProperty("operationcount")); + int numberOfOperations = 0; + if (recordcount > 0){ + if (recordcount > operationcount){ + numberOfOperations = recordcount; + } else { + numberOfOperations = operationcount; + } + } else { + numberOfOperations = operationcount; + } + if (count <= numberOfOperations) { + String accessKeyId = null; + String secretKey = null; + String endPoint = null; + String region = null; + String maxErrorRetry = null; + String maxConnections = null; + String protocol = null; + BasicAWSCredentials s3Credentials; + ClientConfiguration clientConfig; + if (s3Client != null) { + System.out.println("Reusing the same client"); + return; + } + try { + InputStream propFile = S3Client.class.getClassLoader() + .getResourceAsStream("s3.properties"); + Properties props = new Properties(System.getProperties()); + props.load(propFile); + accessKeyId = props.getProperty("s3.accessKeyId"); + if (accessKeyId == null){ + accessKeyId = propsCL.getProperty("s3.accessKeyId"); + } + System.out.println(accessKeyId); + secretKey = props.getProperty("s3.secretKey"); + if (secretKey == null){ + secretKey = propsCL.getProperty("s3.secretKey"); + } + System.out.println(secretKey); + endPoint = props.getProperty("s3.endPoint"); + if (endPoint == null){ + endPoint = propsCL.getProperty("s3.endPoint", "s3.amazonaws.com"); + } + System.out.println(endPoint); + region = props.getProperty("s3.region"); + if (region == null){ + region = propsCL.getProperty("s3.region", "us-east-1"); + } + System.out.println(region); + maxErrorRetry = props.getProperty("s3.maxErrorRetry"); + if (maxErrorRetry == null){ + maxErrorRetry = propsCL.getProperty("s3.maxErrorRetry", "15"); + } + maxConnections = props.getProperty("s3.maxConnections"); + if (maxConnections == null){ + maxConnections = propsCL.getProperty("s3.maxConnections"); + } + protocol = props.getProperty("s3.protocol"); + if (protocol == null){ + protocol = propsCL.getProperty("s3.protocol", "HTTPS"); + } + sse = props.getProperty("s3.sse"); + if (sse == null){ + sse = propsCL.getProperty("s3.sse", "false"); + } + String ssec = props.getProperty("s3.ssec"); + if (ssec == null){ + ssec = propsCL.getProperty("s3.ssec", null); + } else { + ssecKey = new SSECustomerKey(ssec); + } + } catch (Exception e){ + System.err.println("The file properties doesn't exist "+e.toString()); + e.printStackTrace(); + } + try { + System.out.println("Inizializing the S3 connection"); + s3Credentials = new BasicAWSCredentials(accessKeyId, secretKey); + clientConfig = new ClientConfiguration(); + clientConfig.setMaxErrorRetry(Integer.parseInt(maxErrorRetry)); + if(protocol.equals("HTTP")) { + clientConfig.setProtocol(Protocol.HTTP); + } else { + clientConfig.setProtocol(Protocol.HTTPS); + } + if(maxConnections != null) { + clientConfig.setMaxConnections(Integer.parseInt(maxConnections)); + } + s3Client = new AmazonS3Client(s3Credentials, clientConfig); + s3Client.setRegion(Region.getRegion(Regions.fromName(region))); + s3Client.setEndpoint(endPoint); + System.out.println("Connection successfully initialized"); + } catch (Exception e){ + System.err.println("Could not connect to S3 storage: "+ e.toString()); + e.printStackTrace(); + throw new DBException(e); + } + } else { + System.err.println( + "The number of threads must be less or equal than the operations"); + throw new DBException(new Error( + "The number of threads must be less or equal than the operations")); + } + } + } + /** + * Create a new File in the Bucket. Any field/value pairs in the specified + * values HashMap will be written into the file with the specified record + * key. + * + * @param bucket + * The name of the bucket + * @param key + * The record key of the file to insert. + * @param values + * A HashMap of field/value pairs to insert in the file. + * Only the content of the first field is written to a byteArray + * multiplied by the number of field. In this way the size + * of the file to upload is determined by the fieldlength + * and fieldcount parameters. + * @return OK on success, ERROR otherwise. See the + * {@link DB} class's description for a discussion of error codes. + */ + @Override + public Status insert(String bucket, String key, + HashMap<String, ByteIterator> values) { + return writeToStorage(bucket, key, values, true, sse, ssecKey); + } + /** + * Read a file from the Bucket. Each field/value pair from the result + * will be stored in a HashMap. + * + * @param bucket + * The name of the bucket + * @param key + * The record key of the file to read. + * @param fields + * The list of fields to read, or null for all of them, + * it is null by default + * @param result + * A HashMap of field/value pairs for the result + * @return OK on success, ERROR otherwise. + */ + @Override + public Status read(String bucket, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + return readFromStorage(bucket, key, result, ssecKey); + } + /** + * Update a file in the database. Any field/value pairs in the specified + * values HashMap will be written into the file with the specified file + * key, overwriting any existing values with the same field name. + * + * @param bucket + * The name of the bucket + * @param key + * The file key of the file to write. + * @param values + * A HashMap of field/value pairs to update in the record + * @return OK on success, ERORR otherwise. + */ + @Override + public Status update(String bucket, String key, + HashMap<String, ByteIterator> values) { + return writeToStorage(bucket, key, values, false, sse, ssecKey); + } + /** + * Perform a range scan for a set of files in the bucket. Each + * field/value pair from the result will be stored in a HashMap. + * + * @param bucket + * The name of the bucket + * @param startkey + * The file key of the first file to read. + * @param recordcount + * The number of files to read + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A Vector of HashMaps, where each HashMap is a set field/value + * pairs for one file + * @return OK on success, ERROR otherwise. + */ + @Override + public Status scan(String bucket, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + return scanFromStorage(bucket, startkey, recordcount, result, ssecKey); + } + /** + * Upload a new object to S3 or update an object on S3. + * + * @param bucket + * The name of the bucket + * @param key + * The file key of the object to upload/update. + * @param values + * The data to be written on the object + * @param updateMarker + * A boolean value. If true a new object will be uploaded + * to S3. If false an existing object will be re-uploaded + * + */ + protected Status writeToStorage(String bucket, String key, + HashMap<String, ByteIterator> values, Boolean updateMarker, + String sseLocal, SSECustomerKey ssecLocal) { + int totalSize = 0; + int fieldCount = values.size(); //number of fields to concatenate + // getting the first field in the values + Object keyToSearch = values.keySet().toArray()[0]; + // getting the content of just one field + byte[] sourceArray = values.get(keyToSearch).toArray(); + int sizeArray = sourceArray.length; //size of each array + if (updateMarker){ + totalSize = sizeArray*fieldCount; + } else { + try { + Map.Entry<S3Object, ObjectMetadata> objectAndMetadata = getS3ObjectAndMetadata(bucket, key, ssecLocal); + int sizeOfFile = (int)objectAndMetadata.getValue().getContentLength(); + fieldCount = sizeOfFile/sizeArray; + totalSize = sizeOfFile; + } catch (Exception e){ + System.err.println("Not possible to get the object :"+key); + e.printStackTrace(); + return Status.ERROR; + } + } + byte[] destinationArray = new byte[totalSize]; + int offset = 0; + for (int i = 0; i < fieldCount; i++) { + System.arraycopy(sourceArray, 0, destinationArray, offset, sizeArray); + offset += sizeArray; + } + try (InputStream input = new ByteArrayInputStream(destinationArray)) { + ObjectMetadata metadata = new ObjectMetadata(); + metadata.setContentLength(totalSize); + PutObjectRequest putObjectRequest = null; + if (sseLocal.equals("true")) { + metadata.setSSEAlgorithm(ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION); + putObjectRequest = new PutObjectRequest(bucket, key, + input, metadata); + } else if (ssecLocal != null) { + putObjectRequest = new PutObjectRequest(bucket, key, + input, metadata).withSSECustomerKey(ssecLocal); + } else { + putObjectRequest = new PutObjectRequest(bucket, key, + input, metadata); + } + + try { + PutObjectResult res = + s3Client.putObject(putObjectRequest); + if(res.getETag() == null) { + return Status.ERROR; + } else { + if (sseLocal.equals("true")) { + System.out.println("Uploaded object encryption status is " + + res.getSSEAlgorithm()); + } else if (ssecLocal != null) { + System.out.println("Uploaded object encryption status is " + + res.getSSEAlgorithm()); + } + } + } catch (Exception e) { + System.err.println("Not possible to write object :"+key); + e.printStackTrace(); + return Status.ERROR; + } + } catch (Exception e) { + System.err.println("Error in the creation of the stream :"+e.toString()); + e.printStackTrace(); + return Status.ERROR; + } + + return Status.OK; + } + + /** + * Download an object from S3. + * + * @param bucket + * The name of the bucket + * @param key + * The file key of the object to upload/update. + * @param result + * The Hash map where data from the object are written + * + */ + protected Status readFromStorage(String bucket, String key, + HashMap<String, ByteIterator> result, SSECustomerKey ssecLocal) { + try { + Map.Entry<S3Object, ObjectMetadata> objectAndMetadata = getS3ObjectAndMetadata(bucket, key, ssecLocal); + InputStream objectData = objectAndMetadata.getKey().getObjectContent(); //consuming the stream + // writing the stream to bytes and to results + int sizeOfFile = (int)objectAndMetadata.getValue().getContentLength(); + byte[] inputStreamToByte = new byte[sizeOfFile]; + objectData.read(inputStreamToByte, 0, sizeOfFile); + result.put(key, new ByteArrayByteIterator(inputStreamToByte)); + objectData.close(); + } catch (Exception e){ + System.err.println("Not possible to get the object "+key); + e.printStackTrace(); + return Status.ERROR; + } + + return Status.OK; + } + + private Map.Entry<S3Object, ObjectMetadata> getS3ObjectAndMetadata(String bucket, + String key, SSECustomerKey ssecLocal) { + GetObjectRequest getObjectRequest; + GetObjectMetadataRequest getObjectMetadataRequest; + if (ssecLocal != null) { + getObjectRequest = new GetObjectRequest(bucket, + key).withSSECustomerKey(ssecLocal); + getObjectMetadataRequest = new GetObjectMetadataRequest(bucket, + key).withSSECustomerKey(ssecLocal); + } else { + getObjectRequest = new GetObjectRequest(bucket, key); + getObjectMetadataRequest = new GetObjectMetadataRequest(bucket, + key); + } + + return new AbstractMap.SimpleEntry<>(s3Client.getObject(getObjectRequest), + s3Client.getObjectMetadata(getObjectMetadataRequest)); + } + + /** + * Perform an emulation of a database scan operation on a S3 bucket. + * + * @param bucket + * The name of the bucket + * @param startkey + * The file key of the first file to read. + * @param recordcount + * The number of files to read + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A Vector of HashMaps, where each HashMap is a set field/value + * pairs for one file + * + */ + protected Status scanFromStorage(String bucket, String startkey, + int recordcount, Vector<HashMap<String, ByteIterator>> result, + SSECustomerKey ssecLocal) { + + int counter = 0; + ObjectListing listing = s3Client.listObjects(bucket); + List<S3ObjectSummary> summaries = listing.getObjectSummaries(); + List<String> keyList = new ArrayList(); + int startkeyNumber = 0; + int numberOfIteration = 0; + // getting the list of files in the bucket + while (listing.isTruncated()) { + listing = s3Client.listNextBatchOfObjects(listing); + summaries.addAll(listing.getObjectSummaries()); + } + for (S3ObjectSummary summary : summaries) { + String summaryKey = summary.getKey(); + keyList.add(summaryKey); + } + // Sorting the list of files in Alphabetical order + Collections.sort(keyList); // sorting the list + // Getting the position of the startingfile for the scan + for (String key : keyList) { + if (key.equals(startkey)){ + startkeyNumber = counter; + } else { + counter = counter + 1; + } + } + // Checking if the total number of file is bigger than the file to read, + // if not using the total number of Files + if (recordcount < keyList.size()) { + numberOfIteration = recordcount; + } else { + numberOfIteration = keyList.size(); + } + // Reading the Files starting from the startkey File till the end + // of the Files or Till the recordcount number + for (int i = startkeyNumber; i < numberOfIteration; i++){ + HashMap<String, ByteIterator> resultTemp = + new HashMap<String, ByteIterator>(); + readFromStorage(bucket, keyList.get(i), resultTemp, + ssecLocal); + result.add(resultTemp); + } + return Status.OK; + } +} diff --git a/infinispan/src/main/java/com/yahoo/ycsb/db/Status.java b/s3/src/main/java/com/yahoo/ycsb/db/package-info.java similarity index 76% rename from infinispan/src/main/java/com/yahoo/ycsb/db/Status.java rename to s3/src/main/java/com/yahoo/ycsb/db/package-info.java index 00a08a02050bae23de9a93c5a6eb4740f28766dc..42859b2f62476f5a531cd1327017bd979a27cfd6 100644 --- a/infinispan/src/main/java/com/yahoo/ycsb/db/Status.java +++ b/s3/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -13,14 +13,9 @@ * implied. See the License for the specific language governing * permissions and limitations under the License. See accompanying * LICENSE file. + * + * S3 storage client binding for YCSB. */ package com.yahoo.ycsb.db; -public class Status { - public static final int OK = 0; - public static final int ERROR = 1; - public static final int NOT_FOUND = 2; - public static final int CONFLICT = 3; - public static final int NOT_SUPPORT = 4; -} diff --git a/solr/README.md b/solr/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fc183bb71f3e4fd7e9d89703c3190a7e573ae4f5 --- /dev/null +++ b/solr/README.md @@ -0,0 +1,110 @@ +<!-- +Copyright (c) 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 Solr running locally. + +### 1. Set Up YCSB + +Clone the YCSB git repository and compile: + + git clone git://github.com/brianfrankcooper/YCSB.git + cd YCSB + mvn -pl com.yahoo.ycsb:solr-binding -am clean package + +### 2. Set Up Solr + +There must be a running Solr instance with a core/collection pre-defined and configured. +- See this [API](https://cwiki.apache.org/confluence/display/solr/CoreAdmin+API#CoreAdminAPI-CREATE) reference on how to create a core. +- See this [API](https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api1) reference on how to create a collection in SolrCloud mode. + +The `conf/schema.xml` configuration file present in the core/collection just created must be configured to handle the expected field names during benchmarking. +Below illustrates a sample from a schema config file that matches the default field names used by the ycsb client: + + <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false"/> + <field name="field0" type="text_general" indexed="true" stored="true"/> + <field name="field1" type="text_general" indexed="true" stored="true"/> + <field name="field2" type="text_general" indexed="true" stored="true"/> + <field name="field3" type="text_general" indexed="true" stored="true"/> + <field name="field4" type="text_general" indexed="true" stored="true"/> + <field name="field5" type="text_general" indexed="true" stored="true"/> + <field name="field6" type="text_general" indexed="true" stored="true"/> + <field name="field7" type="text_general" indexed="true" stored="true"/> + <field name="field8" type="text_general" indexed="true" stored="true"/> + <field name="field9" type="text_general" indexed="true" stored="true"/> + +If running in SolrCloud mode ensure there is an external Zookeeper cluster running. +- See [here](https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble) for details on how to set up an external Zookeeper cluster. +- See [here](https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files) for instructions on how to use Zookeeper to manage your core/collection configuration files. + +### 3. Run YCSB + +Now you are ready to run! First, load the data: + + ./bin/ycsb load solr -s -P workloads/workloada -p table=<core/collection name> + +Then, run the workload: + + ./bin/ycsb run solr -s -P workloads/workloada -p table=<core/collection name> + +For further configuration see below: + +### Default Configuration Parameters +The default settings for the Solr node that is created is as follows: + +- `solr.cloud` + - A Boolean value indicating if Solr is running in SolrCloud mode. If so there must be an external Zookeeper cluster running also. + - Default value is `false` and therefore expects solr to be running in stand-alone mode. + +- `solr.base.url` + - The base URL in which to interface with a running Solr instance in stand-alone mode + - Default value is `http://localhost:8983/solr + +- `solr.commit.within.time` + - The max time in ms to wait for a commit when in batch mode, ignored otherwise + - Default value is `1000ms` + +- `solr.batch.mode` + - Indicates if inserts/updates/deletes should be commited in batches (frequency controlled by the `solr.commit.within.time` parameter) or commit 1 document at a time. + - Default value is `false` + +- `solr.zookeeper.hosts` + - A list of comma seperated host:port pairs of Zookeeper nodes used to manage SolrCloud configurations. + - Must be passed when in [SolrCloud](https://cwiki.apache.org/confluence/display/solr/SolrCloud) mode. + - Default value is `localhost:2181` + +### Custom Configuration +If you wish to customize the settings used to create the Solr node +you can created a new property file that contains your desired Solr +node settings and pass it in via the parameter to 'bin/ycsb' script. Note that +the default properties will be kept if you don't explicitly overwrite them. + +Assuming that we have a properties file named "myproperties.data" that contains +custom Solr node configuration you can execute the following to +pass it into the Solr client: + + ./bin/ycsb run solr -P workloads/workloada -P myproperties.data -s + +If you wish to use SolrCloud mode ensure a Solr cluster is running with an +external zookeeper cluster and an appropriate collection has been created. +Make sure to pass the following properties as parameters to 'bin/ycsb' script. + + solr.cloud=true + solr.zookeeper.hosts=<zkHost2>:<zkPort1>,...,<zkHostN>:<zkPortN> + + diff --git a/solr/pom.xml b/solr/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..d25a140b7cd685b059771e5af4b375a32a2e32a4 --- /dev/null +++ b/solr/pom.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (c) 2012 - 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. +--> + +<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.7.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> + </parent> + + <artifactId>solr-binding</artifactId> + <name>Solr Binding</name> + <packaging>jar</packaging> + + <dependencies> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.solr</groupId> + <artifactId>solr-solrj</artifactId> + <version>${solr.version}</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.7.10</version> + </dependency> + + <dependency> + <groupId>org.apache.solr</groupId> + <artifactId>solr-test-framework</artifactId> + <version>${solr.version}</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> diff --git a/solr/src/main/java/com/yahoo/ycsb/db/SolrClient.java b/solr/src/main/java/com/yahoo/ycsb/db/SolrClient.java new file mode 100644 index 0000000000000000000000000000000000000000..bbc90775aebb9a7aa5f3f388a41f319d8b509d4d --- /dev/null +++ b/solr/src/main/java/com/yahoo/ycsb/db/SolrClient.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 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. + */ + +package com.yahoo.ycsb.db; + +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.StringByteIterator; + +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.impl.CloudSolrClient; +import org.apache.solr.client.solrj.impl.HttpSolrClient; +import org.apache.solr.client.solrj.response.QueryResponse; +import org.apache.solr.client.solrj.response.UpdateResponse; +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.common.SolrDocument; +import org.apache.solr.common.SolrDocumentList; +import org.apache.solr.common.SolrInputDocument; + +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map.Entry; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; + +/** + * Solr client for YCSB framework. + * + * <p> + * Default properties to set: + * </p> + * <ul> + * See README.md + * </ul> + * + */ +public class SolrClient extends DB { + + public static final String DEFAULT_CLOUD_MODE = "false"; + public static final String DEFAULT_BATCH_MODE = "false"; + public static final String DEFAULT_ZOOKEEPER_HOSTS = "localhost:2181"; + public static final String DEFAULT_SOLR_BASE_URL = "http://localhost:8983/solr"; + public static final String DEFAULT_COMMIT_WITHIN_TIME = "1000"; + + private org.apache.solr.client.solrj.SolrClient client; + private Integer commitTime; + private Boolean batchMode; + + /** + * Initialize any state for this DB. Called once per DB instance; there is one DB instance per + * client thread. + */ + @Override + public void init() throws DBException { + Properties props = getProperties(); + commitTime = Integer + .parseInt(props.getProperty("solr.commit.within.time", DEFAULT_COMMIT_WITHIN_TIME)); + batchMode = Boolean.parseBoolean(props.getProperty("solr.batch.mode", DEFAULT_BATCH_MODE)); + + // Check if Solr cluster is running in SolrCloud or Stand-alone mode + Boolean cloudMode = Boolean.parseBoolean(props.getProperty("solr.cloud", DEFAULT_CLOUD_MODE)); + System.err.println("Solr Cloud Mode = " + cloudMode); + if (cloudMode) { + System.err.println("Solr Zookeeper Remote Hosts = " + + props.getProperty("solr.zookeeper.hosts", DEFAULT_ZOOKEEPER_HOSTS)); + client = new CloudSolrClient( + props.getProperty("solr.zookeeper.hosts", DEFAULT_ZOOKEEPER_HOSTS)); + } else { + client = new HttpSolrClient(props.getProperty("solr.base.url", DEFAULT_SOLR_BASE_URL)); + } + } + + @Override + public void cleanup() throws DBException { + try { + client.close(); + } catch (IOException e) { + throw new DBException(e); + } + } + + /** + * Insert a record in the database. Any field/value pairs in the specified values HashMap will be + * written into the record with the specified record key. + * + * @param table + * The name of the table + * @param key + * The record key of the record to insert. + * @param values + * A HashMap of field/value pairs to insert in the record + * @return Zero on success, a non-zero error code on error. See this class's description for a + * discussion of error codes. + */ + @Override + public Status insert(String table, String key, HashMap<String, ByteIterator> values) { + try { + SolrInputDocument doc = new SolrInputDocument(); + + doc.addField("id", key); + for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { + doc.addField(entry.getKey(), entry.getValue()); + } + UpdateResponse response; + if (batchMode) { + response = client.add(table, doc, commitTime); + } else { + response = client.add(table, doc); + client.commit(table); + } + return checkStatus(response.getStatus()); + + } catch (IOException | SolrServerException e) { + e.printStackTrace(); + } + return Status.ERROR; + } + + /** + * Delete a record from the database. + * + * @param table + * The name of the table + * @param key + * The record key of the record to delete. + * @return Zero on success, a non-zero error code on error. See this class's description for a + * discussion of error codes. + */ + @Override + public Status delete(String table, String key) { + try { + UpdateResponse response; + if (batchMode) { + response = client.deleteById(table, key, commitTime); + } else { + response = client.deleteById(table, key); + client.commit(table); + } + return checkStatus(response.getStatus()); + } catch (IOException | SolrServerException e) { + e.printStackTrace(); + } + return Status.ERROR; + } + + /** + * Read a record from the database. Each field/value pair from the result will be stored in a + * HashMap. + * + * @param table + * The name of the table + * @param key + * The record key of the record to read. + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A HashMap of field/value pairs for the result + * @return Zero on success, a non-zero error code on error or "not found". + */ + @Override + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + try { + Boolean returnFields = false; + String[] fieldList = null; + if (fields != null) { + returnFields = true; + fieldList = fields.toArray(new String[fields.size()]); + } + SolrQuery query = new SolrQuery(); + query.setQuery("id:" + key); + if (returnFields) { + query.setFields(fieldList); + } + final QueryResponse response = client.query(table, query); + SolrDocumentList results = response.getResults(); + if ((results != null) && (results.getNumFound() > 0)) { + for (String field : results.get(0).getFieldNames()) { + result.put(field, + new StringByteIterator(String.valueOf(results.get(0).getFirstValue(field)))); + } + } + return checkStatus(response.getStatus()); + } catch (IOException | SolrServerException e) { + e.printStackTrace(); + } + return Status.ERROR; + } + + /** + * Update a record in the database. Any field/value pairs in the specified values HashMap will be + * written into the record with the specified record key, overwriting any existing values with the + * same field name. + * + * @param table + * The name of the table + * @param key + * The record key of the record to write. + * @param values + * A HashMap of field/value pairs to update in the record + * @return Zero on success, a non-zero error code on error. See this class's description for a + * discussion of error codes. + */ + @Override + public Status update(String table, String key, HashMap<String, ByteIterator> values) { + try { + SolrInputDocument updatedDoc = new SolrInputDocument(); + updatedDoc.addField("id", key); + + for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { + updatedDoc.addField(entry.getKey(), Collections.singletonMap("set", entry.getValue())); + } + + UpdateResponse writeResponse; + if (batchMode) { + writeResponse = client.add(table, updatedDoc, commitTime); + } else { + writeResponse = client.add(table, updatedDoc); + client.commit(table); + } + return checkStatus(writeResponse.getStatus()); + } catch (IOException | SolrServerException e) { + e.printStackTrace(); + } + return Status.ERROR; + } + + /** + * Perform a range scan for a set of records in the database. Each field/value pair from the + * result will be stored in a HashMap. + * + * @param table + * The name of the table + * @param startkey + * The record key of the first record to read. + * @param recordcount + * The number of records to read + * @param fields + * The list of fields to read, or null for all of them + * @param result + * A Vector of HashMaps, where each HashMap is a set field/value pairs for one record + * @return Zero on success, a non-zero error code on error. See this class's description for a + * discussion of error codes. + */ + @Override + public Status scan(String table, String startkey, int recordcount, Set<String> fields, + Vector<HashMap<String, ByteIterator>> result) { + try { + Boolean returnFields = false; + String[] fieldList = null; + if (fields != null) { + returnFields = true; + fieldList = fields.toArray(new String[fields.size()]); + } + SolrQuery query = new SolrQuery(); + query.setQuery("*:*"); + query.setParam("fq", "id:[ " + startkey + " TO * ]"); + if (returnFields) { + query.setFields(fieldList); + } + query.setRows(recordcount); + final QueryResponse response = client.query(table, query); + SolrDocumentList results = response.getResults(); + + HashMap<String, ByteIterator> entry; + + for (SolrDocument hit : results) { + entry = new HashMap<String, ByteIterator>((int) results.getNumFound()); + for (String field : hit.getFieldNames()) { + entry.put(field, new StringByteIterator(String.valueOf(hit.getFirstValue(field)))); + } + result.add(entry); + } + return checkStatus(response.getStatus()); + } catch (IOException | SolrServerException e) { + e.printStackTrace(); + } + return Status.ERROR; + } + + private Status checkStatus(int status) { + Status responseStatus; + switch (status) { + case 0: + responseStatus = Status.OK; + break; + case 400: + responseStatus = Status.BAD_REQUEST; + break; + case 403: + responseStatus = Status.FORBIDDEN; + break; + case 404: + responseStatus = Status.NOT_FOUND; + break; + case 500: + responseStatus = Status.ERROR; + break; + case 503: + responseStatus = Status.SERVICE_UNAVAILABLE; + break; + default: + responseStatus = Status.UNEXPECTED_STATE; + break; + } + return responseStatus; + } + +} diff --git a/solr/src/main/java/com/yahoo/ycsb/db/package-info.java b/solr/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..98fd53e9604309a8ca72e4ecddd39109c7266cf9 --- /dev/null +++ b/solr/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 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. + */ + +/** + * The YCSB binding for + * <a href="http://lucene.apache.org/solr/">Solr</a>. + */ +package com.yahoo.ycsb.db; + diff --git a/solr/src/main/resources/log4j.properties b/solr/src/main/resources/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..0ede1d4c141192a2de7e00461b3cb9998a8e8a68 --- /dev/null +++ b/solr/src/main/resources/log4j.properties @@ -0,0 +1,8 @@ +# Root logger option +log4j.rootLogger=INFO, stderr + +# Direct log messages to stderr +log4j.appender.stderr=org.apache.log4j.ConsoleAppender +log4j.appender.stderr.Target=System.err +log4j.appender.stderr.layout=org.apache.log4j.PatternLayout +log4j.appender.stderr.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n diff --git a/solr/src/test/java/com/yahoo/ycsb/db/SolrClientBaseTest.java b/solr/src/test/java/com/yahoo/ycsb/db/SolrClientBaseTest.java new file mode 100644 index 0000000000000000000000000000000000000000..c6bf53a16f2d82ffb5090461e439184c9855ccea --- /dev/null +++ b/solr/src/test/java/com/yahoo/ycsb/db/SolrClientBaseTest.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016 YCSB contributors. All rights reserved. + * <p/> + * 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 + * <p/> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p/> + * 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. + */ + +package com.yahoo.ycsb.db; + +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.StringByteIterator; +import org.apache.solr.client.solrj.embedded.JettyConfig; +import org.apache.solr.cloud.MiniSolrCloudCluster; +import org.apache.solr.common.util.NamedList; +import org.junit.*; + +import java.io.File; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.HashMap; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +public abstract class SolrClientBaseTest { + + protected static MiniSolrCloudCluster miniSolrCloudCluster; + private DB instance; + private final static HashMap<String, ByteIterator> MOCK_DATA; + protected final static String MOCK_TABLE = "ycsb"; + private final static String MOCK_KEY0 = "0"; + private final static String MOCK_KEY1 = "1"; + private final static int NUM_RECORDS = 10; + + static { + MOCK_DATA = new HashMap<>(NUM_RECORDS); + for (int i = 0; i < NUM_RECORDS; i++) { + MOCK_DATA.put("field" + i, new StringByteIterator("value" + i)); + } + } + + @BeforeClass + public static void onlyOnce() throws Exception { + Path miniSolrCloudClusterTempDirectory = Files.createTempDirectory("miniSolrCloudCluster"); + miniSolrCloudClusterTempDirectory.toFile().deleteOnExit(); + miniSolrCloudCluster = new MiniSolrCloudCluster(1, miniSolrCloudClusterTempDirectory, JettyConfig.builder().build()); + + // Upload Solr configuration + URL configDir = SolrClientBaseTest.class.getClassLoader().getResource("solr_config"); + assertNotNull(configDir); + miniSolrCloudCluster.uploadConfigDir(new File(configDir.toURI()), MOCK_TABLE); + } + + @AfterClass + public static void destroy() throws Exception { + if(miniSolrCloudCluster != null) { + miniSolrCloudCluster.shutdown(); + } + } + + @Before + public void setup() throws Exception { + NamedList<Object> namedList = miniSolrCloudCluster.createCollection(MOCK_TABLE, 1, 1, MOCK_TABLE, null); + assertEquals(namedList.indexOf("success", 0), 1); + Thread.sleep(1000); + + instance = getDB(); + } + + @After + public void tearDown() throws Exception { + if(miniSolrCloudCluster != null) { + NamedList<Object> namedList = miniSolrCloudCluster.deleteCollection(MOCK_TABLE); + assertEquals(namedList.indexOf("success", 0), 1); + Thread.sleep(1000); + } + } + + @Test + public void testInsert() throws Exception { + Status result = instance.insert(MOCK_TABLE, MOCK_KEY0, MOCK_DATA); + assertEquals(Status.OK, result); + } + + @Test + public void testDelete() throws Exception { + Status result = instance.delete(MOCK_TABLE, MOCK_KEY1); + assertEquals(Status.OK, result); + } + + @Test + public void testRead() throws Exception { + Set<String> fields = MOCK_DATA.keySet(); + HashMap<String, ByteIterator> resultParam = new HashMap<>(NUM_RECORDS); + Status result = instance.read(MOCK_TABLE, MOCK_KEY1, fields, resultParam); + assertEquals(Status.OK, result); + } + + @Test + public void testUpdate() throws Exception { + HashMap<String, ByteIterator> newValues = new HashMap<>(NUM_RECORDS); + + for (int i = 0; i < NUM_RECORDS; i++) { + newValues.put("field" + i, new StringByteIterator("newvalue" + i)); + } + + Status result = instance.update(MOCK_TABLE, MOCK_KEY1, newValues); + assertEquals(Status.OK, result); + + //validate that the values changed + HashMap<String, ByteIterator> resultParam = new HashMap<>(NUM_RECORDS); + instance.read(MOCK_TABLE, MOCK_KEY1, MOCK_DATA.keySet(), resultParam); + + for (int i = 0; i < NUM_RECORDS; i++) { + assertEquals("newvalue" + i, resultParam.get("field" + i).toString()); + } + } + + @Test + public void testScan() throws Exception { + Set<String> fields = MOCK_DATA.keySet(); + Vector<HashMap<String, ByteIterator>> resultParam = new Vector<>(NUM_RECORDS); + Status result = instance.scan(MOCK_TABLE, MOCK_KEY1, NUM_RECORDS, fields, resultParam); + assertEquals(Status.OK, result); + } + + /** + * Gets the test DB. + * + * @return The test DB. + */ + protected DB getDB() { + return getDB(new Properties()); + } + + /** + * Gets the test DB. + * + * @param props + * Properties to pass to the client. + * @return The test DB. + */ + protected abstract DB getDB(Properties props); +} diff --git a/solr/src/test/java/com/yahoo/ycsb/db/SolrClientCloudTest.java b/solr/src/test/java/com/yahoo/ycsb/db/SolrClientCloudTest.java new file mode 100644 index 0000000000000000000000000000000000000000..379d405a983b022db9a3c9c2030721a5746aa315 --- /dev/null +++ b/solr/src/test/java/com/yahoo/ycsb/db/SolrClientCloudTest.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016 YCSB contributors. All rights reserved. + * <p/> + * 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 + * <p/> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p/> + * 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. + */ +package com.yahoo.ycsb.db; + +import com.yahoo.ycsb.DB; +import org.junit.After; + +import java.util.Properties; + +import static org.junit.Assume.assumeNoException; + +public class SolrClientCloudTest extends SolrClientBaseTest { + + private SolrClient instance; + + @After + public void tearDown() throws Exception { + try { + if(instance != null) { + instance.cleanup(); + } + } finally { + super.tearDown(); + } + } + + @Override + protected DB getDB(Properties props) { + instance = new SolrClient(); + + props.setProperty("solr.cloud", "true"); + props.setProperty("solr.zookeeper.hosts", miniSolrCloudCluster.getSolrClient().getZkHost()); + + instance.setProperties(props); + try { + instance.init(); + } catch (Exception error) { + assumeNoException(error); + } + return instance; + } +} diff --git a/solr/src/test/java/com/yahoo/ycsb/db/SolrClientTest.java b/solr/src/test/java/com/yahoo/ycsb/db/SolrClientTest.java new file mode 100644 index 0000000000000000000000000000000000000000..82fb866c1897d30c10b925962bd64108e8ed19d3 --- /dev/null +++ b/solr/src/test/java/com/yahoo/ycsb/db/SolrClientTest.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2016 YCSB contributors. All rights reserved. + * <p/> + * 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 + * <p/> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p/> + * 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. + */ +package com.yahoo.ycsb.db; + +import com.yahoo.ycsb.DB; +import org.apache.solr.client.solrj.embedded.JettySolrRunner; +import org.junit.After; + +import java.net.URL; +import java.util.Properties; +import java.util.Set; + +import static org.junit.Assume.assumeNoException; + +public class SolrClientTest extends SolrClientBaseTest { + + private SolrClient instance; + + @After + public void tearDown() throws Exception { + try { + if(instance != null) { + instance.cleanup(); + } + } finally { + super.tearDown(); + } + } + + @Override + protected DB getDB(Properties props) { + instance = new SolrClient(); + + // Use the first Solr server in the cluster. + // Doesn't matter if there are more since requests will be forwarded properly by Solr. + JettySolrRunner jettySolrRunner = miniSolrCloudCluster.getJettySolrRunners().get(0); + String solrBaseUrl = String.format("http://localhost:%s%s", jettySolrRunner.getLocalPort(), + jettySolrRunner.getBaseUrl()); + + props.setProperty("solr.base.url", solrBaseUrl); + instance.setProperties(props); + + try { + instance.init(); + } catch (Exception error) { + assumeNoException(error); + } + return instance; + } +} diff --git a/solr/src/test/resources/log4j.properties b/solr/src/test/resources/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..599b5051284d3781f23317b26331ebb3c39d1d1b --- /dev/null +++ b/solr/src/test/resources/log4j.properties @@ -0,0 +1,29 @@ +# Copyright (c) 2015-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. +# + +# Root logger option +log4j.rootLogger=INFO, stderr + +log4j.appender.stderr=org.apache.log4j.ConsoleAppender +log4j.appender.stderr.target=System.err +log4j.appender.stderr.layout=org.apache.log4j.PatternLayout +log4j.appender.stderr.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n + +# Suppress messages from ZooKeeper +log4j.logger.org.apache.zookeeper=ERROR +# Solr classes are too chatty in test at INFO +log4j.logger.org.apache.solr=ERROR +log4j.logger.org.eclipse.jetty=ERROR diff --git a/solr/src/test/resources/solr_config/schema.xml b/solr/src/test/resources/solr_config/schema.xml new file mode 100644 index 0000000000000000000000000000000000000000..55323ee4c1d40d5ea1d1ca9cfa05666d70929442 --- /dev/null +++ b/solr/src/test/resources/solr_config/schema.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" ?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> +<!-- + Copied from Apache Solr 5.4.0 solr/solrj/src/test-files/solrj/solr/collection1/conf/schema.xml + Modified to only required types and fields for YCSB testing. +--> +<schema name="test" version="1.6"> + <types> + <fieldType name="int" docValues="true" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> + <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> + + <fieldtype name="text" class="solr.TextField"> + <analyzer> + <tokenizer class="solr.StandardTokenizerFactory"/> + <filter class="solr.StandardFilterFactory"/> + <filter class="solr.LowerCaseFilterFactory"/> + <filter class="solr.StopFilterFactory"/> + <filter class="solr.PorterStemFilterFactory"/> + </analyzer> + </fieldtype> + </types> + + <fields> + <field name="id" type="int" indexed="true" stored="true" multiValued="false" required="false"/> + <field name="text" type="text" indexed="true" stored="false"/> + + <field name="_version_" type="long" indexed="true" stored="true"/> + + <field name="field0" type="text" indexed="true" stored="true"/> + <field name="field1" type="text" indexed="true" stored="true"/> + <field name="field2" type="text" indexed="true" stored="true"/> + <field name="field3" type="text" indexed="true" stored="true"/> + <field name="field4" type="text" indexed="true" stored="true"/> + <field name="field5" type="text" indexed="true" stored="true"/> + <field name="field6" type="text" indexed="true" stored="true"/> + <field name="field7" type="text" indexed="true" stored="true"/> + <field name="field8" type="text" indexed="true" stored="true"/> + <field name="field9" type="text" indexed="true" stored="true"/> + </fields> + + <defaultSearchField>text</defaultSearchField> + <uniqueKey>id</uniqueKey> +</schema> diff --git a/solr/src/test/resources/solr_config/solrconfig.xml b/solr/src/test/resources/solr_config/solrconfig.xml new file mode 100644 index 0000000000000000000000000000000000000000..7c58457dcdc99064c31b4838e76f2d4d25ae5f69 --- /dev/null +++ b/solr/src/test/resources/solr_config/solrconfig.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- + Copied from Apache Solr 5.4.0 solr/src/test/resources/solr_config/solrconfig.xml +--> + +<!-- + This is a stripped down config file used for a simple example... + It is *not* a good example to work from. +--> +<config> + <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion> + <indexConfig> + <useCompoundFile>${useCompoundFile:false}</useCompoundFile> + </indexConfig> + <dataDir>${solr.data.dir:}</dataDir> + <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/> + + <updateHandler class="solr.DirectUpdateHandler2"> + <updateLog> + <str name="dir">${solr.data.dir:}</str> + </updateLog> + </updateHandler> + + <requestDispatcher handleSelect="true" > + <requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" /> + </requestDispatcher> + + <requestHandler name="standard" class="solr.StandardRequestHandler" default="true" /> + + <requestHandler name="/admin/ping" class="solr.PingRequestHandler"> + <lst name="invariants"> + <str name="q">*:*</str> + </lst> + <lst name="defaults"> + <str name="echoParams">all</str> + </lst> + <str name="healthcheckFile">server-enabled.txt</str> + </requestHandler> + + <!-- config for the admin interface --> + <admin> + <defaultQuery>solr</defaultQuery> + </admin> + +</config> + diff --git a/tarantool/pom.xml b/tarantool/pom.xml index 6944b5e90bfe628936879943edd0f2a254eac2ea..11f014199f6a3958a442217eb77b0fcd2021142a 100644 --- a/tarantool/pom.xml +++ b/tarantool/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2015 YCSB contributors. All rights reserved. +<!-- +Copyright (c) 2015-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 @@ -22,7 +22,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent/</relativePath> </parent> @@ -30,6 +30,10 @@ LICENSE file. <name>Tarantool DB Binding</name> <packaging>jar</packaging> + <properties> + <checkstyle.failOnViolation>false</checkstyle.failOnViolation> + </properties> + <dependencies> <dependency> <groupId>org.tarantool</groupId> @@ -43,13 +47,4 @@ LICENSE file. <scope>provided</scope> </dependency> </dependencies> - - <repositories> - <repository> - <id>dgreenru-repo</id> - <name>dgreenru repository</name> - <url>http://dgreenru.github.com/repo/</url> - </repository> - </repositories> - </project> diff --git a/tarantool/src/main/conf/tarantool-hash.lua b/tarantool/src/main/conf/tarantool-hash.lua index 256d93c6ce4ace39d6750daac87622e412796ccd..02c55f71a69e83662e5fb71dafe4198193ccbfab 100644 --- a/tarantool/src/main/conf/tarantool-hash.lua +++ b/tarantool/src/main/conf/tarantool-hash.lua @@ -1,3 +1,18 @@ +-- Copyright (c) 2015 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. + box.cfg { listen=3303, logger="tarantool.log", diff --git a/tarantool/src/main/conf/tarantool-tree.lua b/tarantool/src/main/conf/tarantool-tree.lua index 1e2a90e3c44c7b62247b4ada997ecfa95202a6b7..0782bb1891474112355a2babe44d476c4cfd00db 100644 --- a/tarantool/src/main/conf/tarantool-tree.lua +++ b/tarantool/src/main/conf/tarantool-tree.lua @@ -1,3 +1,18 @@ +-- Copyright (c) 2015 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. + box.cfg { listen=3303, logger="tarantool.log", diff --git a/tarantool/src/main/java/com/yahoo/ycsb/db/TarantoolClient.java b/tarantool/src/main/java/com/yahoo/ycsb/db/TarantoolClient.java index aa26b13b742929b54265040742602544035cd410..b90dff119296ebde7a0fdf99b6138086a39f90db 100644 --- a/tarantool/src/main/java/com/yahoo/ycsb/db/TarantoolClient.java +++ b/tarantool/src/main/java/com/yahoo/ycsb/db/TarantoolClient.java @@ -16,24 +16,25 @@ */ package com.yahoo.ycsb.db; -import java.util.Map; -import java.util.Set; -import java.util.List; -import java.util.Arrays; -import java.util.Vector; -import java.util.HashMap; -import java.util.Properties; -import java.util.logging.Level; -import java.util.logging.Logger; +import com.yahoo.ycsb.ByteIterator; +import com.yahoo.ycsb.DB; +import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.StringByteIterator; import org.tarantool.TarantoolConnection16; import org.tarantool.TarantoolConnection16Impl; import org.tarantool.TarantoolException; -import com.yahoo.ycsb.DB; -import com.yahoo.ycsb.DBException; -import com.yahoo.ycsb.ByteIterator; -import com.yahoo.ycsb.StringByteIterator; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; +import java.util.logging.Level; +import java.util.logging.Logger; public class TarantoolClient extends DB { @@ -82,22 +83,8 @@ public class TarantoolClient extends DB { } @Override - public int insert(String table, String key, HashMap<String, ByteIterator> values) { - int j = 0; - String[] tuple = new String[1 + 2 * values.size()]; - tuple[0] = key; - for (Map.Entry<String, ByteIterator> i: values.entrySet()) { - tuple[j + 1] = i.getKey(); - tuple[j + 2] = i.getValue().toString(); - j += 2; - } - try { - this.connection.replace(this.spaceNo, tuple); - } catch (TarantoolException exc) { - logger.log(Level.SEVERE,"Can't insert element", exc); - return 1; - } - return 0; + public Status insert(String table, String key, HashMap<String, ByteIterator> values) { + return replace(key, values, "Can't insert element"); } private HashMap<String, ByteIterator> tuple_convert_filter (List<String> input, @@ -112,23 +99,23 @@ public class TarantoolClient extends DB { } @Override - public int read(String table, String key, Set<String> fields, + public Status read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) { try { List<String> response; response = this.connection.select(this.spaceNo, 0, Arrays.asList(key), 0, 1, 0); result = tuple_convert_filter(response, fields); - return 0; + return Status.OK; } catch (TarantoolException exc) { logger.log(Level.SEVERE,"Can't select element", exc); - return 1; + return Status.ERROR; } catch (NullPointerException exc) { - return 1; + return Status.ERROR; } } @Override - public int scan(String table, String startkey, + public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { List<List<String>> response; @@ -136,33 +123,40 @@ public class TarantoolClient extends DB { response = this.connection.select(this.spaceNo, 0, Arrays.asList(startkey), 0, recordcount, 6); } catch (TarantoolException exc) { logger.log(Level.SEVERE,"Can't select range elements", exc); - return 1; + return Status.ERROR; } catch (NullPointerException exc) { - return 1; + return Status.ERROR; } for(List<String> i: response) { HashMap<String, ByteIterator> temp = tuple_convert_filter(i, fields); if (!temp.isEmpty()) result.add((HashMap<String, ByteIterator>) temp.clone()); } - return 0; + return Status.OK; } @Override - public int delete(String table, String key) { + public Status delete(String table, String key) { try { this.connection.delete(this.spaceNo, Arrays.asList(key)); } catch (TarantoolException exc) { logger.log(Level.SEVERE,"Can't delete element", exc); - return 1; + return Status.ERROR; } catch (NullPointerException e) { - return 1; + return Status.ERROR; } - return 0; + return Status.OK; } @Override - public int update(String table, String key, + public Status update(String table, String key, HashMap<String, ByteIterator> values) { + return replace(key, values, "Can't replace element"); + + } + + private Status replace(String key, + HashMap<String, ByteIterator> values, + String exceptionDescription) { int j = 0; String[] tuple = new String[1 + 2 * values.size()]; tuple[0] = key; @@ -174,10 +168,10 @@ public class TarantoolClient extends DB { try { this.connection.replace(this.spaceNo, tuple); } catch (TarantoolException exc) { - logger.log(Level.SEVERE,"Can't replace element", exc); - return 1; + logger.log(Level.SEVERE,exceptionDescription, exc); + return Status.ERROR; } - return 0; + return Status.OK; } } diff --git a/voldemort/pom.xml b/voldemort/pom.xml index d994856941d91cb4043f4f5b637b83b8e1e94592..943888e7cfe5c8e00742aa83ee74db0e91bcf69f 100644 --- a/voldemort/pom.xml +++ b/voldemort/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. +Copyright (c) 2012 - 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 @@ -22,7 +22,7 @@ LICENSE file. <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>binding-parent</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.7.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> @@ -48,11 +48,4 @@ LICENSE file. <scope>provided</scope> </dependency> </dependencies> - - <repositories> - <repository> - <id>clojars.org</id> - <url>http://clojars.org/repo</url> - </repository> - </repositories> </project> diff --git a/voldemort/src/main/java/com/yahoo/ycsb/db/VoldemortClient.java b/voldemort/src/main/java/com/yahoo/ycsb/db/VoldemortClient.java index 40858b08283cf5f104f69e4add8055a47d9d53e4..a4132b2f40afa71d9485cca648065b54f04f3e1d 100644 --- a/voldemort/src/main/java/com/yahoo/ycsb/db/VoldemortClient.java +++ b/voldemort/src/main/java/com/yahoo/ycsb/db/VoldemortClient.java @@ -32,137 +32,141 @@ import voldemort.versioning.Versioned; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; +import com.yahoo.ycsb.Status; import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.StringByteIterator; - +/** + * YCSB binding for + * <a href="http://www.project-voldemort.com/voldemort/">Voldemort</a>. + */ public class VoldemortClient extends DB { + private static final Logger LOGGER = Logger.getLogger(VoldemortClient.class); + + private StoreClient<String, HashMap<String, String>> storeClient; + private SocketStoreClientFactory socketFactory; + private String storeName; + + /** + * Initialize the DB layer. This accepts all properties allowed by the + * Voldemort client. A store maps to a table. Required : bootstrap_urls + * Additional property : store_name -> to preload once, should be same as -t + * {@link ClientConfig} + */ + public void init() throws DBException { + ClientConfig clientConfig = new ClientConfig(getProperties()); + socketFactory = new SocketStoreClientFactory(clientConfig); + + // Retrieve store name + storeName = getProperties().getProperty("store_name", "usertable"); + + // Use store name to retrieve client + storeClient = socketFactory.getStoreClient(storeName); + if (storeClient == null) { + throw new DBException("Unable to instantiate store client"); + } + } + + public void cleanup() throws DBException { + socketFactory.close(); + } + + @Override + public Status delete(String table, String key) { + if (checkStore(table) == Status.ERROR) { + return Status.ERROR; + } + + if (storeClient.delete(key)) { + return Status.OK; + } + return Status.ERROR; + } + + @Override + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + if (checkStore(table) == Status.ERROR) { + return Status.ERROR; + } + storeClient.put(key, + (HashMap<String, String>) StringByteIterator.getStringMap(values)); + return Status.OK; + } + + @Override + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + if (checkStore(table) == Status.ERROR) { + return Status.ERROR; + } + + Versioned<HashMap<String, String>> versionedValue = storeClient.get(key); + + if (versionedValue == null) { + return Status.NOT_FOUND; + } + + if (fields != null) { + for (String field : fields) { + String val = versionedValue.getValue().get(field); + if (val != null) { + result.put(field, new StringByteIterator(val)); + } + } + } else { + StringByteIterator.putAllAsByteIterators(result, + versionedValue.getValue()); + } + return Status.OK; + } + + @Override + public Status scan(String table, String startkey, int recordcount, + Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { + LOGGER.warn("Voldemort does not support Scan semantics"); + return Status.OK; + } + + @Override + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { + if (checkStore(table) == Status.ERROR) { + return Status.ERROR; + } + + Versioned<HashMap<String, String>> versionedValue = storeClient.get(key); + HashMap<String, String> value = new HashMap<String, String>(); + VectorClock version; + if (versionedValue != null) { + version = ((VectorClock) versionedValue.getVersion()).incremented(0, 1); + value = versionedValue.getValue(); + for (Entry<String, ByteIterator> entry : values.entrySet()) { + value.put(entry.getKey(), entry.getValue().toString()); + } + } else { + version = new VectorClock(); + StringByteIterator.putAllAsStrings(value, values); + } + + storeClient.put(key, Versioned.value(value, version)); + return Status.OK; + } - private StoreClient<String, HashMap<String, String>> storeClient; - private SocketStoreClientFactory socketFactory; - private String storeName; - private final Logger logger = Logger.getLogger(VoldemortClient.class); - - public static final int OK = 0; - public static final int ERROR = -1; - public static final int NOT_FOUND = -2; - - /** - * Initialize the DB layer. This accepts all properties allowed by the Voldemort client. - * A store maps to a table. - * Required : bootstrap_urls - * Additional property : store_name -> to preload once, should be same as -t <table> - * - * {@linktourl http://project-voldemort.com/javadoc/client/voldemort/client/ClientConfig.html} - */ - public void init() throws DBException { - ClientConfig clientConfig = new ClientConfig(getProperties()); - socketFactory = new SocketStoreClientFactory(clientConfig); - - // Retrieve store name - storeName = getProperties().getProperty("store_name", "usertable"); - - // Use store name to retrieve client - storeClient = socketFactory.getStoreClient(storeName); - if ( storeClient == null ) - throw new DBException("Unable to instantiate store client"); - - } - - public void cleanup() throws DBException { - socketFactory.close(); - } - - @Override - public int delete(String table, String key) { - if ( checkStore(table) == ERROR ) { - return ERROR; - } - - if ( storeClient.delete(key) ) - return OK; - else - return ERROR; - } - - @Override - public int insert(String table, String key, HashMap<String, ByteIterator> values) { - if ( checkStore(table) == ERROR ) { - return ERROR; - } - storeClient.put(key, (HashMap<String,String>)StringByteIterator.getStringMap(values)); - return OK; - } - - @Override - public int read(String table, String key, Set<String> fields, - HashMap<String, ByteIterator> result) { - if ( checkStore(table) == ERROR ) { - return ERROR; - } - - Versioned<HashMap<String, String>> versionedValue = storeClient.get(key); - - if ( versionedValue == null ) - return NOT_FOUND; - - if ( fields != null ) { - for (String field : fields) { - String val = versionedValue.getValue().get(field); - if ( val != null ) - result.put(field, new StringByteIterator(val)); - } - } else { - StringByteIterator.putAllAsByteIterators(result, versionedValue.getValue()); - } - return OK; - } - - @Override - public int scan(String table, String startkey, int recordcount, - Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { - logger.warn("Voldemort does not support Scan semantics"); - return OK; - } - - @Override - public int update(String table, String key, HashMap<String, ByteIterator> values) { - if ( checkStore(table) == ERROR ) { - return ERROR; - } - - Versioned<HashMap<String, String>> versionedValue = storeClient.get(key); - HashMap<String, String> value = new HashMap<String, String>(); - VectorClock version; - if ( versionedValue != null ) { - version = ((VectorClock) versionedValue.getVersion()).incremented(0, 1); - value = versionedValue.getValue(); - for (Entry<String, ByteIterator> entry : values.entrySet()) { - value.put(entry.getKey(), entry.getValue().toString()); - } - } else { - version = new VectorClock(); - StringByteIterator.putAllAsStrings(value, values); - } - - storeClient.put(key, Versioned.value(value, version)); - return OK; - } - - private int checkStore(String table) { - if ( table.compareTo(storeName) != 0 ) { - try { - storeClient = socketFactory.getStoreClient(table); - if ( storeClient == null ) { - logger.error("Could not instantiate storeclient for " + table); - return ERROR; - } - storeName = table; - } catch ( Exception e ) { - return ERROR; - } - } - return OK; - } + private Status checkStore(String table) { + if (table.compareTo(storeName) != 0) { + try { + storeClient = socketFactory.getStoreClient(table); + if (storeClient == null) { + LOGGER.error("Could not instantiate storeclient for " + table); + return Status.ERROR; + } + storeName = table; + } catch (Exception e) { + return Status.ERROR; + } + } + return Status.OK; + } } diff --git a/voldemort/src/main/java/com/yahoo/ycsb/db/package-info.java b/voldemort/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..f965b9ec16cbd89d12941a8a544f244a0fcd149a --- /dev/null +++ b/voldemort/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2014, Yahoo!, Inc. 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. + */ + +/** + * The YCSB binding for + * <a href="http://www.project-voldemort.com/voldemort/">Voldemort</a>. + */ +package com.yahoo.ycsb.db; diff --git a/workloads/workload_template b/workloads/workload_template index e59bace12a24c3180e585a737537684f0e3e7cd7..f5e80c8899e0e66ab41ea7a2add5c4a511dcb5e5 100644 --- a/workloads/workload_template +++ b/workloads/workload_template @@ -115,9 +115,57 @@ table=usertable # How the latency measurements are presented measurementtype=histogram #measurementtype=timeseries +#measurementtype=raw +# When measurementtype is set to raw, measurements will be output +# as RAW datapoints in the following csv format: +# "operation, timestamp of the measurement, latency in us" +# +# Raw datapoints are collected in-memory while the test is running. Each +# data point consumes about 50 bytes (including java object overhead). +# For a typical run of 1 million to 10 million operations, this should +# fit into memory most of the time. If you plan to do 100s of millions of +# operations per run, consider provisioning a machine with larger RAM when using +# the RAW measurement type, or split the run into multiple runs. +# +# Optionally, you can specify an output file to save raw datapoints. +# Otherwise, raw datapoints will be written to stdout. +# The output file will be appended to if it already exists, otherwise +# a new output file will be created. +#measurement.raw.output_file = /tmp/your_output_file_for_this_run # The range of latencies to track in the histogram (milliseconds) histogram.buckets=1000 # Granularity for time series (in milliseconds) timeseries.granularity=1000 + +# Latency reporting. +# +# YCSB records latency of failed operations separately from successful ones. +# Latency of all OK operations will be reported under their operation name, +# such as [READ], [UPDATE], etc. +# +# For failed operations: +# By default we don't track latency numbers of specific error status. +# We just report latency of all failed operation under one measurement name +# such as [READ-FAILED]. But optionally, user can configure to have either: +# 1. Record and report latency for each and every error status code by +# setting reportLatencyForEachError to true, or +# 2. Record and report latency for a select set of error status codes by +# providing a CSV list of Status codes via the "latencytrackederrors" +# property. +# reportlatencyforeacherror=false +# latencytrackederrors="<comma separated strings of error codes>" + +# Insertion error retry for the core workload. +# +# By default, the YCSB core workload does not retry any operations. +# However, during the load process, if any insertion fails, the entire +# load process is terminated. +# If a user desires to have more robust behavior during this phase, they can +# enable retry for insertion by setting the following property to a positive +# number. +# core_workload_insertion_retry_limit = 0 +# +# the following number controls the interval between retries (in seconds): +# core_workload_insertion_retry_interval = 3