diff --git a/.gitignore b/.gitignore index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..882b67e2ec0e1a624c962e90d86272828b6f0cb4 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,18 @@ +# ignore compiled byte code +target + +# ignore output files from testing +output* + +# ignore standard eclipse +.project +.classpath +.settings +.checkstyle + +# ignore standard intellij +.idea/ +*.iml +*.iws + +.DS_Store diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..aef900b74f1bd2a2303ff913688dba8bb54243b2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,36 @@ +# 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/ + +language: java + +jdk: + - oraclejdk7 + - openjdk7 + +install: mvn install -q -DskipTests=true + +script: mvn test -q + +# Services to start for tests. +services: + - mongodb + + +# Use the Container based infrastructure. +sudo: false diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index a5d40f0db85bf3c20e076f41e8e42fec396b64a1..0000000000000000000000000000000000000000 --- a/CHANGELOG +++ /dev/null @@ -1,64 +0,0 @@ -- gh-67 Use checkstyle (m1ch1) -- gh-76 Implemented OrientDB client (lvca) -- gh-88 YCSB client for Amazon DynamoDB (jananin) -- gh-89 Patch for YCSB Cassandra Client version 1.0.6 (jananin) - -0.1.4 - 2/22/12 - -- Fixes for Cassandra 0.7 client (tjake) -- New generator FileGenerator (nono) -- Fixes for MongoDB (nono) -- Fixes for Voldemort (nono) -- JDBC client (sudiptodas) -- HotspotIntegerGenerator (sudiptodas) -- Optimizing cassandra7 (joaquincasares) -- Mysql key fix (joaquincasares) -- Added a db plugin for Infinispan (maniksurtani) -- gh-31 Support to stop benchmark after a maximum specified elapsed time. (sudiptodas) -- gh-35 Cassandra0.8 support (joaquincasares) -- gh-30 IllegalArgumentException with MongoDB (m1ch1) -- gh-27 MongoDbClient was not working with non localhost URLs (arunxarun) -- gh-29 Add simple sharding capabilities for JDBC driver (kibab) -- gh-40 Merge Redis database interface layer (lehmannro) -- gh-42 Response latencies are measured in microseconds (mikewied) -- gh-43 Variable length fields (sears) -- gh-44 Constant occupancy workload (sears) -- gh-45 Modify DB API for efficient large object support (sears) -- gh-46 Fixed typo in RedisClient (Zlender) -- gh-49 Build fix (sears) -- gh-50 Switch unordered key generation from FNV32 to FNV64 (sears) -- gh-51 Improved Random Number Generation Performance and add Exponential distribution support (sears) -- gh-52 Mongo db fix (sears) -- gh-54 Add mapkeeper driver (m1ch1) -- gh-57 voldemort - enable nio connector (akkumar) -- gh-58 benchmarking with hbase 0.90.5 (akkumar) -- gh-55 VMware vFabric GemFire (sbawaska) -- gh-59 Cassandra 1.0.6 (akkumar) -- gh-62 Oracle NoSQL Database Client (y-namiki) -- gh-64 Mavenisation of YCSB with a (tar ball) distribution packager (hariprasad-k) -- gh-65 Patch for improving the MongoDB Client (singhsiddharth) - -0.1.3 - 10/26/10 - -= Voldemort binding (rsumbaly) -= HBase client improvements (ryanobjc) -= Fixes to Cassandra 0.7 binding (johanoskarsson, nickmbailey) -= Added an interface for exporting the measurements and a JSON implementation. It can write to both stdout and to a file (johanoskarsson) --Other minor fixes (brianfrankcooper) - -0.1.2 - 5/12/10 - -- MongoDB binding (ypai) -- Cassandra 0.7 binding (johanoskarsson) -- Simple command line interface (brianfrankcooper) -- Faster string generation (tlipcon) -- Avoid Bytes conversion in HBaseClient (tlipcon) - -0.1.1 - 4/25/10 - -- Compiles under 1.5 -- Fixes doc and HBaseClient bugs - -0.1.0 - 4/23/10 - -- Initial open source release diff --git a/README b/README deleted file mode 100644 index bbb54372b7c849352305b0398157b0c94caf975b..0000000000000000000000000000000000000000 --- a/README +++ /dev/null @@ -1,33 +0,0 @@ -Yahoo! Cloud System Benchmark (YCSB) -==================================== - -Links ------ -http://wiki.github.com/brianfrankcooper/YCSB/ -http://research.yahoo.com/Web_Information_Management/YCSB -ycsb-users@yahoogroups.com - -Getting Started ---------------- - -1. Download the latest release of YCSB: - - wget https://github.com/downloads/brianfrankcooper/YCSB/ycsb-0.1.4.tar.gz - tar xfvz ycsb-0.1.4 - cd ycsb-0.1.4 - -2. Set up a database to benchmark. There is a README file under each binding - directory. - -3. Run YCSB command. - - bin/ycsb load basic -P workloads/workloada - bin/ycsb run basic -P workloads/workloada - - Running the `ycsb` command without any argument will print the usage. - - See https://github.com/brianfrankcooper/YCSB/wiki/Running-a-Workload - for a detailed documentation on how to run a workload. - - See https://github.com/brianfrankcooper/YCSB/wiki/Core-Properties for - the list of available workload properties. diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..71510e8e21711c94914ceff12d390781ceabab77 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +<!-- +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. +--> + +Yahoo! Cloud System Benchmark (YCSB) +==================================== +[](https://travis-ci.org/brianfrankcooper/YCSB) + +Links +----- +http://wiki.github.com/brianfrankcooper/YCSB/ +http://research.yahoo.com/Web_Information_Management/YCSB/ +ycsb-users@yahoogroups.com + +Getting Started +--------------- + +1. Download the latest release of YCSB: + + ```sh + curl -O --location https://github.com/brianfrankcooper/YCSB/releases/download/0.4.0/ycsb-0.4.0.tar.gz + tar xfvz ycsb-0.4.0.tar.gz + cd ycsb-0.4.0 + ``` + +2. Set up a database to benchmark. There is a README file under each binding + directory. + +3. Run YCSB command. + + ```sh + bin/ycsb load basic -P workloads/workloada + bin/ycsb run basic -P workloads/workloada + ``` + + Running the `ycsb` command without any argument will print the usage. + + See https://github.com/brianfrankcooper/YCSB/wiki/Running-a-Workload + for a detailed documentation on how to run a workload. + + See https://github.com/brianfrankcooper/YCSB/wiki/Core-Properties for + the list of available workload properties. + +Building from source +-------------------- + +To build the full distribution, with all database bindings: + + mvn clean package + +To build a single database binding: + + mvn -pl com.yahoo.ycsb:mongodb-binding -am clean package diff --git a/accumulo/README.md b/accumulo/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e2555833ad1f8bd9e96529f8c057949b373a51be --- /dev/null +++ b/accumulo/README.md @@ -0,0 +1,101 @@ +<!-- +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. + +- `accumulo.PC_FLAG` + - Provides support for distributed clients using ZooKeeper to manage the Producers and Consumers. + - If not set then the YCSB client will perform all work locally. + - Allowed values are: + - `producer` + - `consumer` + - Not set + - Default value is not set. + +- `accumulo.PC_SERVER` + - The set of ZooKeeper servers to use for the prioducers and consumers to communicate. + - Should contain a comma separated list of of hostname or hostname:port values. + - No default value. + +- `accumulo.PC_ROOT_IN_ZK` + - The root node in the ZooKeepers for the producers and consumers to communicate. + - No default value. + diff --git a/accumulo/pom.xml b/accumulo/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..47e118f89e8a82a22893d6b74d21cad45e69d90c --- /dev/null +++ b/accumulo/pom.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (c) 2011 YCSB++ project, 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. +--> + +<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.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> + </parent> + <artifactId>accumulo-binding</artifactId> + <name>Accumulo DB Binding</name> + <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> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-core</artifactId> + <version>0.20.203.0</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</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> +</project> diff --git a/accumulo/src/main/conf/accumulo.properties b/accumulo/src/main/conf/accumulo.properties new file mode 100644 index 0000000000000000000000000000000000000000..191ad416d25b2b14531925c1b76a5ba4cbf6870a --- /dev/null +++ b/accumulo/src/main/conf/accumulo.properties @@ -0,0 +1,44 @@ +# Copyright 2014 Cloudera, Inc. or its affiliates. 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 Accumulo configuration properties +# +# You may either set properties here or via the command line. +# + +# This will influence the keys we write +accumulo.columnFamily=YCSB + +# This should be set based on your Accumulo cluster +#accumulo.instanceName=ExampleInstance + +# Comma separated list of host:port tuples for the ZooKeeper quorum used +# by your Accumulo cluster +#accumulo.zooKeepers=zoo1.example.com:2181,zoo2.example.com:2181,zoo3.example.com:2181 + +# This user will need permissions on the table YCSB works against +#accumulo.username=ycsb +#accumulo.password=protectyaneck + +# Controls how long our client writer will wait to buffer more data +# measured in milliseconds +accumulo.batchWriterMaxLatency=30000 + +# Controls how much data our client will attempt to buffer before sending +# measured in bytes +accumulo.batchWriterSize=100000 + +# Controls how many worker threads our client will use to parallelize writes +accumulo.batchWriterThreads=1 diff --git a/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java b/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java new file mode 100644 index 0000000000000000000000000000000000000000..79be7d9154a23b3e285599886cd9867410a6f0b9 --- /dev/null +++ b/accumulo/src/main/java/com/yahoo/ycsb/db/AccumuloClient.java @@ -0,0 +1,452 @@ +/** + * 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 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 org.apache.zookeeper.KeeperException; + +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; + +/** + * <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() + + private static final String PC_PRODUCER = "producer"; + private static final String PC_CONSUMER = "consumer"; + private String pcFlag = ""; + 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); + } + + pcFlag = getProperties().getProperty("accumulo.PC_FLAG", "none"); + if (pcFlag.equals(PC_PRODUCER) || pcFlag.equals(PC_CONSUMER)) { + System.out.println("*** YCSB Client is " + pcFlag); + 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 (pcFlag.equals(PC_CONSUMER)) { + hmKeyReads = new Hashtable<String, Long>(); + hmKeyNumReads = new Hashtable<String, Integer>(); + try { + keyNotification(null); + } catch (KeeperException e) { + throw new DBException(e); + } + } + } + + @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 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(table, bwc); + + // Create our scanners + singleScanner = connector.createScanner(table, Authorizations.EMPTY); + scanScanner = connector.createScanner(table, 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 (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 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); + // Distributed YCSB co-ordination: YCSB on a client produces the key + // to + // be stored in the shared queue in ZooKeeper. + if (pcFlag.equals(PC_PRODUCER)) { + if (r.nextFloat() < 0.01) { + keyNotification(key); + } + } + } catch (MutationsRejectedException e) { + System.err.println("Error performing update."); + e.printStackTrace(); + return Status.ERROR; + } catch (KeeperException e) { + System.err.println("Error notifying the Zookeeper Queue."); + 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); + } + + private void keyNotification(String key) throws KeeperException { + + if (pcFlag.equals(PC_PRODUCER)) { + try { + q.produce(key); + } catch (InterruptedException e) { + // Reset the interrupted state. + Thread.currentThread().interrupt(); + } + } 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) + && !hmKeyNumReads.containsKey(strKey)) { + 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 usertable = "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>(); + + read(usertable, 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 (InterruptedException e) { + // Reset the interrupted state. + Thread.currentThread().interrupt(); + } + } + } + + } + + public Status presplit(String t, String[] keys) + throws TableNotFoundException, AccumuloException, + AccumuloSecurityException { + TreeSet<Text> splits = new TreeSet<Text>(); + for (int i = 0; i < keys.length; i++) { + splits.add(new Text(keys[i])); + } + connector.tableOperations().addSplits(t, splits); + return Status.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 new file mode 100644 index 0000000000000000000000000000000000000000..2d42c79a5b9f090307b9b674f80a147419958d07 --- /dev/null +++ b/accumulo/src/main/java/com/yahoo/ycsb/db/ZKProducerConsumer.java @@ -0,0 +1,193 @@ +/** + * 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 (Producer/Consumer) Queue in ZooKeeper. + */ +public class ZKProducerConsumer implements Watcher { + + private static ZooKeeper zk = null; + private static Integer mutex; + + private String root; + + /** + * Constructor that takes the address of the ZK server. + * + * @param address + * The 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); + } + + public synchronized void process(WatchedEvent event) { + synchronized (mutex) { + // System.out.println("Process: " + event.getType()); + mutex.notify(); + } + } + + /** + * Returns the root. + * + * @return The root. + */ + protected String getRoot() { + return root; + } + + /** + * Sets the root. + * + * @param r + * The root value. + */ + protected void setRoot(String r) { + this.root = r; + } + + /** + * QueueElement a single queue element. No longer used. + * @deprecated No longer used. + */ + @Deprecated + public static class QueueElement { + private String key; + private long writeTime; + + QueueElement(String key, long writeTime) { + this.key = key; + this.writeTime = writeTime; + } + } + + /** + * Producer-Consumer queue. + */ + public static class Queue extends ZKProducerConsumer { + + /** + * Constructor of producer-consumer queue. + * + * @param address + * The Zookeeper server address. + * @param name + * The name of the root element for the queue. + */ + Queue(String address, String name) { + super(address); + this.setRoot(name); + // Create ZK node name + if (zk != null) { + try { + Stat s = zk.exists(getRoot(), false); + if (s == null) { + zk.create(getRoot(), 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. + * + * @param key + * The key to produce (add to the queue). + * @return True if the key was added. + * @throws KeeperException + * On a failure talking to zookeeper. + * @throws InterruptedException + * If the current thread is interrupted waiting for the zookeeper + * acknowledgement. + */ + // + boolean produce(String key) throws KeeperException, InterruptedException { + byte[] value; + value = key.getBytes(); + zk.create(getRoot() + "/key", value, Ids.OPEN_ACL_UNSAFE, + CreateMode.PERSISTENT_SEQUENTIAL); + + return true; + } + + /** + * Consumer calls this method to "wait" for the key to the available. + * + * @return The key to consumed (remove from the queue). + * @throws KeeperException + * On a failure talking to zookeeper. + * @throws InterruptedException + * If the current thread is interrupted waiting for the zookeeper + * acknowledgement. + */ + 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(getRoot(), true); + if (list.size() == 0) { + System.out.println("Going to wait"); + mutex.wait(); + } else { + String path = getRoot() + "/" + 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/package-info.java b/accumulo/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..fbd7cf857468aa2e1dc5532b10ddd927e26432f2 --- /dev/null +++ b/accumulo/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="https://accumulo.apache.org/">Accumulo</a>. + */ +package com.yahoo.ycsb.db; \ No newline at end of file diff --git a/aerospike/README.md b/aerospike/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c5bb13ef820fe7881d9e5b45c5609b8d6be0f03e --- /dev/null +++ b/aerospike/README.md @@ -0,0 +1,58 @@ +<!-- +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 Aerospike. + +### 1. Start Aerospike + +### 2. Install Java and Maven + +### 3. 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 + +### 4. Provide Aerospike Connection Parameters + +The following connection parameters are available. + + * `as.host` - The Aerospike cluster to connect to (default: `localhost`) + * `as.port` - The port to connect to (default: `3000`) + * `as.user` - The user to connect as (no default) + * `as.password` - The password for the user (no default) + * `as.timeout` - The transaction and connection timeout (in ms, default: `10000`) + * `as.namespace` - The namespace to be used for the benchmark (default: `ycsb`) + +Add them to the workload or set them with the shell command, as in: + + ./bin/ycsb load aerospike -s -P workloads/workloada -p as.timeout=5000 >outputLoad.txt + +### 5. Load Data and Run Tests + +Load the data: + + ./bin/ycsb load aerospike -s -P workloads/workloada >outputLoad.txt + +Run the workload test: + + ./bin/ycsb run aerospike -s -P workloads/workloada >outputRun.txt + diff --git a/aerospike/pom.xml b/aerospike/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..aec17b011068ec49c7b82d7317f79be4040f759e --- /dev/null +++ b/aerospike/pom.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> + +<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.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> + </parent> + + <artifactId>aerospike-binding</artifactId> + <name>Aerospike DB Binding</name> + <packaging>jar</packaging> + + <dependencies> + <dependency> + <groupId>com.aerospike</groupId> + <artifactId>aerospike-client</artifactId> + <version>${aerospike.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</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> +</project> diff --git a/aerospike/src/main/java/com/yahoo/ycsb/db/AerospikeClient.java b/aerospike/src/main/java/com/yahoo/ycsb/db/AerospikeClient.java new file mode 100644 index 0000000000000000000000000000000000000000..5aa80e46cfc9dfcb7de2ed6ff9d4e1589c759c08 --- /dev/null +++ b/aerospike/src/main/java/com/yahoo/ycsb/db/AerospikeClient.java @@ -0,0 +1,183 @@ +/** + * 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.aerospike.client.AerospikeException; +import com.aerospike.client.Bin; +import com.aerospike.client.Key; +import com.aerospike.client.Record; +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; + +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 String namespace = null; + + private com.aerospike.client.AerospikeClient client = null; + + private Policy readPolicy = new Policy(); + private WritePolicy insertPolicy = new WritePolicy(); + private WritePolicy updatePolicy = new WritePolicy(); + private WritePolicy deletePolicy = new WritePolicy(); + + @Override + public void init() throws DBException { + insertPolicy.recordExistsAction = RecordExistsAction.CREATE_ONLY; + updatePolicy.recordExistsAction = RecordExistsAction.UPDATE_ONLY; + + Properties props = getProperties(); + + namespace = props.getProperty("as.namespace", DEFAULT_NAMESPACE); + + String host = props.getProperty("as.host", DEFAULT_HOST); + String user = props.getProperty("as.user"); + String password = props.getProperty("as.password"); + int port = Integer.parseInt(props.getProperty("as.port", DEFAULT_PORT)); + int timeout = Integer.parseInt(props.getProperty("as.timeout", + DEFAULT_TIMEOUT)); + + readPolicy.timeout = timeout; + insertPolicy.timeout = timeout; + updatePolicy.timeout = timeout; + deletePolicy.timeout = timeout; + + ClientPolicy clientPolicy = new ClientPolicy(); + + if (user != null && password != null) { + clientPolicy.user = user; + clientPolicy.password = password; + } + + try { + client = + new com.aerospike.client.AerospikeClient(clientPolicy, host, port); + } catch (AerospikeException e) { + throw new DBException(String.format("Error while creating Aerospike " + + "client for %s:%d.", host, port), e); + } + } + + @Override + public void cleanup() throws DBException { + client.close(); + } + + @Override + public Status read(String table, String key, Set<String> fields, + HashMap<String, ByteIterator> result) { + try { + Record record; + + if (fields != null) { + record = client.get(readPolicy, new Key(namespace, table, key), + fields.toArray(new String[fields.size()])); + } else { + record = client.get(readPolicy, new Key(namespace, table, key)); + } + + if (record == null) { + System.err.println("Record key " + key + " not found (read)"); + return Status.ERROR; + } + + for (Map.Entry<String, Object> entry: record.bins.entrySet()) { + result.put(entry.getKey(), + new ByteArrayByteIterator((byte[])entry.getValue())); + } + + return Status.OK; + } catch (AerospikeException e) { + System.err.println("Error while reading key " + key + ": " + e); + return Status.ERROR; + } + } + + @Override + public Status scan(String table, String start, int count, Set<String> fields, + Vector<HashMap<String, ByteIterator>> result) { + System.err.println("Scan not implemented"); + return Status.ERROR; + } + + private Status write(String table, String key, WritePolicy writePolicy, + HashMap<String, ByteIterator> values) { + Bin[] bins = new Bin[values.size()]; + int index = 0; + + for (Map.Entry<String, ByteIterator> entry: values.entrySet()) { + bins[index] = new Bin(entry.getKey(), entry.getValue().toArray()); + ++index; + } + + Key keyObj = new Key(namespace, table, key); + + try { + client.put(writePolicy, keyObj, bins); + return Status.OK; + } catch (AerospikeException e) { + System.err.println("Error while writing key " + key + ": " + e); + return Status.ERROR; + } + } + + @Override + public Status update(String table, String key, + HashMap<String, ByteIterator> values) { + return write(table, key, updatePolicy, values); + } + + @Override + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + return write(table, key, insertPolicy, values); + } + + @Override + public Status delete(String table, String key) { + try { + if (!client.delete(deletePolicy, new Key(namespace, table, key))) { + System.err.println("Record key " + key + " not found (delete)"); + return Status.ERROR; + } + + return Status.OK; + } catch (AerospikeException e) { + System.err.println("Error while deleting key " + key + ": " + e); + 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 a819be8bc38c7fac843f75e46020c4d48852c17f..54dcfbbdc77cf566f6e68f48e84f575afb1fd632 100755 --- a/bin/ycsb +++ b/bin/ycsb @@ -1,6 +1,26 @@ #!/usr/bin/env python +# +# 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. +# +import argparse +import fnmatch +import io import os +import shlex import sys import subprocess @@ -24,91 +44,189 @@ COMMANDS = { } DATABASES = { + "accumulo" : "com.yahoo.ycsb.db.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", "gemfire" : "com.yahoo.ycsb.db.GemFireClient", - "hbase" : "com.yahoo.ycsb.db.HBaseClient", + "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", "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", - "voldemort" : "com.yahoo.ycsb.db.VoldemortClient", + "redis" : "com.yahoo.ycsb.db.RedisClient", + "tarantool" : "com.yahoo.ycsb.db.TarantoolClient", + "voldemort" : "com.yahoo.ycsb.db.VoldemortClient" } OPTIONS = { - "-P file" : "Specify workload file", - "-p key=value" : "Override workload property", - "-s" : "Print status to stderr", - "-target n" : "Target ops/sec (default: unthrottled)", - "-threads n" : "Number of client threads (default: 1)", + "-P file" : "Specify workload file", + "-p key=value" : "Override workload property", + "-s" : "Print status to stderr", + "-target n" : "Target ops/sec (default: unthrottled)", + "-threads n" : "Number of client threads (default: 1)", + "-cp path" : "Additional Java classpath entries", + "-jvm-args args" : "Additional arguments to the JVM", } def usage(): - print "Usage: %s command database [options]" % sys.argv[0] + output = io.BytesIO() + print >> output, "%s command database [options]" % sys.argv[0] - print "\nCommands:" + print >> output, "\nCommands:" for command in sorted(COMMANDS.keys()): - print " %s %s" % (command.ljust(13), COMMANDS[command]["description"]) + print >> output, " %s %s" % (command.ljust(14), + COMMANDS[command]["description"]) - print "\nDatabases:" + print >> output, "\nDatabases:" for db in sorted(DATABASES.keys()): - print " %s %s" % (db.ljust(13), BASE_URL + db.split("-")[0]) + print >> output, " %s %s" % (db.ljust(14), BASE_URL + + db.split("-")[0]) - print "\nOptions:" + print >> output, "\nOptions:" for option in sorted(OPTIONS.keys()): - print " %s %s" % (option.ljust(13), OPTIONS[option]) + print >> output, " %s %s" % (option.ljust(14), OPTIONS[option]) - print """\nWorkload Files: + print >> output, """\nWorkload Files: There are various predefined workloads under workloads/ directory. See https://github.com/brianfrankcooper/YCSB/wiki/Core-Properties for the list of workload properties.""" - sys.exit(1) + return output.getvalue() -def find_jars(dir, database): +def debug(message): + print >> sys.stderr, "[DEBUG] ", message + +def warn(message): + print >> sys.stderr, "[WARN] ", message + +def error(message): + print >> sys.stderr, "[ERROR] ", message + +def find_jars(dir, glob='*.jar'): jars = [] for (dirpath, dirnames, filenames) in os.walk(dir): - if dirpath.endswith("conf"): - jars.append(dirpath) - for filename in filenames: - if filename.endswith(".jar") and \ - (filename.startswith("core") or \ - filename.startswith(database.split("-")[0]) or \ - not "binding" in filename): - jars.append(os.path.join(dirpath, filename)) + for filename in fnmatch.filter(filenames, glob): + jars.append(os.path.join(dirpath, filename)) return jars + def get_ycsb_home(): dir = os.path.abspath(os.path.dirname(sys.argv[0])) - while "CHANGELOG" not in os.listdir(dir): + while "LICENSE.txt" not in os.listdir(dir): dir = os.path.join(dir, os.path.pardir) return os.path.abspath(dir) -if len(sys.argv) < 3: - usage() -if sys.argv[1] not in COMMANDS: - print "ERROR: Command '%s' not found" % sys.argv[1] - usage() -if sys.argv[2] not in DATABASES: - print "ERROR: Database '%s' not found" % sys.argv[2] - usage() - -ycsb_home = get_ycsb_home() -command = COMMANDS[sys.argv[1]]["command"] -database = sys.argv[2] -db_classname = DATABASES[database] -options = sys.argv[3:] - -ycsb_command = ["java", "-cp", ":".join(find_jars(ycsb_home, database)), \ - COMMANDS[sys.argv[1]]["main"], "-db", db_classname] + options -if command: - ycsb_command.append(command) -print " ".join(ycsb_command) -subprocess.call(ycsb_command) +def is_distribution(): + # If there's a top level pom, we're a source checkout. otherwise a dist artifact + return "pom.xml" not in os.listdir(get_ycsb_home()) + +# Run the maven dependency plugin to get the local jar paths. +# 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 +# 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:" + module + " -am package -DskipTests " + "dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true'") + mvn_output = subprocess.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:] + return line[0][len("classpath="):] + except subprocess.CalledProcessError, err: + error("Attempting to generate a classpath from Maven failed " + "with return code '" + str(err.returncode) + "'. The output from " + "Maven follows, try running " + "'mvn -DskipTests package dependency:build=classpath' on your " + "own and correct errors." + os.linesep + os.linesep + "mvn output:" + os.linesep + + err.output) + sys.exit(err.returncode) + +def main(): + p = argparse.ArgumentParser( + usage=usage(), + formatter_class=argparse.RawDescriptionHelpFormatter) + p.add_argument('-cp', dest='classpath', help="""Additional classpath + entries, e.g. '-cp /tmp/hbase-1.0.1.1/conf'. Will be + prepended to the YCSB classpath.""") + p.add_argument("-jvm-args", default=[], type=shlex.split, + help="""Additional arguments to pass to 'java', e.g. + '-Xmx4g'""") + p.add_argument("command", choices=sorted(COMMANDS), + help="""Command to run.""") + p.add_argument("database", choices=sorted(DATABASES), + help="""Database to test.""") + args, remaining = p.parse_known_args() + ycsb_home = get_ycsb_home() + + # Use JAVA_HOME to find java binary if set, otherwise just use PATH. + java = "java" + java_home = os.getenv("JAVA_HOME") + if java_home: + java = os.path.join(java_home, "bin", "java") + db_classname = DATABASES[args.database] + command = COMMANDS[args.command]["command"] + main_classname = COMMANDS[args.command]["main"] + + # Classpath set up + binding = args.database.split("-")[0] + if is_distribution(): + db_dir = os.path.join(ycsb_home, binding + "-binding") + # include top-level conf for when we're a binding-specific artifact. + # If we add top-level conf to the general artifact, starting here + # will allow binding-specific conf to override (because it's prepended) + cp = [os.path.join(ycsb_home, "conf")] + cp.extend(find_jars(os.path.join(ycsb_home, "lib"))) + cp.extend(find_jars(os.path.join(db_dir, "lib"))) + else: + 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_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(project) + # TODO when we have a version property, skip the glob + cp = find_jars(os.path.join(db_dir, "target"), + project + "*.jar") + # alredy in jar:jar:jar form + cp.append(maven_says) + cp.insert(0, os.path.join(db_dir, "conf")) + classpath = os.pathsep.join(cp) + if args.classpath: + classpath = os.pathsep.join([args.classpath, classpath]) + + ycsb_command = ([java] + args.jvm_args + + ["-cp", classpath, + main_classname, "-db", db_classname] + remaining) + if command: + ycsb_command.append(command) + print >> sys.stderr, " ".join(ycsb_command) + return subprocess.call(ycsb_command) + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/bin/ycsb.sh b/bin/ycsb.sh deleted file mode 100755 index 697ec7ddfc3fed388cf333488733f818e83d4fce..0000000000000000000000000000000000000000 --- a/bin/ycsb.sh +++ /dev/null @@ -1,125 +0,0 @@ -#! /usr/bin/env bash - -# Set the YCSB specific environment. Adds all the required libraries to the class path. - -# 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. -# - -# The Java implementation to use. This is required. -#export JAVA_HOME= - -# Any JVM options to pass. -#export YCSB_OPTS="-Djava.compiler=NONE" - -# YCSB client heap size. -#export YCSB_HEAP_SIZE=500 - -this=`dirname "$0"` -this=`cd "$this"; pwd` - -while [ -h "$this" ]; do - ls=`ls -ld "$this"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '.*/.*' > /dev/null; then - this="$link" - else - this=`dirname "$this"`/"$link" - fi -done - -bin=`dirname "$this"` -script=`basename "$this"` -bin=`cd "$bin"; pwd` -this="$bin/$script" - -# the root of the Hadoop installation -export YCSB_HOME=`dirname "$this"` - -echo "YCSB_HOME $YCSB_HOME" - -cygwin=false -case "`uname`" in -CYGWIN*) cygwin=true;; -esac - -# if no args specified, show usage -if [ $# = 0 ]; then - echo "Usage: ycsb CLASSNAME" - echo "where CLASSNAME is the name of the class to run" - echo "The jar file for the class must be in bin, build, lib, or db/*/lib." - exit 1 -fi - -# get arguments -COMMAND=$1 -shift - -JAVA="" -if [ "$JAVA_HOME" != "" ]; then - JAVA=$JAVA_HOME/bin/java -else - echo "JAVA_HOME must be set." - exit 1 -fi - -JAVA_HEAP_MAX=-Xmx500m -# check envvars which might override default args -if [ "$YCSB_HEAP_SIZE" != "" ]; then - JAVA_HEAP_MAX="-Xmx""$YCSB_HEAP_SIZE""m" -fi - -# Set the classpath. - -if [ "$CLASSPATH" != "" ]; then - CLASSPATH=${CLASSPATH}:$JAVA_HOME/lib/tools.jar -else - CLASSPATH=$JAVA_HOME/lib/tools.jar -fi - -# so that filenames w/ spaces are handled correctly in loops below -IFS= - -for f in $YCSB_HOME/build/*.jar; do - CLASSPATH=${CLASSPATH}:$f -done - -for f in $YCSB_HOME/lib/*.jar; do - CLASSPATH=${CLASSPATH}:$f -done - -for f in $YCSB_HOME/db/*; do - if [ -d $f ]; then - for j in $f/lib/*.jar; do - CLASSPATH=${CLASSPATH}:$j - done - fi -done - -#echo "CLASSPATH=$CLASSPATH" - -# restore ordinary behavior -unset IFS - -CLASS=$COMMAND - -# cygwin path translation -if $cygwin; then - CLASSPATH=`cygpath -p -w "$CLASSPATH"` - YCSB_HOME=`cygpath -w "$YCSB_HOME"` -fi - -#echo "Executing command $CLASS with options $JAVA_HEAP_MAX $YCSB_OPTS $CLASS $@" -exec "$JAVA" $JAVA_HEAP_MAX $YCSB_OPTS -classpath "$CLASSPATH" $CLASS "$@" diff --git a/binding-parent/datastore-specific-descriptor/pom.xml b/binding-parent/datastore-specific-descriptor/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..e3a11a6a8056920fccf825debe11b4ac48cac281 --- /dev/null +++ b/binding-parent/datastore-specific-descriptor/pom.xml @@ -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. +--> + +<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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>root</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../../</relativePath> + </parent> + + <artifactId>datastore-specific-descriptor</artifactId> + <name>Per Datastore Binding descriptor</name> + <packaging>jar</packaging> + + <description> + This module contains the assembly descriptor used by the individual components + to build binding-specific distributions. + </description> + <dependencies> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> +</project> + diff --git a/binding-parent/datastore-specific-descriptor/src/main/resources/assemblies/datastore-specific-assembly.xml b/binding-parent/datastore-specific-descriptor/src/main/resources/assemblies/datastore-specific-assembly.xml new file mode 100644 index 0000000000000000000000000000000000000000..5783421c2d708354f8585cdea1cd07b9a9d30b4b --- /dev/null +++ b/binding-parent/datastore-specific-descriptor/src/main/resources/assemblies/datastore-specific-assembly.xml @@ -0,0 +1,77 @@ +<!-- +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. +--> + +<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + <id>dist</id> + <includeBaseDirectory>true</includeBaseDirectory> + <baseDirectory>ycsb-${artifactId}-${version}</baseDirectory> + <files> + <file> + <source>README.md</source> + <outputDirectory></outputDirectory> + </file> + </files> + <fileSets> + <fileSet> + <directory>..</directory> + <outputDirectory></outputDirectory> + <fileMode>0644</fileMode> + <includes> + <include>LICENSE.txt</include> + <include>NOTICE.txt</include> + </includes> + </fileSet> + <fileSet> + <directory>../bin</directory> + <outputDirectory>bin</outputDirectory> + <fileMode>0755</fileMode> + <includes> + <include>ycsb</include> + </includes> + </fileSet> + <fileSet> + <directory>../workloads</directory> + <outputDirectory>workloads</outputDirectory> + <fileMode>0644</fileMode> + </fileSet> + <fileSet> + <directory>src/main/conf</directory> + <outputDirectory>conf</outputDirectory> + <fileMode>0644</fileMode> + </fileSet> + </fileSets> + <dependencySets> + <dependencySet> + <outputDirectory>lib</outputDirectory> + <includes> + <include>com.yahoo.ycsb:core</include> + </includes> + <scope>provided</scope> + <useTransitiveFiltering>true</useTransitiveFiltering> + </dependencySet> + <dependencySet> + <outputDirectory>lib</outputDirectory> + <includes> + <include>*:jar:*</include> + </includes> + <excludes> + <exclude>*:sources</exclude> + </excludes> + </dependencySet> + </dependencySets> +</assembly> diff --git a/binding-parent/pom.xml b/binding-parent/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..83d826934a0e986880dd9c055195063844831ec4 --- /dev/null +++ b/binding-parent/pom.xml @@ -0,0 +1,120 @@ +<!-- +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. +--> + +<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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>root</artifactId> + <version>0.6.0-SNAPSHOT</version> + </parent> + + <artifactId>binding-parent</artifactId> + <name>YCSB Datastore Binding Parent</name> + <packaging>pom</packaging> + + <description> + This module acts as the parent for new datastore bindings. + It creates a datastore specific binary artifact. + </description> + + <modules> + <module>datastore-specific-descriptor</module> + </modules> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <version>${maven.assembly.version}</version> + <dependencies> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>datastore-specific-descriptor</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + <configuration> + <descriptorRefs> + <descriptorRef>datastore-specific-assembly</descriptorRef> + </descriptorRefs> + <finalName>ycsb-${project.artifactId}-${project.version}</finalName> + <formats> + <format>tar.gz</format> + </formats> + <appendAssemblyId>false</appendAssemblyId> + <tarLongFileMode>posix</tarLongFileMode> + </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>${maven.dependency.version}</version> + </plugin> + </plugins> + </pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>stage-dependencies</id> + <phase>package</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <includeScope>runtime</includeScope> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + <profiles> + <!-- If the binding defines a README, presume we should make an assembly. --> + <profile> + <id>datastore-binding</id> + <activation> + <file> + <exists>README.md</exists> + </file> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> +</project> + diff --git a/cassandra/README.md b/cassandra/README.md new file mode 100644 index 0000000000000000000000000000000000000000..11853f97d4031187931bd77c6669cf54cf1f6be3 --- /dev/null +++ b/cassandra/README.md @@ -0,0 +1,65 @@ +<!-- +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. +--> + +# 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 7a01fb8f4d2e7a98fcd553ca9a070d51a9e065a3..420efabd4b0acfdaf5c145a6982c722456295944 100644 --- a/cassandra/pom.xml +++ b/cassandra/pom.xml @@ -1,10 +1,28 @@ <?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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> <artifactId>cassandra-binding</artifactId> @@ -17,35 +35,41 @@ <artifactId>cassandra-all</artifactId> <version>${cassandra.version}</version> </dependency> + <!-- CQL driver --> + <dependency> + <groupId>com.datastax.cassandra</groupId> + <artifactId>cassandra-driver-core</artifactId> + <version>${cassandra.cql.version}</version> + </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> <artifactId>core</artifactId> <version>${project.version}</version> + <scope>provided</scope> </dependency> </dependencies> - <build> <plugins> - <plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>${maven.assembly.version}</version> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.15</version> <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - <appendAssemblyId>false</appendAssemblyId> + <consoleOutput>true</consoleOutput> + <configLocation>../checkstyle.xml</configLocation> + <failOnViolation>true</failOnViolation> + <failsOnError>true</failsOnError> </configuration> <executions> <execution> - <phase>package</phase> + <id>validate</id> + <phase>validate</phase> <goals> - <goal>single</goal> + <goal>checkstyle</goal> </goals> </execution> </executions> </plugin> </plugins> </build> - </project> diff --git a/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java b/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java new file mode 100755 index 0000000000000000000000000000000000000000..29f9a33f974efcd73866641332c268d0280640f2 --- /dev/null +++ b/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java @@ -0,0 +1,435 @@ +/** + * Copyright (c) 2013 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. + * + * Submitted by Chrisjan Matser on 10/11/2010. + */ +package com.yahoo.ycsb.db; + +import com.datastax.driver.core.*; +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.*; +import java.nio.ByteBuffer; + +import java.util.Map; +import java.util.Set; +import java.util.HashMap; +import java.util.Vector; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * Tested with Cassandra 2.0, CQL client for YCSB framework + * + * 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 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)); + } + + 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 + } + + /** + * 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(); + } + } + + /** + * 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); + } + } + + } + + 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()); + } + + ResultSet rs = 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/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient10.java b/cassandra/src/main/java/com/yahoo/ycsb/db/CassandraClient10.java index c5d1a20c4b98ba5a1b13f794abd4153e14c968c0..8253ad2a8df4850d9fbdccd547692532881231f7 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, 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()) - { + for (String s : result.keySet()) { System.out.println("[" + s + "]=[" + result.get(s) + "]"); } 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 c5a39692b9d37216ad46e24afbb02125b8cca533..4af8c35f1070bcce587ea72bbaae1be292c41e48 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,69 +404,64 @@ 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())); + col.setTimestamp(System.currentTimeMillis()); + column = new ColumnOrSuperColumn(); - column.setColumn( new Column( ByteBuffer.wrap(entry.getKey().getBytes("UTF-8")), - ByteBuffer.wrap(entry.getValue().toArray()), - System.currentTimeMillis()) ); - + 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; } /** @@ -478,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(); @@ -534,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); } @@ -547,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>(); @@ -556,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("Result of read: " + res.getName()); + for (String s : result.keySet()) { System.out.println("[" + s + "]=[" + result.get(s) + "]"); } 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..5aafff511775925562e6869195342a2ca05d1c78 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()) - { + for (String s : result.keySet()) { System.out.println("[" + s + "]=[" + result.get(s) + "]"); } 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..e3e56b90c7cfbbe2d11c2efcaf5cb277af00bdb8 --- /dev/null +++ b/cassandra2/README.md @@ -0,0 +1,73 @@ +<!-- +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. diff --git a/cassandra2/pom.xml b/cassandra2/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..f55a536b6eaa170070220d2b387897d94841ceae --- /dev/null +++ b/cassandra2/pom.xml @@ -0,0 +1,84 @@ +<?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.6.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> + <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> +</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..9f093daf89aa9d2d27f6fce34eeaadb87f01467a --- /dev/null +++ b/cassandra2/src/main/java/com/yahoo/ycsb/db/CassandraCQLClient.java @@ -0,0 +1,459 @@ +/** + * 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 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)); + } + + 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.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).enableTracing(); + + if (debug) { + System.out.println(insertStmt.toString()); + } + + ResultSet rs = 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()); + } + + ResultSet rs = 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 5b25fe2cb5aca5cf53407c195307c82f6af0e911..029f0abd12c93d036a7b255a865101f5a1fd848d 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -1,4 +1,21 @@ <?xml version="1.0"?> +<!-- +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. +--> + <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> @@ -134,7 +151,6 @@ <!-- Checks for common coding problems --> <!-- See http://checkstyle.sf.net/config_coding.html --> <!-- module name="AvoidInlineConditionals"/--> - <module name="DoubleCheckedLocking"/> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> <module name="HiddenField"> diff --git a/core/CHANGES.md b/core/CHANGES.md new file mode 100644 index 0000000000000000000000000000000000000000..05a4b38e13227d240bff7c647fc7a97e75fbc9cd --- /dev/null +++ b/core/CHANGES.md @@ -0,0 +1,84 @@ +<!-- +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. +--> + +When used as a latency under load benchmark YCSB in it's original form suffers from +Coordinated Omission[1] and related measurement issue: + +* Load is controlled by response time +* Measurement does not account for missing time +* Measurement starts at beginning of request rather than at intended beginning +* Measurement is limited in scope as the histogram does not provide data on overflow values + +To provide a minimal correction patch the following were implemented: + +1. Replace internal histogram implementation with HdrHistogram[2]: +HdrHistogram offers a dynamic range of measurement at a given precision and will +improve the fidelity of reporting. It allows capturing a much wider range of latencies. +HdrHistogram also supports compressed loss-less serialization which enable capturing +snapshot histograms from which lower resolution histograms can be constructed for plotting +latency over time. Snapshot interval histograms are serialized on status reporting which +must be enabled using the '-s' option. + +2. Track intended operation start and report latencies from that point in time: +Assuming the benchmark sets a target schedule of execution in which every operation +is supposed to happen at a given time the benchmark should measure the latency between +intended start time and operation completion. +This required the introduction of a new measurement point and inevitably +includes measuring some of the internal preparation steps of the load generator. +These overhead should be negligible in the context of a network hop, but could +be corrected for by estimating the load-generator overheads (e.g. by measuring a +no-op DB or by measuring the setup time for an operation and deducting that from total). +This intended measurement point is only used when there is a target load (specified by +the -target paramaeter) + +This branch supports the following new options: + +* -p measurementtype=[histogram|hdrhistogram|hdrhistogram+histogram|timeseries] (default=histogram) +The new measurement types are hdrhistogram and hdrhistogram+histogram. Default is still +histogram, which is the old histogram. Ultimately we would remove the old measurement types +and use only HdrHistogram but the old measurement is left in there for comparison sake. + +* -p measurement.interval=[op|intended|both] (default=op) +This new option deferentiates between measured intervals and adds the intended interval(as described) +above, and the option to record both the op and intended for comparison. + +* -p hdrhistogram.fileoutput=[true|false] (default=false) +This new option will enable periodical writes of the interval histogram into an output file. The path can be set using '-p hdrhistogram.output.path=<PATH>'. + +Example parameters: +-target 1000 -s -p workload=com.yahoo.ycsb.workloads.CoreWorkload -p basicdb.verbose=false -p basicdb.simulatedelay=4 -p measurement.interval=both -p measurementtype=hdrhistogram -p hdrhistogram.fileoutput=true -p maxexecutiontime=60 + +Further changes made: + +* -p status.interval=<number of seconds> (default=10) +Controls the number of seconds between status reports and therefore between HdrHistogram snapshots reported. + +* -p basicdb.randomizedelay=[true|false] (default=true) +Controls weather the delay simulated by the mock DB is uniformly random or not. + +Further suggestions: + +1. Correction load control: currently after a pause the load generator will do +operations back to back to catchup, this leads to a flat out throughput mode +of testing as opposed to controlled load. + +2. Move to async model: Scenarios where Ops have no dependency could delegate the +Op execution to a threadpool and thus separate the request rate control from the +synchronous execution of Ops. Measurement would start on queuing for execution. + +1. https://groups.google.com/forum/#!msg/mechanical-sympathy/icNZJejUHfE/BfDekfBEs_sJ +2. https://github.com/HdrHistogram/HdrHistogram \ No newline at end of file diff --git a/core/pom.xml b/core/pom.xml index 86f1f88cc12c45fb02bfad3c5dd36e3b4b5a2851..5e737b1ac4d16464c683bba7e4a81970ec8b8e94 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -1,10 +1,27 @@ <?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>root</artifactId> - <version>0.1.4</version> + <version>0.6.0-SNAPSHOT</version> </parent> <artifactId>core</artifactId> @@ -32,6 +49,33 @@ <version>6.1.1</version> <scope>test</scope> </dependency> - </dependencies> - + <dependency> + <groupId>org.hdrhistogram</groupId> + <artifactId>HdrHistogram</artifactId> + <version>2.1.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/core/src/main/java/com/yahoo/ycsb/BasicDB.java b/core/src/main/java/com/yahoo/ycsb/BasicDB.java index 9490451eff7e3be3d22ad30cbb1392d0712d8d6d..dc34500a2117263c72bc40208e01a8eba6cdba8d 100644 --- a/core/src/main/java/com/yahoo/ycsb/BasicDB.java +++ b/core/src/main/java/com/yahoo/ycsb/BasicDB.java @@ -22,6 +22,8 @@ import java.util.Properties; import java.util.Set; import java.util.Enumeration; import java.util.Vector; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.LockSupport; /** @@ -32,11 +34,15 @@ public class BasicDB extends DB public static final String VERBOSE="basicdb.verbose"; public static final String VERBOSE_DEFAULT="true"; - public static final String SIMULATE_DELAY="basicdb.simulatedelay"; - public static final String SIMULATE_DELAY_DEFAULT="0"; + public static final String SIMULATE_DELAY="basicdb.simulatedelay"; + public static final String SIMULATE_DELAY_DEFAULT="0"; + + public static final String RANDOMIZE_DELAY="basicdb.randomizedelay"; + public static final String RANDOMIZE_DELAY_DEFAULT="true"; + - - boolean verbose; + boolean verbose; + boolean randomizedelay; int todelay; public BasicDB() @@ -49,14 +55,22 @@ public class BasicDB extends DB { if (todelay>0) { - try - { - Thread.sleep((long)Utils.random().nextInt(todelay)); - } - catch (InterruptedException e) - { - //do nothing - } + long delayNs; + if (randomizedelay) { + delayNs = TimeUnit.MILLISECONDS.toNanos(Utils.random().nextInt(todelay)); + if (delayNs == 0) { + return; + } + } + else { + delayNs = TimeUnit.MILLISECONDS.toNanos(todelay); + } + + long now = System.nanoTime(); + final long deadline = now + delayNs; + do { + LockSupport.parkNanos(deadline - now); + } while ((now = System.nanoTime()) < deadline && !Thread.interrupted()); } } @@ -69,7 +83,7 @@ public class BasicDB extends DB { verbose=Boolean.parseBoolean(getProperties().getProperty(VERBOSE, VERBOSE_DEFAULT)); todelay=Integer.parseInt(getProperties().getProperty(SIMULATE_DELAY, SIMULATE_DELAY_DEFAULT)); - + randomizedelay=Boolean.parseBoolean(getProperties().getProperty(RANDOMIZE_DELAY, RANDOMIZE_DELAY_DEFAULT)); if (verbose) { System.out.println("***************** properties *****************"); @@ -95,7 +109,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(); @@ -117,7 +131,7 @@ public class BasicDB extends DB System.out.println("]"); } - return 0; + return Status.OK; } /** @@ -130,7 +144,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(); @@ -152,7 +166,7 @@ public class BasicDB extends DB System.out.println("]"); } - return 0; + return Status.OK; } /** @@ -164,7 +178,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(); @@ -181,7 +195,7 @@ public class BasicDB extends DB System.out.println("]"); } - return 0; + return Status.OK; } /** @@ -193,7 +207,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(); @@ -211,7 +225,7 @@ public class BasicDB extends DB System.out.println("]"); } - return 0; + return Status.OK; } @@ -222,7 +236,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(); @@ -231,7 +245,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/ByteIterator.java b/core/src/main/java/com/yahoo/ycsb/ByteIterator.java index 9bb3b63e36fcb6a95dbad08da0ea02cbf43f4005..568cdc1d69f4e4ea53b1fc24aea0071de580a9e6 100644 --- a/core/src/main/java/com/yahoo/ycsb/ByteIterator.java +++ b/core/src/main/java/com/yahoo/ycsb/ByteIterator.java @@ -16,8 +16,10 @@ */ package com.yahoo.ycsb; +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.Charset; import java.util.Iterator; -import java.util.ArrayList; /** * YCSB-specific buffer class. ByteIterators are designed to support * efficient field generation, and to allow backend drivers that can stream @@ -73,10 +75,11 @@ public abstract class ByteIterator implements Iterator<Byte> { /** Consumes remaining contents of this object, and returns them as a string. */ public String toString() { - StringBuilder sb = new StringBuilder(); - while(this.hasNext()) { sb.append((char)nextByte()); } - return sb.toString(); + Charset cset = Charset.forName("UTF-8"); + CharBuffer cb = cset.decode(ByteBuffer.wrap(this.toArray())); + return cb.toString(); } + /** Consumes remaining contents of this object, and returns them as a byte array. */ public byte[] toArray() { long left = bytesLeft(); diff --git a/core/src/main/java/com/yahoo/ycsb/Client.java b/core/src/main/java/com/yahoo/ycsb/Client.java index 64585f81a02276d04f0ba9142a9d7bf7375889f3..e1cd226f09470c986db75adcb01d85d09733a387 100644 --- a/core/src/main/java/com/yahoo/ycsb/Client.java +++ b/core/src/main/java/com/yahoo/ycsb/Client.java @@ -1,318 +1,410 @@ -/** - * 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.io.*; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; import java.text.DecimalFormat; -import java.util.*; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.Enumeration; +import java.util.List; +import java.util.Properties; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.LockSupport; import com.yahoo.ycsb.measurements.Measurements; import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; import com.yahoo.ycsb.measurements.exporter.TextMeasurementsExporter; -//import org.apache.log4j.BasicConfigurator; - /** * A thread to periodically show the status of the experiment, to reassure you that progress is being made. - * - * @author cooperb * + * @author cooperb */ class StatusThread extends Thread { - Vector<Thread> _threads; - String _label; - boolean _standardstatus; - - /** - * The interval for reporting status. - */ - public static final long sleeptime=10000; - - public StatusThread(Vector<Thread> threads, String label, boolean standardstatus) - { - _threads=threads; - _label=label; - _standardstatus=standardstatus; - } + /** Counts down each of the clients completing. */ + private final CountDownLatch _completeLatch; + + /** The clients that are running. */ + private final List<ClientThread> _clients; + + private final String _label; + private final boolean _standardstatus; + + /** The interval for reporting status. */ + private long _sleeptimeNs; + + /** + * Creates a new StatusThread. + * + * @param completeLatch The latch that each client thread will {@link CountDownLatch#countDown()} as they complete. + * @param clients The clients to collect metrics from. + * @param label The label for the status. + * @param standardstatus If true the status is printed to stdout in addition to stderr. + * @param statusIntervalSeconds The number of seconds between status updates. + */ + public StatusThread(CountDownLatch completeLatch, List<ClientThread> clients, + String label, boolean standardstatus, int statusIntervalSeconds) + { + _completeLatch=completeLatch; + _clients=clients; + _label=label; + _standardstatus=standardstatus; + _sleeptimeNs=TimeUnit.SECONDS.toNanos(statusIntervalSeconds); + } + + /** + * Run and periodically report status. + */ + @Override + public void run() + { + final long startTimeMs=System.currentTimeMillis(); + final long startTimeNanos = System.nanoTime(); + long deadline = startTimeNanos + _sleeptimeNs; + long startIntervalMs=startTimeMs; + long lastTotalOps=0; - /** - * Run and periodically report status. - */ - public void run() - { - long st=System.currentTimeMillis(); - - long lasten=st; - long lasttotalops=0; - - boolean alldone; - - do - { - alldone=true; - - int totalops=0; - - //terminate this thread when all the worker threads are done - for (Thread t : _threads) - { - if (t.getState()!=Thread.State.TERMINATED) - { - alldone=false; - } - - ClientThread ct=(ClientThread)t; - totalops+=ct.getOpsDone(); - } + boolean alldone; - long en=System.currentTimeMillis(); - - long interval=en-st; - //double throughput=1000.0*((double)totalops)/((double)interval); - - double curthroughput=1000.0*(((double)(totalops-lasttotalops))/((double)(en-lasten))); - - lasttotalops=totalops; - lasten=en; - - DecimalFormat d = new DecimalFormat("#.##"); - - if (totalops==0) - { - System.err.println(_label+" "+(interval/1000)+" sec: "+totalops+" operations; "+Measurements.getMeasurements().getSummary()); - } - else - { - System.err.println(_label+" "+(interval/1000)+" sec: "+totalops+" operations; "+d.format(curthroughput)+" current ops/sec; "+Measurements.getMeasurements().getSummary()); - } + do + { + long nowMs=System.currentTimeMillis(); - if (_standardstatus) - { - if (totalops==0) - { - System.out.println(_label+" "+(interval/1000)+" sec: "+totalops+" operations; "+Measurements.getMeasurements().getSummary()); - } - else - { - System.out.println(_label+" "+(interval/1000)+" sec: "+totalops+" operations; "+d.format(curthroughput)+" current ops/sec; "+Measurements.getMeasurements().getSummary()); - } - } + lastTotalOps = computeStats(startTimeMs, startIntervalMs, nowMs, lastTotalOps); - try - { - sleep(sleeptime); - } - catch (InterruptedException e) - { - //do nothing - } + alldone = waitForClientsUntil(deadline); + startIntervalMs=nowMs; + deadline+=_sleeptimeNs; + } + while (!alldone); + + // Print the final stats. + computeStats(startTimeMs, startIntervalMs, System.currentTimeMillis(), lastTotalOps); + } + + /** + * Computes and prints the stats. + * + * @param startTimeMs The start time of the test. + * @param startIntervalMs The start time of this interval. + * @param endIntervalMs The end time (now) for the interval. + * @param lastTotalOps The last total operations count. + * + * @return The current operation count. + */ + private long computeStats(final long startTimeMs, long startIntervalMs, long endIntervalMs, + long lastTotalOps) { + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS"); + + long totalops=0; + long todoops=0; + + // Calculate the total number of operations completed. + for (ClientThread t : _clients) + { + totalops+=t.getOpsDone(); + todoops+=t.getOpsTodo(); + } + + + long interval=endIntervalMs-startTimeMs; + double throughput=1000.0*(((double)totalops)/(double)interval); + double curthroughput=1000.0*(((double)(totalops-lastTotalOps))/((double)(endIntervalMs-startIntervalMs))); + long estremaining = (long) Math.ceil(todoops / throughput); + + + DecimalFormat d = new DecimalFormat("#.##"); + String label = _label + format.format(new Date()); + + StringBuilder msg = new StringBuilder(label).append(" ").append(interval/1000).append(" sec: "); + msg.append(totalops).append(" operations; "); + + if (totalops != 0) { + msg.append(d.format(curthroughput)).append(" current ops/sec; "); + } + if (todoops != 0) { + msg.append("est completion in ").append(RemainingFormatter.format(estremaining)); + } + + msg.append(Measurements.getMeasurements().getSummary()); + + System.err.println(msg); + + if (_standardstatus) { + System.out.println(msg); + } + return totalops; + } + + /** + * Waits for all of the client to finish or the deadline to expire. + * + * @param deadline The current deadline. + * + * @return True if all of the clients completed. + */ + private boolean waitForClientsUntil(long deadline) { + boolean alldone=false; + long now=System.nanoTime(); + + while( !alldone && now < deadline ) { + try { + alldone = _completeLatch.await(deadline-now, TimeUnit.NANOSECONDS); + } + catch( InterruptedException ie) { + // If we are interrupted the thread is being asked to shutdown. + // Return true to indicate that and reset the interrupt state + // of the thread. + Thread.currentThread().interrupt(); + alldone=true; + } + now=System.nanoTime(); + } + + return alldone; + } +} + +/** + * Turn seconds remaining into more useful units. + * i.e. if there are hours or days worth of seconds, use them. + */ +class RemainingFormatter { + public static StringBuilder format(long seconds) { + StringBuilder time = new StringBuilder(); + long days = TimeUnit.SECONDS.toDays(seconds); + if (days > 0) { + time.append(days).append(" days "); + seconds -= TimeUnit.DAYS.toSeconds(days); + } + long hours = TimeUnit.SECONDS.toHours(seconds); + if (hours > 0) { + time.append(hours).append(" hours "); + seconds -= TimeUnit.HOURS.toSeconds(hours); + } + /* Only include minute granularity if we're < 1 day. */ + if (days < 1) { + long minutes = TimeUnit.SECONDS.toMinutes(seconds); + if (minutes > 0) { + time.append(minutes).append(" minutes "); + seconds -= TimeUnit.MINUTES.toSeconds(seconds); + } } - while (!alldone); + /* Only bother to include seconds if we're < 1 minute */ + if (time.length() == 0) { + time.append(seconds).append(" seconds "); + } + return time; } } /** * A thread for executing transactions or data inserts to the database. - * + * * @author cooperb * */ class ClientThread extends Thread { - DB _db; - boolean _dotransactions; - Workload _workload; - int _opcount; - double _target; - - int _opsdone; - int _threadid; - int _threadcount; - Object _workloadstate; - Properties _props; - - - /** - * Constructor. - * - * @param db the DB implementation to use - * @param dotransactions true to do transactions, false to insert data - * @param workload the workload to use - * @param threadid the id of this thread - * @param threadcount the total number of threads - * @param props the properties defining the experiment - * @param opcount the number of operations (transactions or inserts) to do - * @param targetperthreadperms target number of operations per thread per ms - */ - public ClientThread(DB db, boolean dotransactions, Workload workload, int threadid, int threadcount, Properties props, int opcount, double targetperthreadperms) - { - //TODO: consider removing threadcount and threadid - _db=db; - _dotransactions=dotransactions; - _workload=workload; - _opcount=opcount; - _opsdone=0; - _target=targetperthreadperms; - _threadid=threadid; - _threadcount=threadcount; - _props=props; - //System.out.println("Interval = "+interval); - } - - public int getOpsDone() - { - return _opsdone; - } + /** Counts down each of the clients completing. */ + private final CountDownLatch _completeLatch; + + private static boolean _spinSleep; + DB _db; + boolean _dotransactions; + Workload _workload; + int _opcount; + double _targetOpsPerMs; + + int _opsdone; + int _threadid; + int _threadcount; + Object _workloadstate; + Properties _props; + long _targetOpsTickNs; + final Measurements _measurements; + + /** + * Constructor. + * + * @param db the DB implementation to use + * @param dotransactions true to do transactions, false to insert data + * @param workload the workload to use + * @param props the properties defining the experiment + * @param opcount the number of operations (transactions or inserts) to do + * @param targetperthreadperms target number of operations per thread per ms + * @param completeLatch The latch tracking the completion of all clients. + */ + public ClientThread(DB db, boolean dotransactions, Workload workload, Properties props, int opcount, double targetperthreadperms, CountDownLatch completeLatch) + { + _db=db; + _dotransactions=dotransactions; + _workload=workload; + _opcount=opcount; + _opsdone=0; + if(targetperthreadperms > 0){ + _targetOpsPerMs=targetperthreadperms; + _targetOpsTickNs=(long)(1000000/_targetOpsPerMs); + } + _props=props; + _measurements = Measurements.getMeasurements(); + _spinSleep = Boolean.valueOf(_props.getProperty("spin.sleep", "false")); + _completeLatch=completeLatch; + } + + public int getOpsDone() + { + return _opsdone; + } + + @Override + public void run() + { + try + { + _db.init(); + } + catch (DBException e) + { + e.printStackTrace(); + e.printStackTrace(System.out); + return; + } - public void run() - { - try - { - _db.init(); - } - catch (DBException e) - { - e.printStackTrace(); - e.printStackTrace(System.out); - return; - } + try + { + _workloadstate=_workload.initThread(_props,_threadid,_threadcount); + } + catch (WorkloadException e) + { + e.printStackTrace(); + e.printStackTrace(System.out); + return; + } - try - { - _workloadstate=_workload.initThread(_props,_threadid,_threadcount); - } - catch (WorkloadException e) - { - e.printStackTrace(); - e.printStackTrace(System.out); - return; - } + //NOTE: Switching to using nanoTime and parkNanos for time management here such that the measurements + // and the client thread have the same view on time. - //spread the thread operations out so they don't all hit the DB at the same time - try - { - //GH issue 4 - throws exception if _target>1 because random.nextInt argument must be >0 - //and the sleep() doesn't make sense for granularities < 1 ms anyway - if ( (_target>0) && (_target<=1.0) ) - { - sleep(Utils.random().nextInt((int)(1.0/_target))); - } - } - catch (InterruptedException e) - { - // do nothing. - } - - try - { - if (_dotransactions) - { - long st=System.currentTimeMillis(); - - while (((_opcount == 0) || (_opsdone < _opcount)) && !_workload.isStopRequested()) - { - - if (!_workload.doTransaction(_db,_workloadstate)) - { - break; - } - - _opsdone++; - - //throttle the operations - if (_target>0) - { - //this is more accurate than other throttling approaches we have tried, - //like sleeping for (1/target throughput)-operation latency, - //because it smooths timing inaccuracies (from sleep() taking an int, - //current time in millis) over many operations - while (System.currentTimeMillis()-st<((double)_opsdone)/_target) - { - try - { - sleep(1); - } - catch (InterruptedException e) - { - // do nothing. - } - - } - } - } - } - else - { - long st=System.currentTimeMillis(); - - while (((_opcount == 0) || (_opsdone < _opcount)) && !_workload.isStopRequested()) - { - - if (!_workload.doInsert(_db,_workloadstate)) - { - break; - } - - _opsdone++; - - //throttle the operations - if (_target>0) - { - //this is more accurate than other throttling approaches we have tried, - //like sleeping for (1/target throughput)-operation latency, - //because it smooths timing inaccuracies (from sleep() taking an int, - //current time in millis) over many operations - while (System.currentTimeMillis()-st<((double)_opsdone)/_target) - { - try - { - sleep(1); - } - catch (InterruptedException e) - { - // do nothing. - } - } - } - } - } - } - catch (Exception e) - { - e.printStackTrace(); - e.printStackTrace(System.out); - System.exit(0); - } + //spread the thread operations out so they don't all hit the DB at the same time + // GH issue 4 - throws exception if _target>1 because random.nextInt argument must be >0 + // and the sleep() doesn't make sense for granularities < 1 ms anyway + if ((_targetOpsPerMs > 0) && (_targetOpsPerMs <= 1.0)) + { + long randomMinorDelay = Utils.random().nextInt((int) _targetOpsTickNs); + sleepUntil(System.nanoTime() + randomMinorDelay); + } + try + { + if (_dotransactions) + { + long startTimeNanos = System.nanoTime(); + + while (((_opcount == 0) || (_opsdone < _opcount)) && !_workload.isStopRequested()) + { + + if (!_workload.doTransaction(_db,_workloadstate)) + { + break; + } + + _opsdone++; + + throttleNanos(startTimeNanos); + } + } + else + { + long startTimeNanos = System.nanoTime(); + + while (((_opcount == 0) || (_opsdone < _opcount)) && !_workload.isStopRequested()) + { + + if (!_workload.doInsert(_db,_workloadstate)) + { + break; + } + + _opsdone++; + + throttleNanos(startTimeNanos); + } + } + } + catch (Exception e) + { + e.printStackTrace(); + e.printStackTrace(System.out); + System.exit(0); + } - try - { - _db.cleanup(); - } - catch (DBException e) - { - e.printStackTrace(); - e.printStackTrace(System.out); - return; - } - } + try + { + _measurements.setIntendedStartTimeNs(0); + _db.cleanup(); + } + catch (DBException e) + { + e.printStackTrace(); + e.printStackTrace(System.out); + return; + } + finally + { + _completeLatch.countDown(); + } + } + + static void sleepUntil(long deadline) { + long now = System.nanoTime(); + while((now = System.nanoTime()) < deadline) { + if (!_spinSleep) { + LockSupport.parkNanos(deadline - now); + } + } + } + private void throttleNanos(long startTimeNanos) { + //throttle the operations + if (_targetOpsPerMs > 0) + { + // delay until next tick + long deadline = startTimeNanos + _opsdone*_targetOpsTickNs; + sleepUntil(deadline); + _measurements.setIntendedStartTimeNs(deadline); + } + } + + /** + * the total amount of work this thread is still expected to do + */ + public int getOpsTodo() + { + int todo = _opcount - _opsdone; + return todo < 0 ? 0 : todo; + } } /** @@ -321,482 +413,537 @@ class ClientThread extends Thread public class Client { - public static final String OPERATION_COUNT_PROPERTY="operationcount"; + public static final String DEFAULT_RECORD_COUNT = "0"; - public static final String RECORD_COUNT_PROPERTY="recordcount"; + /** + * The target number of operations to perform. + */ + public static final String OPERATION_COUNT_PROPERTY="operationcount"; - public static final String WORKLOAD_PROPERTY="workload"; - - /** - * 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. - */ - public static final String INSERT_COUNT_PROPERTY="insertcount"; - - /** - * The maximum amount of time (in seconds) for which the benchmark will be run. + /** + * The number of records to load into the database initially. */ - public static final String MAX_EXECUTION_TIME = "maxexecutiontime"; + public static final String RECORD_COUNT_PROPERTY="recordcount"; - public static void usageMessage() - { - System.out.println("Usage: java com.yahoo.ycsb.Client [options]"); - System.out.println("Options:"); - System.out.println(" -threads n: execute using n threads (default: 1) - can also be specified as the \n" + - " \"threadcount\" property using -p"); - System.out.println(" -target n: attempt to do n operations per second (default: unlimited) - can also\n" + - " be specified as the \"target\" property using -p"); - System.out.println(" -load: run the loading phase of the workload"); - System.out.println(" -t: run the transactions phase of the workload (default)"); - System.out.println(" -db dbname: specify the name of the DB to use (default: com.yahoo.ycsb.BasicDB) - \n" + - " can also be specified as the \"db\" property using -p"); - System.out.println(" -P propertyfile: load properties from the given file. Multiple files can"); - System.out.println(" be specified, and will be processed in the order specified"); - System.out.println(" -p name=value: specify a property to be passed to the DB and workloads;"); - System.out.println(" multiple properties can be specified, and override any"); - System.out.println(" values in the propertyfile"); - System.out.println(" -s: show status during run (default: no status)"); - System.out.println(" -l label: use label for status (e.g. to label one experiment out of a whole batch)"); - System.out.println(""); - System.out.println("Required properties:"); - System.out.println(" "+WORKLOAD_PROPERTY+": the name of the workload class to use (e.g. com.yahoo.ycsb.workloads.CoreWorkload)"); - System.out.println(""); - System.out.println("To run the transaction phase from multiple servers, start a separate client on each."); - System.out.println("To run the load phase from multiple servers, start a separate client on each; additionally,"); - System.out.println("use the \"insertcount\" and \"insertstart\" properties to divide up the records to be inserted"); - } + /** + * The workload class to be loaded. + */ + public static final String WORKLOAD_PROPERTY="workload"; - public static boolean checkRequiredProperties(Properties props) - { - if (props.getProperty(WORKLOAD_PROPERTY)==null) - { - System.out.println("Missing property: "+WORKLOAD_PROPERTY); - return false; - } + /** + * The database class to be used. + */ + public static final String DB_PROPERTY="db"; - return true; - } + /** + * The exporter class to be used. The default is + * com.yahoo.ycsb.measurements.exporter.TextMeasurementsExporter. + */ + public static final String EXPORTER_PROPERTY="exporter"; + /** + * If set to the path of a file, YCSB will write all output to this file + * instead of STDOUT. + */ + public static final String EXPORT_FILE_PROPERTY="exportfile"; - /** - * Exports the measurements to either sysout or a file using the exporter - * loaded from conf. - * @throws IOException Either failed to write to output stream or failed to close it. - */ - private static void exportMeasurements(Properties props, int opcount, long runtime) - throws IOException - { - MeasurementsExporter exporter = null; - try - { - // if no destination file is provided the results will be written to stdout - OutputStream out; - String exportFile = props.getProperty("exportfile"); - if (exportFile == null) - { - out = System.out; - } else - { - out = new FileOutputStream(exportFile); - } + /** + * The number of YCSB client threads to run. + */ + public static final String THREAD_COUNT_PROPERTY="threadcount"; - // if no exporter is provided the default text one will be used - String exporterStr = props.getProperty("exporter", "com.yahoo.ycsb.measurements.exporter.TextMeasurementsExporter"); - try - { - exporter = (MeasurementsExporter) Class.forName(exporterStr).getConstructor(OutputStream.class).newInstance(out); - } catch (Exception e) - { - System.err.println("Could not find exporter " + exporterStr - + ", will use default text reporter."); - e.printStackTrace(); - exporter = new TextMeasurementsExporter(out); - } + /** + * 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. + */ + public static final String INSERT_COUNT_PROPERTY="insertcount"; - exporter.write("OVERALL", "RunTime(ms)", runtime); - double throughput = 1000.0 * ((double) opcount) / ((double) runtime); - exporter.write("OVERALL", "Throughput(ops/sec)", throughput); + /** + * Target number of operations per second + */ + public static final String TARGET_PROPERTY="target"; - Measurements.getMeasurements().exportMeasurements(exporter); - } finally - { - if (exporter != null) - { - exporter.close(); - } - } - } - - @SuppressWarnings("unchecked") - public static void main(String[] args) - { - String dbname; - Properties props=new Properties(); - Properties fileprops=new Properties(); - boolean dotransactions=true; - int threadcount=1; - int target=0; - boolean status=false; - String label=""; - - //parse arguments - int argindex=0; - - if (args.length==0) - { - usageMessage(); - System.exit(0); - } + /** + * The maximum amount of time (in seconds) for which the benchmark will be run. + */ + public static final String MAX_EXECUTION_TIME = "maxexecutiontime"; - while (args[argindex].startsWith("-")) - { - if (args[argindex].compareTo("-threads")==0) - { - argindex++; - if (argindex>=args.length) - { - usageMessage(); - System.exit(0); - } - int tcount=Integer.parseInt(args[argindex]); - props.setProperty("threadcount", tcount+""); - argindex++; - } - else if (args[argindex].compareTo("-target")==0) - { - argindex++; - if (argindex>=args.length) - { - usageMessage(); - System.exit(0); - } - int ttarget=Integer.parseInt(args[argindex]); - props.setProperty("target", ttarget+""); - argindex++; - } - else if (args[argindex].compareTo("-load")==0) - { - dotransactions=false; - argindex++; - } - else if (args[argindex].compareTo("-t")==0) - { - dotransactions=true; - argindex++; - } - else if (args[argindex].compareTo("-s")==0) - { - status=true; - argindex++; - } - else if (args[argindex].compareTo("-db")==0) - { - argindex++; - if (argindex>=args.length) - { - usageMessage(); - System.exit(0); - } - props.setProperty("db",args[argindex]); - argindex++; - } - else if (args[argindex].compareTo("-l")==0) - { - argindex++; - if (argindex>=args.length) - { - usageMessage(); - System.exit(0); - } - label=args[argindex]; - argindex++; - } - else if (args[argindex].compareTo("-P")==0) - { - argindex++; - if (argindex>=args.length) - { - usageMessage(); - System.exit(0); - } - String propfile=args[argindex]; - argindex++; - - Properties myfileprops=new Properties(); - try - { - myfileprops.load(new FileInputStream(propfile)); - } - catch (IOException e) - { - System.out.println(e.getMessage()); - System.exit(0); - } - - //Issue #5 - remove call to stringPropertyNames to make compilable under Java 1.5 - for (Enumeration e=myfileprops.propertyNames(); e.hasMoreElements(); ) - { - String prop=(String)e.nextElement(); - - fileprops.setProperty(prop,myfileprops.getProperty(prop)); - } - } - else if (args[argindex].compareTo("-p")==0) - { - argindex++; - if (argindex>=args.length) - { - usageMessage(); - System.exit(0); - } - int eq=args[argindex].indexOf('='); - if (eq<0) - { - usageMessage(); - System.exit(0); - } - - String name=args[argindex].substring(0,eq); - String value=args[argindex].substring(eq+1); - props.put(name,value); - //System.out.println("["+name+"]=["+value+"]"); - argindex++; - } - else - { - System.out.println("Unknown option "+args[argindex]); - usageMessage(); - System.exit(0); - } + public static void usageMessage() + { + System.out.println("Usage: java com.yahoo.ycsb.Client [options]"); + System.out.println("Options:"); + System.out.println(" -threads n: execute using n threads (default: 1) - can also be specified as the \n" + + " \"threadcount\" property using -p"); + System.out.println(" -target n: attempt to do n operations per second (default: unlimited) - can also\n" + + " be specified as the \"target\" property using -p"); + System.out.println(" -load: run the loading phase of the workload"); + System.out.println(" -t: run the transactions phase of the workload (default)"); + System.out.println(" -db dbname: specify the name of the DB to use (default: com.yahoo.ycsb.BasicDB) - \n" + + " can also be specified as the \"db\" property using -p"); + System.out.println(" -P propertyfile: load properties from the given file. Multiple files can"); + System.out.println(" be specified, and will be processed in the order specified"); + System.out.println(" -p name=value: specify a property to be passed to the DB and workloads;"); + System.out.println(" multiple properties can be specified, and override any"); + System.out.println(" values in the propertyfile"); + System.out.println(" -s: show status during run (default: no status)"); + System.out.println(" -l label: use label for status (e.g. to label one experiment out of a whole batch)"); + System.out.println(""); + System.out.println("Required properties:"); + System.out.println(" "+WORKLOAD_PROPERTY+": the name of the workload class to use (e.g. com.yahoo.ycsb.workloads.CoreWorkload)"); + System.out.println(""); + System.out.println("To run the transaction phase from multiple servers, start a separate client on each."); + System.out.println("To run the load phase from multiple servers, start a separate client on each; additionally,"); + System.out.println("use the \"insertcount\" and \"insertstart\" properties to divide up the records to be inserted"); + } + + public static boolean checkRequiredProperties(Properties props) + { + if (props.getProperty(WORKLOAD_PROPERTY)==null) + { + System.out.println("Missing property: "+WORKLOAD_PROPERTY); + return false; + } - if (argindex>=args.length) - { - break; - } - } + return true; + } - if (argindex!=args.length) - { - usageMessage(); - System.exit(0); - } - //set up logging - //BasicConfigurator.configure(); + /** + * Exports the measurements to either sysout or a file using the exporter + * loaded from conf. + * @throws IOException Either failed to write to output stream or failed to close it. + */ + private static void exportMeasurements(Properties props, int opcount, long runtime) + throws IOException + { + MeasurementsExporter exporter = null; + try + { + // if no destination file is provided the results will be written to stdout + OutputStream out; + String exportFile = props.getProperty(EXPORT_FILE_PROPERTY); + if (exportFile == null) + { + out = System.out; + } else + { + out = new FileOutputStream(exportFile); + } + + // if no exporter is provided the default text one will be used + String exporterStr = props.getProperty(EXPORTER_PROPERTY, "com.yahoo.ycsb.measurements.exporter.TextMeasurementsExporter"); + try + { + exporter = (MeasurementsExporter) Class.forName(exporterStr).getConstructor(OutputStream.class).newInstance(out); + } catch (Exception e) + { + System.err.println("Could not find exporter " + exporterStr + + ", will use default text reporter."); + e.printStackTrace(); + exporter = new TextMeasurementsExporter(out); + } + + exporter.write("OVERALL", "RunTime(ms)", runtime); + double throughput = 1000.0 * (opcount) / (runtime); + exporter.write("OVERALL", "Throughput(ops/sec)", throughput); + + Measurements.getMeasurements().exportMeasurements(exporter); + } finally + { + if (exporter != null) + { + exporter.close(); + } + } + } + + @SuppressWarnings("unchecked") + public static void main(String[] args) + { + String dbname; + Properties props=new Properties(); + Properties fileprops=new Properties(); + boolean dotransactions=true; + int threadcount=1; + int target=0; + boolean status=false; + String label=""; + + //parse arguments + int argindex=0; + + if (args.length==0) + { + usageMessage(); + System.exit(0); + } - //overwrite file properties with properties from the command line + while (args[argindex].startsWith("-")) + { + if (args[argindex].compareTo("-threads")==0) + { + argindex++; + if (argindex>=args.length) + { + usageMessage(); + System.exit(0); + } + int tcount=Integer.parseInt(args[argindex]); + props.setProperty(THREAD_COUNT_PROPERTY, tcount+""); + argindex++; + } + else if (args[argindex].compareTo("-target")==0) + { + argindex++; + if (argindex>=args.length) + { + usageMessage(); + System.exit(0); + } + int ttarget=Integer.parseInt(args[argindex]); + props.setProperty(TARGET_PROPERTY, ttarget+""); + argindex++; + } + else if (args[argindex].compareTo("-load")==0) + { + dotransactions=false; + argindex++; + } + else if (args[argindex].compareTo("-t")==0) + { + dotransactions=true; + argindex++; + } + else if (args[argindex].compareTo("-s")==0) + { + status=true; + argindex++; + } + else if (args[argindex].compareTo("-db")==0) + { + argindex++; + if (argindex>=args.length) + { + usageMessage(); + System.exit(0); + } + props.setProperty(DB_PROPERTY,args[argindex]); + argindex++; + } + else if (args[argindex].compareTo("-l")==0) + { + argindex++; + if (argindex>=args.length) + { + usageMessage(); + System.exit(0); + } + label=args[argindex]; + argindex++; + } + else if (args[argindex].compareTo("-P")==0) + { + argindex++; + if (argindex>=args.length) + { + usageMessage(); + System.exit(0); + } + String propfile=args[argindex]; + argindex++; + + Properties myfileprops=new Properties(); + try + { + myfileprops.load(new FileInputStream(propfile)); + } + catch (IOException e) + { + System.out.println(e.getMessage()); + System.exit(0); + } + + //Issue #5 - remove call to stringPropertyNames to make compilable under Java 1.5 + for (Enumeration e=myfileprops.propertyNames(); e.hasMoreElements(); ) + { + String prop=(String)e.nextElement(); + + fileprops.setProperty(prop,myfileprops.getProperty(prop)); + } + + } + else if (args[argindex].compareTo("-p")==0) + { + argindex++; + if (argindex>=args.length) + { + usageMessage(); + System.exit(0); + } + int eq=args[argindex].indexOf('='); + if (eq<0) + { + usageMessage(); + System.exit(0); + } + + String name=args[argindex].substring(0,eq); + String value=args[argindex].substring(eq+1); + props.put(name,value); + //System.out.println("["+name+"]=["+value+"]"); + argindex++; + } + else + { + System.out.println("Unknown option "+args[argindex]); + usageMessage(); + System.exit(0); + } + + if (argindex>=args.length) + { + break; + } + } - //Issue #5 - remove call to stringPropertyNames to make compilable under Java 1.5 - for (Enumeration e=props.propertyNames(); e.hasMoreElements(); ) - { - String prop=(String)e.nextElement(); - - fileprops.setProperty(prop,props.getProperty(prop)); - } + if (argindex!=args.length) + { + usageMessage(); + System.exit(0); + } - props=fileprops; + //set up logging + //BasicConfigurator.configure(); - if (!checkRequiredProperties(props)) - { - System.exit(0); - } - - long maxExecutionTime = Integer.parseInt(props.getProperty(MAX_EXECUTION_TIME, "0")); - - //get number of threads, target and db - threadcount=Integer.parseInt(props.getProperty("threadcount","1")); - dbname=props.getProperty("db","com.yahoo.ycsb.BasicDB"); - target=Integer.parseInt(props.getProperty("target","0")); - - //compute the target throughput - double targetperthreadperms=-1; - if (target>0) - { - double targetperthread=((double)target)/((double)threadcount); - targetperthreadperms=targetperthread/1000.0; - } - - System.out.println("YCSB Client 0.1"); - System.out.print("Command line:"); - for (int i=0; i<args.length; i++) - { - System.out.print(" "+args[i]); - } - System.out.println(); - System.err.println("Loading workload..."); - - //show a warning message that creating the workload is taking a while - //but only do so if it is taking longer than 2 seconds - //(showing the message right away if the setup wasn't taking very long was confusing people) - Thread warningthread=new Thread() - { - public void run() - { - try - { - sleep(2000); - } - catch (InterruptedException e) - { - return; - } - System.err.println(" (might take a few minutes for large data sets)"); - } - }; + //overwrite file properties with properties from the command line - warningthread.start(); - - //set up measurements - Measurements.setProperties(props); - - //load the workload - ClassLoader classLoader = Client.class.getClassLoader(); + //Issue #5 - remove call to stringPropertyNames to make compilable under Java 1.5 + for (Enumeration e=props.propertyNames(); e.hasMoreElements(); ) + { + String prop=(String)e.nextElement(); - Workload workload=null; + fileprops.setProperty(prop,props.getProperty(prop)); + } - try - { - Class workloadclass = classLoader.loadClass(props.getProperty(WORKLOAD_PROPERTY)); + props=fileprops; - workload=(Workload)workloadclass.newInstance(); - } - catch (Exception e) - { - e.printStackTrace(); - e.printStackTrace(System.out); - System.exit(0); - } + if (!checkRequiredProperties(props)) + { + System.exit(0); + } - try - { - workload.init(props); - } - catch (WorkloadException e) - { - e.printStackTrace(); - e.printStackTrace(System.out); - System.exit(0); - } - - warningthread.interrupt(); + long maxExecutionTime = Integer.parseInt(props.getProperty(MAX_EXECUTION_TIME, "0")); - //run the workload + //get number of threads, target and db + threadcount=Integer.parseInt(props.getProperty(THREAD_COUNT_PROPERTY,"1")); + dbname=props.getProperty(DB_PROPERTY,"com.yahoo.ycsb.BasicDB"); + target=Integer.parseInt(props.getProperty(TARGET_PROPERTY,"0")); - System.err.println("Starting test."); + //compute the target throughput + double targetperthreadperms=-1; + if (target>0) + { + double targetperthread=((double)target)/((double)threadcount); + targetperthreadperms=targetperthread/1000.0; + } - int opcount; - if (dotransactions) - { - opcount=Integer.parseInt(props.getProperty(OPERATION_COUNT_PROPERTY,"0")); - } - else - { - if (props.containsKey(INSERT_COUNT_PROPERTY)) - { - opcount=Integer.parseInt(props.getProperty(INSERT_COUNT_PROPERTY,"0")); - } - else - { - opcount=Integer.parseInt(props.getProperty(RECORD_COUNT_PROPERTY,"0")); - } - } + System.out.println("YCSB Client 0.1"); + System.out.print("Command line:"); + for (int i=0; i<args.length; i++) + { + System.out.print(" "+args[i]); + } + System.out.println(); + System.err.println("Loading workload..."); + + //show a warning message that creating the workload is taking a while + //but only do so if it is taking longer than 2 seconds + //(showing the message right away if the setup wasn't taking very long was confusing people) + Thread warningthread=new Thread() + { + @Override + public void run() + { + try + { + sleep(2000); + } + catch (InterruptedException e) + { + return; + } + System.err.println(" (might take a few minutes for large data sets)"); + } + }; + + warningthread.start(); + + //set up measurements + Measurements.setProperties(props); + + //load the workload + ClassLoader classLoader = Client.class.getClassLoader(); + + Workload workload=null; + + try + { + Class workloadclass = classLoader.loadClass(props.getProperty(WORKLOAD_PROPERTY)); + + workload=(Workload)workloadclass.newInstance(); + } + catch (Exception e) + { + e.printStackTrace(); + e.printStackTrace(System.out); + System.exit(0); + } - Vector<Thread> threads=new Vector<Thread>(); + try + { + workload.init(props); + } + catch (WorkloadException e) + { + e.printStackTrace(); + e.printStackTrace(System.out); + System.exit(0); + } - for (int threadid=0; threadid<threadcount; threadid++) - { - DB db=null; - try - { - db=DBFactory.newDB(dbname,props); - } - catch (UnknownDBException e) - { - System.out.println("Unknown DB "+dbname); - System.exit(0); - } + warningthread.interrupt(); - Thread t=new ClientThread(db,dotransactions,workload,threadid,threadcount,props,opcount/threadcount,targetperthreadperms); + //run the workload - threads.add(t); - //t.start(); - } + System.err.println("Starting test."); - StatusThread statusthread=null; - - if (status) - { - boolean standardstatus=false; - if (props.getProperty("measurementtype","").compareTo("timeseries")==0) - { - standardstatus=true; - } - statusthread=new StatusThread(threads,label,standardstatus); - statusthread.start(); - } + int opcount; + if (dotransactions) + { + opcount=Integer.parseInt(props.getProperty(OPERATION_COUNT_PROPERTY,"0")); + } + else + { + if (props.containsKey(INSERT_COUNT_PROPERTY)) + { + opcount=Integer.parseInt(props.getProperty(INSERT_COUNT_PROPERTY,"0")); + } + else + { + opcount=Integer.parseInt(props.getProperty(RECORD_COUNT_PROPERTY, DEFAULT_RECORD_COUNT)); + } + } - long st=System.currentTimeMillis(); + CountDownLatch completeLatch=new CountDownLatch(threadcount); + final List<ClientThread> clients=new ArrayList<ClientThread>(threadcount); + for (int threadid=0; threadid<threadcount; threadid++) + { + DB db=null; + try + { + db=DBFactory.newDB(dbname,props); + } + catch (UnknownDBException e) + { + System.out.println("Unknown DB "+dbname); + System.exit(0); + } + + + int threadopcount = opcount/threadcount; + + // ensure correct number of operations, in case opcount is not a multiple of threadcount + if (threadid<opcount%threadcount) + { + ++threadopcount; + } + + ClientThread t=new ClientThread(db,dotransactions,workload,props,threadopcount, targetperthreadperms, completeLatch); + + clients.add(t); + } + + StatusThread statusthread=null; + + if (status) + { + boolean standardstatus=false; + if (props.getProperty(Measurements.MEASUREMENT_TYPE_PROPERTY,"").compareTo("timeseries")==0) + { + standardstatus=true; + } + int statusIntervalSeconds = Integer.parseInt(props.getProperty("status.interval","10")); + statusthread=new StatusThread(completeLatch,clients,label,standardstatus,statusIntervalSeconds); + statusthread.start(); + } + + long st=System.currentTimeMillis(); + + for (Thread t : clients) + { + t.start(); + } - for (Thread t : threads) - { - t.start(); - } - Thread terminator = null; - + if (maxExecutionTime > 0) { - terminator = new TerminatorThread(maxExecutionTime, threads, workload); + terminator = new TerminatorThread(maxExecutionTime, clients, workload); terminator.start(); } - + int opsDone = 0; - for (Thread t : threads) - { - try - { - t.join(); - opsDone += ((ClientThread)t).getOpsDone(); - } - catch (InterruptedException e) - { - } - } + for (Thread t : clients) + { + try + { + t.join(); + opsDone += ((ClientThread)t).getOpsDone(); + } + catch (InterruptedException e) + { + } + } - long en=System.currentTimeMillis(); - - if (terminator != null && !terminator.isInterrupted()) { + long en=System.currentTimeMillis(); + + if (terminator != null && !terminator.isInterrupted()) { terminator.interrupt(); } - if (status) - { - statusthread.interrupt(); - } + if (status) + { + // wake up status thread if it's asleep + statusthread.interrupt(); + // at this point we assume all the monitored threads are already gone as per above join loop. + try { + statusthread.join(); + } catch (InterruptedException e) { + } + } - try - { - workload.cleanup(); - } - catch (WorkloadException e) - { - e.printStackTrace(); - e.printStackTrace(System.out); - System.exit(0); - } + try + { + workload.cleanup(); + } + catch (WorkloadException e) + { + e.printStackTrace(); + e.printStackTrace(System.out); + System.exit(0); + } - try - { - exportMeasurements(props, opsDone, en - st); - } catch (IOException e) - { - System.err.println("Could not export measurements, error: " + e.getMessage()); - e.printStackTrace(); - System.exit(-1); - } + try + { + exportMeasurements(props, opsDone, en - st); + } catch (IOException e) + { + System.err.println("Could not export measurements, error: " + e.getMessage()); + e.printStackTrace(); + System.exit(-1); + } - System.exit(0); - } + System.exit(0); + } } diff --git a/core/src/main/java/com/yahoo/ycsb/CommandLine.java b/core/src/main/java/com/yahoo/ycsb/CommandLine.java index c177426beb5436f1dc120dfece7e531968ed3e40..02885730ec76ce1d4ceab0aa50b3247543bd1c19 100644 --- a/core/src/main/java/com/yahoo/ycsb/CommandLine.java +++ b/core/src/main/java/com/yahoo/ycsb/CommandLine.java @@ -29,6 +29,7 @@ import java.util.Set; import java.util.HashSet; import java.util.Vector; +import com.yahoo.ycsb.Client; import com.yahoo.ycsb.workloads.*; /** @@ -89,7 +90,7 @@ public class CommandLine usageMessage(); System.exit(0); } - props.setProperty("db",args[argindex]); + props.setProperty(Client.DB_PROPERTY, args[argindex]); argindex++; } else if (args[argindex].compareTo("-P")==0) @@ -187,7 +188,7 @@ public class CommandLine System.out.println("Start with \"-help\" for usage info"); //create a DB - String dbname=props.getProperty("db",DEFAULT_DB); + String dbname=props.getProperty(Client.DB_PROPERTY, DEFAULT_DB); ClassLoader classLoader = CommandLine.class.getClassLoader(); @@ -294,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()); @@ -323,8 +324,8 @@ 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) { @@ -361,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) @@ -381,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) @@ -393,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 4516e7b0adf39e8fa733a7e7cb20aa708fbda0e8..35cf26a5dfce891f13cb77914325a49b35ea6005 100644 --- a/core/src/main/java/com/yahoo/ycsb/DBWrapper.java +++ b/core/src/main/java/com/yahoo/ycsb/DBWrapper.java @@ -69,7 +69,11 @@ public class DBWrapper extends DB */ public void cleanup() throws DBException { + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); _db.cleanup(); + long en=System.nanoTime(); + measure("CLEANUP",ist, st, en); } /** @@ -79,15 +83,16 @@ public class DBWrapper extends 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 + * @return The result of the operation. */ - 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) { - long st=System.nanoTime(); - int res=_db.read(table,key,fields,result); + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + Status res=_db.read(table,key,fields,result); long en=System.nanoTime(); - _measurements.measure("READ",(int)((en-st)/1000)); - _measurements.reportReturnCode("READ",res); + measure("READ",ist, st, en); + _measurements.reportStatus("READ",res); return res; } @@ -99,17 +104,23 @@ public class DBWrapper extends 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 + * @return The result of the operation. */ - 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) { - long st=System.nanoTime(); - int res=_db.scan(table,startkey,recordcount,fields,result); + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + Status res=_db.scan(table,startkey,recordcount,fields,result); long en=System.nanoTime(); - _measurements.measure("SCAN",(int)((en-st)/1000)); - _measurements.reportReturnCode("SCAN",res); + measure("SCAN",ist, st, en); + _measurements.reportStatus("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)); + } /** * Update a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified @@ -118,15 +129,16 @@ public class DBWrapper extends 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 + * @return The result of the operation. */ - public int update(String table, String key, HashMap<String,ByteIterator> values) + public Status update(String table, String key, HashMap<String,ByteIterator> values) { - long st=System.nanoTime(); - int res=_db.update(table,key,values); + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + Status res=_db.update(table,key,values); long en=System.nanoTime(); - _measurements.measure("UPDATE",(int)((en-st)/1000)); - _measurements.reportReturnCode("UPDATE",res); + measure("UPDATE",ist, st, en); + _measurements.reportStatus("UPDATE",res); return res; } @@ -137,15 +149,16 @@ public class DBWrapper extends 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 + * @return The result of the operation. */ - public int insert(String table, String key, HashMap<String,ByteIterator> values) + public Status insert(String table, String key, HashMap<String,ByteIterator> values) { - long st=System.nanoTime(); - int res=_db.insert(table,key,values); + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + Status res=_db.insert(table,key,values); long en=System.nanoTime(); - _measurements.measure("INSERT",(int)((en-st)/1000)); - _measurements.reportReturnCode("INSERT",res); + measure("INSERT",ist, st, en); + _measurements.reportStatus("INSERT",res); return res; } @@ -154,15 +167,16 @@ public class DBWrapper extends DB * * @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 + * @return The result of the operation. */ - public int delete(String table, String key) + public Status delete(String table, String key) { - long st=System.nanoTime(); - int res=_db.delete(table,key); + long ist=_measurements.getIntendedtartTimeNs(); + long st = System.nanoTime(); + Status res=_db.delete(table,key); long en=System.nanoTime(); - _measurements.measure("DELETE",(int)((en-st)/1000)); - _measurements.reportReturnCode("DELETE",res); + measure("DELETE",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 new file mode 100644 index 0000000000000000000000000000000000000000..e576a84268b104a12410bc80dae0a36098a6f5d5 --- /dev/null +++ b/core/src/main/java/com/yahoo/ycsb/GoodBadUglyDB.java @@ -0,0 +1,162 @@ +/** + * 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 static java.util.concurrent.TimeUnit.MICROSECONDS; + +import java.util.HashMap; +import java.util.Random; +import java.util.Set; +import java.util.Vector; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.LockSupport; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +/** + * Basic DB that just prints out the requested operations, instead of doing them against a database. + */ +public class GoodBadUglyDB extends DB { + public static final String SIMULATE_DELAY = "gbudb.delays"; + public static final String SIMULATE_DELAY_DEFAULT = "200,1000,10000,50000,100000"; + long delays[]; + static ReadWriteLock DB_ACCESS = new ReentrantReadWriteLock(); + + public GoodBadUglyDB() { + delays = new long[] { 200, 1000, 10000, 50000, 200000 }; + } + + void delay() { + final Random random = Utils.random(); + double p = random.nextDouble(); + int mod; + if (p < 0.9) { + mod = 0; + } else if (p < 0.99) { + mod = 1; + } else if (p < 0.9999) { + mod = 2; + } else { + mod = 3; + } + // this will make mod 3 pauses global + Lock lock = mod == 3 ? DB_ACCESS.writeLock() : DB_ACCESS.readLock(); + if (mod == 3) { + System.out.println("OUCH"); + } + lock.lock(); + try { + final long baseDelayNs = MICROSECONDS.toNanos(delays[mod]); + final int delayRangeNs = (int) (MICROSECONDS.toNanos(delays[mod+1]) - baseDelayNs); + final long delayNs = baseDelayNs + random.nextInt(delayRangeNs); + long now = System.nanoTime(); + final long deadline = now + delayNs; + do { + LockSupport.parkNanos(deadline - now); + } while ((now = System.nanoTime()) < deadline && !Thread.interrupted()); + } + finally { + lock.unlock(); + } + + } + + /** + * Initialize any state for this DB. Called once per DB instance; there is one DB instance per client thread. + */ + public void init() { + int i=0; + for(String delay: getProperties().getProperty(SIMULATE_DELAY, SIMULATE_DELAY_DEFAULT).split(",")){ + delays[i++] = Long.parseLong(delay); + } + } + + /** + * 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) { + delay(); + 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 + */ + public Status scan(String table, String startkey, int recordcount, Set<String> fields, + Vector<HashMap<String, ByteIterator>> result) { + delay(); + + 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 + */ + public Status update(String table, String key, HashMap<String, ByteIterator> values) { + delay(); + + 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 + */ + public Status insert(String table, String key, HashMap<String, ByteIterator> values) { + delay(); + return Status.OK; + } + + /** + * 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 Status delete(String table, String key) { + delay(); + return Status.OK; + } +} diff --git a/core/src/main/java/com/yahoo/ycsb/RandomByteIterator.java b/core/src/main/java/com/yahoo/ycsb/RandomByteIterator.java index 65db4335035ef22be38f249cc9b6ab7dcb92fe7e..cb0977aa56c8f52f4686d84aaaa23f4f30f160c2 100644 --- a/core/src/main/java/com/yahoo/ycsb/RandomByteIterator.java +++ b/core/src/main/java/com/yahoo/ycsb/RandomByteIterator.java @@ -34,11 +34,11 @@ public class RandomByteIterator extends ByteIterator { int bytes = Utils.random().nextInt(); try { buffer[base+0] = (byte)(((bytes) & 31) + ' '); - buffer[base+1] = (byte)(((bytes >> 5) & 31) + ' '); - buffer[base+2] = (byte)(((bytes >> 10) & 31) + ' '); + buffer[base+1] = (byte)(((bytes >> 5) & 63) + ' '); + buffer[base+2] = (byte)(((bytes >> 10) & 95) + ' '); buffer[base+3] = (byte)(((bytes >> 15) & 31) + ' '); - buffer[base+4] = (byte)(((bytes >> 20) & 31) + ' '); - buffer[base+5] = (byte)(((bytes >> 25) & 31) + ' '); + buffer[base+4] = (byte)(((bytes >> 20) & 63) + ' '); + buffer[base+5] = (byte)(((bytes >> 25) & 95) + ' '); } catch (ArrayIndexOutOfBoundsException e) { /* ignore it */ } } 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..ac23f5764816357cd0328315a1e5e4493632d949 --- /dev/null +++ b/core/src/main/java/com/yahoo/ycsb/Status.java @@ -0,0 +1,89 @@ +/** + * 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."); + +} + diff --git a/core/src/main/java/com/yahoo/ycsb/TerminatorThread.java b/core/src/main/java/com/yahoo/ycsb/TerminatorThread.java index 51deab82dbcbd329735877683cf86d99c122dae8..62212f2c6dd0710f280c7516582440f0cd844d38 100644 --- a/core/src/main/java/com/yahoo/ycsb/TerminatorThread.java +++ b/core/src/main/java/com/yahoo/ycsb/TerminatorThread.java @@ -16,6 +16,7 @@ */ package com.yahoo.ycsb; +import java.util.List; import java.util.Vector; /** @@ -29,12 +30,12 @@ import java.util.Vector; */ public class TerminatorThread extends Thread { - private Vector<Thread> threads; + private final List<? extends Thread> threads; private long maxExecutionTime; private Workload workload; private long waitTimeOutInMS; - public TerminatorThread(long maxExecutionTime, Vector<Thread> threads, + public TerminatorThread(long maxExecutionTime, List<? extends Thread> threads, Workload workload) { this.maxExecutionTime = maxExecutionTime; this.threads = threads; @@ -58,7 +59,7 @@ public class TerminatorThread extends Thread { try { t.join(waitTimeOutInMS); if (t.isAlive()) { - System.err.println("Still waiting for thread " + t.getName() + " to complete. " + + System.out.println("Still waiting for thread " + t.getName() + " to complete. " + "Workload status: " + workload.isStopRequested()); } } catch (InterruptedException e) { 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..69884c299819aa42def314e47a8a7fd6241f0cad --- /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 int lastInt() + { + 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/ZipfianGenerator.java b/core/src/main/java/com/yahoo/ycsb/generator/ZipfianGenerator.java index 8a70f0869a16c7d2776072c1b6c4ed2e94e38e27..017fa05e5723766bc5fbd12ffd950a0eb32a09c3 100644 --- a/core/src/main/java/com/yahoo/ycsb/generator/ZipfianGenerator.java +++ b/core/src/main/java/com/yahoo/ycsb/generator/ZipfianGenerator.java @@ -276,12 +276,12 @@ public class ZipfianGenerator extends IntegerGenerator if (uz<1.0) { - return 0; + return base; } if (uz<1.0+Math.pow(0.5,theta)) { - return 1; + return base + 1; } long ret=base+(long)((itemcount) * Math.pow(eta*u - eta + 1, alpha)); 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 52ec97c17c8e75348d1a6452960a88abbe15d16f..1bcd39387412da3129fe2157dda1f8106e12fd5b 100644 --- a/core/src/main/java/com/yahoo/ycsb/measurements/Measurements.java +++ b/core/src/main/java/com/yahoo/ycsb/measurements/Measurements.java @@ -1,167 +1,311 @@ -/** - * 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.measurements; +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; + import java.io.IOException; -import java.util.HashMap; import java.util.Properties; - -import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; +import java.util.concurrent.ConcurrentHashMap; /** * Collects latency measurements, and reports them when requested. - * + * * @author cooperb * */ -public class Measurements -{ - private static final String MEASUREMENT_TYPE = "measurementtype"; - - private static final String MEASUREMENT_TYPE_DEFAULT = "histogram"; - - static Measurements singleton=null; - - static Properties measurementproperties=null; - - public static void setProperties(Properties props) - { - measurementproperties=props; - } - - /** - * Return the singleton Measurements object. - */ - public synchronized static Measurements getMeasurements() - { - if (singleton==null) - { - singleton=new Measurements(measurementproperties); - } - return singleton; - } - - HashMap<String,OneMeasurement> data; - boolean histogram=true; - - private Properties _props; - - /** - * Create a new object with the specified properties. - */ - public Measurements(Properties props) - { - data=new HashMap<String,OneMeasurement>(); - - _props=props; - - if (_props.getProperty(MEASUREMENT_TYPE, MEASUREMENT_TYPE_DEFAULT).compareTo("histogram")==0) - { - histogram=true; - } - else - { - histogram=false; - } - } - - OneMeasurement constructOneMeasurement(String name) - { - if (histogram) - { - return new OneMeasurementHistogram(name,_props); - } - else - { - return new OneMeasurementTimeSeries(name,_props); - } - } - - /** - * Report a single value of a single metric. E.g. for read latency, operation="READ" and latency is the measured value. - */ - public synchronized void measure(String operation, int latency) - { - if (!data.containsKey(operation)) - { - synchronized(this) - { - if (!data.containsKey(operation)) - { - data.put(operation,constructOneMeasurement(operation)); - } - } - } - try - { - data.get(operation).measure(latency); - } - catch (java.lang.ArrayIndexOutOfBoundsException e) - { - System.out.println("ERROR: java.lang.ArrayIndexOutOfBoundsException - ignoring and continuing"); - e.printStackTrace(); - e.printStackTrace(System.out); - } - } - - /** - * Report a return code for a single DB operaiton. - */ - public void reportReturnCode(String operation, int code) - { - if (!data.containsKey(operation)) - { - synchronized(this) - { - if (!data.containsKey(operation)) - { - data.put(operation,constructOneMeasurement(operation)); - } - } - } - data.get(operation).reportReturnCode(code); - } - +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 = "hdrhistogram"; + + public static final String MEASUREMENT_INTERVAL = "measurement.interval"; + private static final String MEASUREMENT_INTERVAL_DEFAULT = "op"; + + static Measurements singleton=null; + static Properties measurementproperties=null; + + public static void setProperties(Properties props) + { + measurementproperties=props; + } + + /** + * Return the singleton Measurements object. + */ + public synchronized static Measurements getMeasurements() + { + if (singleton==null) + { + singleton=new Measurements(measurementproperties); + } + return singleton; + } + + final ConcurrentHashMap<String,OneMeasurement> _opToMesurementMap; + final ConcurrentHashMap<String,OneMeasurement> _opToIntendedMesurementMap; + final MeasurementType _measurementType; + final int _measurementInterval; + private Properties _props; + + /** + * Create a new object with the specified properties. + */ + public Measurements(Properties props) + { + _opToMesurementMap=new ConcurrentHashMap<String,OneMeasurement>(); + _opToIntendedMesurementMap=new ConcurrentHashMap<String,OneMeasurement>(); + + _props=props; + + String mTypeString = _props.getProperty(MEASUREMENT_TYPE_PROPERTY, MEASUREMENT_TYPE_PROPERTY_DEFAULT); + if (mTypeString.equals("histogram")) + { + _measurementType = MeasurementType.HISTOGRAM; + } + else if (mTypeString.equals("hdrhistogram")) + { + _measurementType = MeasurementType.HDRHISTOGRAM; + } + else if (mTypeString.equals("hdrhistogram+histogram")) + { + _measurementType = MeasurementType.HDRHISTOGRAM_AND_HISTOGRAM; + } + else if (mTypeString.equals("hdrhistogram+raw")) + { + _measurementType = MeasurementType.HDRHISTOGRAM_AND_RAW; + } + else if (mTypeString.equals("timeseries")) + { + _measurementType = MeasurementType.TIMESERIES; + } + else if (mTypeString.equals("raw")) + { + _measurementType = MeasurementType.RAW; + } + else { + throw new IllegalArgumentException("unknown "+MEASUREMENT_TYPE_PROPERTY+"="+mTypeString); + } + + String mIntervalString = _props.getProperty(MEASUREMENT_INTERVAL, MEASUREMENT_INTERVAL_DEFAULT); + if (mIntervalString.equals("op")) + { + _measurementInterval = 0; + } + else if (mIntervalString.equals("intended")) + { + _measurementInterval = 1; + } + else if (mIntervalString.equals("both")) + { + _measurementInterval = 2; + } + else { + throw new IllegalArgumentException("unknown "+MEASUREMENT_INTERVAL+"="+mIntervalString); + } + } + + OneMeasurement constructOneMeasurement(String name) + { + switch (_measurementType) + { + case HISTOGRAM: + return new OneMeasurementHistogram(name, _props); + case HDRHISTOGRAM: + return new OneMeasurementHdrHistogram(name, _props); + case HDRHISTOGRAM_AND_HISTOGRAM: + return new TwoInOneMeasurement(name, + new OneMeasurementHdrHistogram("Hdr"+name, _props), + new OneMeasurementHistogram("Bucket"+name, _props)); + 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?"); + } + } + + static class StartTimeHolder { + long time; + + long startTime(){ + if(time == 0) { + return System.nanoTime(); + } + else { + return time; + } + } + } + + ThreadLocal<StartTimeHolder> tlIntendedStartTime = new ThreadLocal<Measurements.StartTimeHolder>() { + protected StartTimeHolder initialValue() { + return new StartTimeHolder(); + }; + }; + + public void setIntendedStartTimeNs(long time) { + if(_measurementInterval==0) + return; + tlIntendedStartTime.get().time=time; + } + + public long getIntendedtartTimeNs() { + if(_measurementInterval==0) + return 0L; + return tlIntendedStartTime.get().startTime(); + } + + /** + * Report a single value of a single metric. E.g. for read latency, operation="READ" and latency is the measured + * value. + */ + public void measure(String operation, int latency) + { + if(_measurementInterval==1) + return; + try + { + OneMeasurement m = getOpMeasurement(operation); + m.measure(latency); + } + // This seems like a terribly hacky way to cover up for a bug in the measurement code + catch (java.lang.ArrayIndexOutOfBoundsException e) + { + System.out.println("ERROR: java.lang.ArrayIndexOutOfBoundsException - ignoring and continuing"); + e.printStackTrace(); + e.printStackTrace(System.out); + } + } + + /** + * Report a single value of a single metric. E.g. for read latency, operation="READ" and latency is the measured + * value. + */ + public void measureIntended(String operation, int latency) + { + if(_measurementInterval==0) + return; + try + { + OneMeasurement m = getOpIntendedMeasurement(operation); + m.measure(latency); + } + // This seems like a terribly hacky way to cover up for a bug in the measurement code + catch (java.lang.ArrayIndexOutOfBoundsException e) + { + System.out.println("ERROR: java.lang.ArrayIndexOutOfBoundsException - ignoring and continuing"); + e.printStackTrace(); + e.printStackTrace(System.out); + } + } + + private OneMeasurement getOpMeasurement(String operation) { + OneMeasurement m = _opToMesurementMap.get(operation); + if(m == null) + { + m = constructOneMeasurement(operation); + OneMeasurement oldM = _opToMesurementMap.putIfAbsent(operation, m); + if(oldM != null) + { + m = oldM; + } + } + return m; + } + + private OneMeasurement getOpIntendedMeasurement(String operation) { + OneMeasurement m = _opToIntendedMesurementMap.get(operation); + if(m == null) + { + final String name = _measurementInterval==1 ? operation : "Intended-" + operation; + m = constructOneMeasurement(name); + OneMeasurement oldM = _opToIntendedMesurementMap.putIfAbsent(operation, m); + if(oldM != null) + { + m = oldM; + } + } + return m; + } + + /** + * Report a return code for a single DB operation. + */ + public void reportStatus(final String operation, final Status status) + { + OneMeasurement m = _measurementInterval==1 ? + getOpIntendedMeasurement(operation) : + getOpMeasurement(operation); + m.reportStatus(status); + } + /** * Export the current measurements to a suitable format. - * + * * @param exporter Exporter representing the type of format to write to. * @throws IOException Thrown if the export failed. */ public void exportMeasurements(MeasurementsExporter exporter) throws IOException { - for (OneMeasurement measurement : data.values()) + for (OneMeasurement measurement : _opToMesurementMap.values()) + { + measurement.exportMeasurements(exporter); + } + for (OneMeasurement measurement : _opToIntendedMesurementMap.values()) { measurement.exportMeasurements(exporter); } } - - /** - * Return a one line summary of the measurements. - */ - public String getSummary() - { - String ret=""; - for (OneMeasurement m : data.values()) - { - ret+=m.getSummary()+" "; - } - - return ret; - } + + /** + * Return a one line summary of the measurements. + */ + public synchronized String getSummary() + { + String ret=""; + for (OneMeasurement m : _opToMesurementMap.values()) + { + ret += m.getSummary()+" "; + } + for (OneMeasurement m : _opToIntendedMesurementMap.values()) + { + ret += m.getSummary()+" "; + } + return ret; + } + } 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 90720ef490d2caeaa2c5605e686aa80083ffad20..8d4d22da2754712d95c91e352012cd3c15f0f783 100644 --- a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurement.java +++ b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurement.java @@ -1,55 +1,81 @@ -/** - * 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.measurements; - -import java.io.IOException; - -import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; - -/** - * A single measured metric (such as READ LATENCY) - */ -public abstract class OneMeasurement { - - String _name; - - public String getName() { - return _name; - } - - /** - * @param _name - */ - public OneMeasurement(String _name) { - this._name = _name; - } - - public abstract void reportReturnCode(int code); - - public abstract void measure(int latency); - - public abstract String getSummary(); - - /** - * Export the current measurements to a suitable format. - * - * @param exporter Exporter representing the type of format to write to. - * @throws IOException Thrown if the export failed. - */ - public abstract void exportMeasurements(MeasurementsExporter exporter) throws IOException; -} +/** + * 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.measurements; + +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; + +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * A single measured metric (such as READ LATENCY) + */ +public abstract class OneMeasurement { + + private final String _name; + private final ConcurrentHashMap<Status, AtomicInteger> _returncodes; + + public String getName() { + return _name; + } + + /** + * @param _name + */ + public OneMeasurement(String _name) { + this._name = _name; + this._returncodes = new ConcurrentHashMap<Status, AtomicInteger>(); + } + + public abstract void measure(int latency); + + public abstract String getSummary(); + + /** + * No need for synchronization, using CHM to deal with that + */ + public void reportStatus(Status status) { + AtomicInteger counter = _returncodes.get(status); + + if (counter == null) { + AtomicInteger other = _returncodes.putIfAbsent(status, counter = new AtomicInteger()); + if (other != null) { + counter = other; + } + } + + counter.incrementAndGet(); + } + + /** + * Export the current measurements to a suitable format. + * + * @param exporter Exporter representing the type of format to write to. + * @throws IOException Thrown if the export failed. + */ + 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 new file mode 100644 index 0000000000000000000000000000000000000000..a88c2b81a97f297f0e8295e7bf7cf36fcd6c6f8c --- /dev/null +++ b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHdrHistogram.java @@ -0,0 +1,200 @@ +/** + * 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.measurements; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.text.DecimalFormat; +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; + +import org.HdrHistogram.Histogram; +import org.HdrHistogram.HistogramLogWriter; +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. + * + * @author nitsanw + * + */ +public class OneMeasurementHdrHistogram extends OneMeasurement { + + // we need one log per measurement histogram + final PrintStream log; + final HistogramLogWriter histogramLogWriter; + + 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; + histogramLogWriter = null; + } else { + try { + final String hdrOutputFilename = props.getProperty("hdrhistogram.output.path", "") + name + ".hdr"; + log = new PrintStream(new FileOutputStream(hdrOutputFilename), false); + } catch (FileNotFoundException e) { + throw new RuntimeException("Failed to open hdr histogram output file", e); + } + histogramLogWriter = new HistogramLogWriter(log); + histogramLogWriter.outputComment("[Logging for: " + name + "]"); + histogramLogWriter.outputLogFormatVersion(); + long now = System.currentTimeMillis(); + histogramLogWriter.outputStartTime(now); + histogramLogWriter.setBaseTime(now); + histogramLogWriter.outputLegend(); + } + histogram = new Recorder(3); + } + + /** + * It appears latency is reported in micros. + * Using {@link Recorder} to support concurrent updates to histogram. + * + * @see com.yahoo.ycsb.OneMeasurement#measure(int) + */ + public void measure(int latencyInMicros) { + histogram.recordValue(latencyInMicros); + } + + /** + * This is called from a main thread, on orderly termination. + * + * @see com.yahoo.ycsb.measurements.OneMeasurement#exportMeasurements(com.yahoo.ycsb.measurements.exporter.MeasurementsExporter) + */ + @Override + public void exportMeasurements(MeasurementsExporter exporter) throws IOException { + // accumulate the last interval which was not caught by status thread + Histogram intervalHistogram = getIntervalHistogramAndAccumulate(); + if (histogramLogWriter != null) { + histogramLogWriter.outputIntervalHistogram(intervalHistogram); + // we can close now + log.close(); + } + exporter.write(getName(), "Operations", totalHistogram.getTotalCount()); + exporter.write(getName(), "AverageLatency(us)", totalHistogram.getMean()); + exporter.write(getName(), "MinLatency(us)", totalHistogram.getMinValue()); + exporter.write(getName(), "MaxLatency(us)", totalHistogram.getMaxValue()); + + 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); + } + + 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); + } + 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 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 a929fec845744f857fb8f25f964a6bb40e36357f..7660cd3e27f532f087efb1075fe90d1edd153c01 100644 --- a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHistogram.java +++ b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHistogram.java @@ -1,200 +1,177 @@ -/** - * 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.measurements; - -import java.io.IOException; -import java.text.DecimalFormat; -import java.util.HashMap; -import java.util.Properties; - -import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; - - -/** - * Take measurements and maintain a histogram of a given metric, such as READ LATENCY. - * - * @author cooperb - * - */ -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; - - int min; - int max; - HashMap<Integer,int[]> returncodes; - - public OneMeasurementHistogram(String name, Properties props) - { - super(name); - _buckets=Integer.parseInt(props.getProperty(BUCKETS, BUCKETS_DEFAULT)); - histogram=new int[_buckets]; - histogramoverflow=0; - operations=0; - totallatency=0; - totalsquaredlatency=0; - windowoperations=0; - windowtotallatency=0; - min=-1; - max=-1; - returncodes=new HashMap<Integer,int[]>(); - } - - /* (non-Javadoc) - * @see com.yahoo.ycsb.OneMeasurement#reportReturnCode(int) - */ - public synchronized void reportReturnCode(int code) - { - Integer Icode=code; - if (!returncodes.containsKey(Icode)) - { - int[] val=new int[1]; - val[0]=0; - returncodes.put(Icode,val); - } - returncodes.get(Icode)[0]++; - } - - - /* (non-Javadoc) - * @see com.yahoo.ycsb.OneMeasurement#measure(int) - */ - public synchronized void measure(int latency) - { - //latency reported in us and collected in bucket by ms. - if (latency/1000>=_buckets) - { - histogramoverflow++; - } - else - { - histogram[latency/1000]++; - } - operations++; - totallatency += latency/1000; - totalsquaredlatency += ((double)latency) * ((double)latency) / 1000000; - windowoperations++; - windowtotallatency += latency; - - if ( (min<0) || (latency<min) ) - { - min=latency; - } - - if ( (max<0) || (latency>max) ) - { - max=latency; - } - } - - - @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(ms)", mean); - exporter.write(getName(), "LatencyVariance(ms)", variance); - exporter.write(getName(), "MinLatency(us)", min); - exporter.write(getName(), "MaxLatency(us)", max); - - int opcounter=0; - boolean done95th=false; - for (int i=0; i<_buckets; i++) - { - opcounter+=histogram[i]; - if ( (!done95th) && (((double)opcounter)/((double)operations)>=0.95) ) - { - exporter.write(getName(), "95thPercentileLatency(ms)", i); - done95th=true; - } - if (((double)opcounter)/((double)operations)>=0.99) - { - exporter.write(getName(), "99thPercentileLatency(ms)", i); - break; - } - } - - for (Integer I : returncodes.keySet()) - { - int[] val=returncodes.get(I); - exporter.write(getName(), "Return="+I, val[0]); - } - - for (int i=0; i<_buckets; i++) - { - exporter.write(getName(), Integer.toString(i), histogram[i]); - } - exporter.write(getName(), ">"+_buckets, histogramoverflow); - } - - @Override - public String getSummary() { - if (windowoperations==0) - { - return ""; - } - DecimalFormat d = new DecimalFormat("#.##"); - double report=((double)windowtotallatency)/((double)windowoperations); - windowtotallatency=0; - windowoperations=0; - return "["+getName()+" AverageLatency(us)="+d.format(report)+"]"; - } - -} +/** + * 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.measurements; + +import java.io.IOException; +import java.text.DecimalFormat; +import java.util.Properties; + +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; + + +/** + * Take measurements and maintain a histogram of a given metric, such as READ LATENCY. + * + * @author cooperb + * + */ +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; + + int min; + int max; + + public OneMeasurementHistogram(String name, Properties props) + { + super(name); + _buckets=Integer.parseInt(props.getProperty(BUCKETS, BUCKETS_DEFAULT)); + histogram=new int[_buckets]; + histogramoverflow=0; + operations=0; + totallatency=0; + totalsquaredlatency=0; + windowoperations=0; + windowtotallatency=0; + min=-1; + max=-1; + } + + /* (non-Javadoc) + * @see com.yahoo.ycsb.OneMeasurement#measure(int) + */ + public synchronized void measure(int latency) + { + //latency reported in us and collected in bucket by ms. + if (latency/1000>=_buckets) + { + histogramoverflow++; + } + else + { + histogram[latency/1000]++; + } + operations++; + totallatency += latency/1000; + totalsquaredlatency += ((double)latency) * ((double)latency) / 1000000; + windowoperations++; + windowtotallatency += latency; + + if ( (min<0) || (latency<min) ) + { + min=latency; + } + + if ( (max<0) || (latency>max) ) + { + max=latency; + } + } + + @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(ms)", mean); + exporter.write(getName(), "LatencyVariance(ms)", variance); + exporter.write(getName(), "MinLatency(us)", min); + exporter.write(getName(), "MaxLatency(us)", max); + + int opcounter=0; + boolean done95th=false; + for (int i=0; i<_buckets; i++) + { + opcounter+=histogram[i]; + if ( (!done95th) && (((double)opcounter)/((double)operations)>=0.95) ) + { + exporter.write(getName(), "95thPercentileLatency(us)", i*1000); + done95th=true; + } + if (((double)opcounter)/((double)operations)>=0.99) + { + exporter.write(getName(), "99thPercentileLatency(us)", i*1000); + break; + } + } + + exportStatusCounts(exporter); + + for (int i=0; i<_buckets; i++) + { + exporter.write(getName(), Integer.toString(i), histogram[i]); + } + exporter.write(getName(), ">"+_buckets, histogramoverflow); + } + + @Override + public String getSummary() { + if (windowoperations==0) + { + return ""; + } + DecimalFormat d = new DecimalFormat("#.##"); + double report=((double)windowtotallatency)/((double)windowoperations); + windowtotallatency=0; + windowoperations=0; + return "["+getName()+" AverageLatency(us)="+d.format(report)+"]"; + } +} 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 25c77b76740feaed3bf134c78b249e4e9146a827..34805bc428b5b872caedc6cc2780ede0395727e8 100644 --- a/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.java +++ b/core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.java @@ -1,179 +1,157 @@ -/** - * 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.measurements; - -import java.io.IOException; -import java.text.DecimalFormat; -import java.util.HashMap; -import java.util.Properties; -import java.util.Vector; - -import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; - -class SeriesUnit -{ - /** - * @param time - * @param average - */ - public SeriesUnit(long time, double average) { - this.time = time; - this.average = average; - } - public long time; - public double average; -} - -/** - * A time series measurement of a metric, such as READ LATENCY. - */ -public class OneMeasurementTimeSeries extends OneMeasurement -{ - /** - * Granularity for time series; measurements will be averaged in chunks of this granularity. Units are milliseconds. - */ - public static final String GRANULARITY="timeseries.granularity"; - - public static final String GRANULARITY_DEFAULT="1000"; - - int _granularity; - Vector<SeriesUnit> _measurements; - - long start=-1; - long currentunit=-1; - int count=0; - int sum=0; - int operations=0; - long totallatency=0; - - //keep a windowed version of these stats for printing status - int windowoperations=0; - long windowtotallatency=0; - - int min=-1; - int max=-1; - - private HashMap<Integer, int[]> returncodes; - - public OneMeasurementTimeSeries(String name, Properties props) - { - super(name); - _granularity=Integer.parseInt(props.getProperty(GRANULARITY,GRANULARITY_DEFAULT)); - _measurements=new Vector<SeriesUnit>(); - returncodes=new HashMap<Integer,int[]>(); - } - - void checkEndOfUnit(boolean forceend) - { - long now=System.currentTimeMillis(); - - if (start<0) - { - currentunit=0; - start=now; - } - - long unit=((now-start)/_granularity)*_granularity; - - if ( (unit>currentunit) || (forceend) ) - { - double avg=((double)sum)/((double)count); - _measurements.add(new SeriesUnit(currentunit,avg)); - - currentunit=unit; - - count=0; - sum=0; - } - } - - @Override - public void measure(int latency) - { - checkEndOfUnit(false); - - count++; - sum+=latency; - totallatency+=latency; - operations++; - windowoperations++; - windowtotallatency+=latency; - - if (latency>max) - { - max=latency; - } - - if ( (latency<min) || (min<0) ) - { - min=latency; - } - } - - - @Override - 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(), "MinLatency(us)", min); - exporter.write(getName(), "MaxLatency(us)", max); - - //TODO: 95th and 99th percentile latency - - for (Integer I : returncodes.keySet()) - { - int[] val=returncodes.get(I); - exporter.write(getName(), "Return="+I, val[0]); - } - - for (SeriesUnit unit : _measurements) - { - exporter.write(getName(), Long.toString(unit.time), unit.average); - } - } - - @Override - public void reportReturnCode(int code) { - Integer Icode=code; - if (!returncodes.containsKey(Icode)) - { - int[] val=new int[1]; - val[0]=0; - returncodes.put(Icode,val); - } - returncodes.get(Icode)[0]++; - - } - - @Override - public String getSummary() { - if (windowoperations==0) - { - return ""; - } - DecimalFormat d = new DecimalFormat("#.##"); - double report=((double)windowtotallatency)/((double)windowoperations); - windowtotallatency=0; - windowoperations=0; - return "["+getName()+" AverageLatency(us)="+d.format(report)+"]"; - } - -} +/** + * 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.measurements; + +import java.io.IOException; +import java.util.Vector; +import java.util.Properties; +import java.text.DecimalFormat; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; + +class SeriesUnit +{ + /** + * @param time + * @param average + */ + public SeriesUnit(long time, double average) { + this.time = time; + this.average = average; + } + public long time; + public double average; +} + +/** + * A time series measurement of a metric, such as READ LATENCY. + */ +public class OneMeasurementTimeSeries extends OneMeasurement +{ + + /** + * Granularity for time series; measurements will be averaged in chunks of this granularity. Units are milliseconds. + */ + public static final String GRANULARITY="timeseries.granularity"; + public static final String GRANULARITY_DEFAULT="1000"; + + int _granularity; + Vector<SeriesUnit> _measurements; + + long start=-1; + long currentunit=-1; + int count=0; + int sum=0; + int operations=0; + long totallatency=0; + + //keep a windowed version of these stats for printing status + int windowoperations=0; + long windowtotallatency=0; + + int min=-1; + int max=-1; + + public OneMeasurementTimeSeries(String name, Properties props) + { + super(name); + _granularity=Integer.parseInt(props.getProperty(GRANULARITY,GRANULARITY_DEFAULT)); + _measurements=new Vector<SeriesUnit>(); + } + + void checkEndOfUnit(boolean forceend) + { + long now=System.currentTimeMillis(); + + if (start<0) + { + currentunit=0; + start=now; + } + + long unit=((now-start)/_granularity)*_granularity; + + if ( (unit>currentunit) || (forceend) ) + { + double avg=((double)sum)/((double)count); + _measurements.add(new SeriesUnit(currentunit,avg)); + + currentunit=unit; + + count=0; + sum=0; + } + } + + @Override + public void measure(int latency) + { + checkEndOfUnit(false); + + count++; + sum+=latency; + totallatency+=latency; + operations++; + windowoperations++; + windowtotallatency+=latency; + + if (latency>max) + { + max=latency; + } + + if ( (latency<min) || (min<0) ) + { + min=latency; + } + } + + + @Override + 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(), "MinLatency(us)", min); + exporter.write(getName(), "MaxLatency(us)", max); + + // TODO: 95th and 99th percentile latency + + exportStatusCounts(exporter); + for (SeriesUnit unit : _measurements) { + exporter.write(getName(), Long.toString(unit.time), unit.average); + } + } + + @Override + public String getSummary() { + if (windowoperations==0) + { + return ""; + } + DecimalFormat d = new DecimalFormat("#.##"); + double report=((double)windowtotallatency)/((double)windowoperations); + windowtotallatency=0; + windowoperations=0; + return "["+getName()+" AverageLatency(us)="+d.format(report)+"]"; + } + +} diff --git a/core/src/main/java/com/yahoo/ycsb/measurements/TwoInOneMeasurement.java b/core/src/main/java/com/yahoo/ycsb/measurements/TwoInOneMeasurement.java new file mode 100644 index 0000000000000000000000000000000000000000..37a385bb177c002171025a7d74e8dec743f6d99f --- /dev/null +++ b/core/src/main/java/com/yahoo/ycsb/measurements/TwoInOneMeasurement.java @@ -0,0 +1,84 @@ +/** + * 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.measurements; + +import com.yahoo.ycsb.Status; +import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter; + +import org.HdrHistogram.Recorder; + +import java.io.IOException; + +/** + * delegates to 2 measurement instances. + * @author nitsanw + * + */ +public class TwoInOneMeasurement extends OneMeasurement { + + final OneMeasurement thing1,thing2; + public TwoInOneMeasurement(String name, OneMeasurement thing1,OneMeasurement thing2) { + super(name); + this.thing1 = thing1; + this.thing2 = thing2; + } + + /** + * No need for synchronization, using CHM to deal with that + * + * @see com.yahoo.ycsb.OneMeasurement#reportStatus(int) + */ + @Override + public void reportStatus(final Status status) { + thing1.reportStatus(status); + } + + /** + * It appears latency is reported in micros. + * Using {@link Recorder} to support concurrent updates to histogram. + * + * @see com.yahoo.ycsb.OneMeasurement#measure(int) + */ + @Override + public void measure(int latencyInMicros) { + thing1.measure(latencyInMicros); + thing2.measure(latencyInMicros); + } + + /** + * This is called from a main thread, on orderly termination. + * + * @see com.yahoo.ycsb.measurements.OneMeasurement#exportMeasurements(com.yahoo.ycsb.measurements.exporter.MeasurementsExporter) + */ + @Override + public void exportMeasurements(MeasurementsExporter exporter) throws IOException { + thing1.exportMeasurements(exporter); + thing2.exportMeasurements(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() { + return thing1.getSummary() + "\n" + thing2.getSummary(); + } + +} diff --git a/core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONArrayMeasurementsExporter.java b/core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONArrayMeasurementsExporter.java new file mode 100644 index 0000000000000000000000000000000000000000..555fb2d493649cfaa5f459602a9afeb14b2e3d88 --- /dev/null +++ b/core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONArrayMeasurementsExporter.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2015 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.measurements.exporter; + +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; + +import org.codehaus.jackson.JsonFactory; +import org.codehaus.jackson.JsonGenerator; +import org.codehaus.jackson.util.DefaultPrettyPrinter; + +/** + * Export measurements into a machine readable JSON Array of measurement objects. + */ +public class JSONArrayMeasurementsExporter implements MeasurementsExporter +{ + + private JsonFactory factory = new JsonFactory(); + private JsonGenerator g; + + public JSONArrayMeasurementsExporter(OutputStream os) throws IOException + { + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os)); + g = factory.createJsonGenerator(bw); + g.setPrettyPrinter(new DefaultPrettyPrinter()); + g.writeStartArray(); + } + + public void write(String metric, String measurement, int i) throws IOException + { + g.writeStartObject(); + g.writeStringField("metric", metric); + g.writeStringField("measurement", measurement); + g.writeNumberField("value", i); + g.writeEndObject(); + } + + public void write(String metric, String measurement, double d) throws IOException + { + g.writeStartObject(); + g.writeStringField("metric", metric); + g.writeStringField("measurement", measurement); + g.writeNumberField("value", d); + g.writeEndObject(); + } + + public void close() throws IOException + { + if (g != null) + { + g.writeEndArray(); + g.close(); + } + } + +} diff --git a/core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONMeasurementsExporter.java b/core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONMeasurementsExporter.java index 0d59dcba77fe39d03575b2c59ddb34c520f24efa..1d8d6523fe318c0f357cc207827db772fa72bf95 100644 --- a/core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONMeasurementsExporter.java +++ b/core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONMeasurementsExporter.java @@ -23,7 +23,7 @@ import java.io.OutputStreamWriter; import org.codehaus.jackson.JsonFactory; import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.impl.DefaultPrettyPrinter; +import org.codehaus.jackson.util.DefaultPrettyPrinter; /** * Export measurements into a machine readable JSON file. 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 29c967c99b31ee467ee8594b68458f4ad1027d6e..dae00473937854af88010af14a23193df813e0d5 100644 --- a/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java +++ b/core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java @@ -18,7 +18,9 @@ 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; @@ -37,6 +39,9 @@ import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.Vector; +import java.util.List; +import java.util.Map; +import java.util.ArrayList; /** * The core benchmark scenario. Represents a set of clients doing simple CRUD operations. The relative @@ -88,6 +93,8 @@ public class CoreWorkload extends Workload 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". * @@ -148,6 +155,23 @@ public class CoreWorkload extends Workload boolean writeallfields; + /** + * The name of the property for deciding whether to check all returned + * data against the formation template to ensure data integrity. + */ + public static final String DATA_INTEGRITY_PROPERTY = "dataintegrity"; + + /** + * The default value for the dataintegrity property. + */ + public static final String DATA_INTEGRITY_PROPERTY_DEFAULT = "false"; + + /** + * Set to true if want to check correctness of reads. Must also + * be set to true during loading phase to function. + */ + private boolean dataintegrity; + /** * The name of the property for the proportion of transactions that are reads. */ @@ -266,13 +290,15 @@ public class CoreWorkload extends Workload Generator fieldchooser; - CounterGenerator transactioninsertkeysequence; + AcknowledgedCounterGenerator transactioninsertkeysequence; IntegerGenerator scanlength; boolean orderedinserts; int recordcount; + + private Measurements _measurements = Measurements.getMeasurements(); protected static IntegerGenerator getFieldLengthGenerator(Properties p) throws WorkloadException{ IntegerGenerator fieldlengthgenerator; @@ -306,6 +332,10 @@ public class CoreWorkload extends Workload 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); + } fieldlengthgenerator = CoreWorkload.getFieldLengthGenerator(p); double readproportion=Double.parseDouble(p.getProperty(READ_PROPORTION_PROPERTY,READ_PROPORTION_PROPERTY_DEFAULT)); @@ -313,7 +343,9 @@ public class CoreWorkload extends Workload 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)); + 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); @@ -323,6 +355,15 @@ public class CoreWorkload extends Workload 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; @@ -367,7 +408,7 @@ public class CoreWorkload extends Workload operationchooser.addValue(readmodifywriteproportion,"READMODIFYWRITE"); } - transactioninsertkeysequence=new CounterGenerator(recordcount); + transactioninsertkeysequence=new AcknowledgedCounterGenerator(recordcount); if (requestdistrib.compareTo("uniform")==0) { keychooser=new UniformIntegerGenerator(0,recordcount-1); @@ -427,25 +468,62 @@ public class CoreWorkload extends Workload } return "user"+keynum; } - HashMap<String, ByteIterator> buildValues() { - HashMap<String,ByteIterator> values=new HashMap<String,ByteIterator>(); + + /** + * Builds a value for a randomly chosen field. + */ + private HashMap<String, ByteIterator> buildSingleValue(String key) { + HashMap<String,ByteIterator> value = new HashMap<String,ByteIterator>(); + + String fieldkey = fieldnames.get(Integer.parseInt(fieldchooser.nextString())); + ByteIterator data; + if (dataintegrity) { + data = new StringByteIterator(buildDeterministicValue(key, fieldkey)); + } else { + //fill with random data + data = new RandomByteIterator(fieldlengthgenerator.nextInt()); + } + value.put(fieldkey,data); - for (int i=0; i<fieldcount; i++) - { - String fieldkey="field"+i; - ByteIterator data= new RandomByteIterator(fieldlengthgenerator.nextInt()); - values.put(fieldkey,data); - } - return values; - } - HashMap<String, ByteIterator> buildUpdate() { - //update a random field - HashMap<String, ByteIterator> values=new HashMap<String,ByteIterator>(); - String fieldname="field"+fieldchooser.nextString(); - ByteIterator data = new RandomByteIterator(fieldlengthgenerator.nextInt()); - values.put(fieldname,data); - return values; - } + return value; + } + + /** + * Builds values for all fields. + */ + 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()); + } + values.put(fieldkey,data); + } + return values; + } + + /** + * Build a deterministic value given the key information. + */ + private String buildDeterministicValue(String key, String fieldkey) { + int size = fieldlengthgenerator.nextInt(); + 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(); + } /** * Do one insert operation. Because it will be called concurrently from multiple client threads, this @@ -457,8 +535,8 @@ public class CoreWorkload extends Workload { int keynum=keysequence.nextInt(); String dbkey = buildKeyName(keynum); - HashMap<String, ByteIterator> values = buildValues(); - if (db.insert(table,dbkey,values) == 0) + HashMap<String, ByteIterator> values = buildValues(dbkey); + if (db.insert(table,dbkey,values).equals(Status.OK)) return true; else return false; @@ -498,6 +576,33 @@ public class CoreWorkload extends Workload return true; } + /** + * Results are reported in the first three buckets of the histogram under + * 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. + */ + 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()))) { + verifyStatus = Status.UNEXPECTED_STATE; + break; + } + } + } else { + //This assumes that null data is never valid + verifyStatus = Status.ERROR; + } + long endTime = System.nanoTime(); + _measurements.measure("VERIFY", (int) (endTime - startTime) / 1000); + _measurements.reportStatus("VERIFY",verifyStatus); + } + int nextKeynum() { int keynum; if(keychooser instanceof ExponentialGenerator) { @@ -528,13 +633,22 @@ public class CoreWorkload extends Workload if (!readallfields) { //read a random field - String fieldname="field"+fieldchooser.nextString(); + String fieldname=fieldnames.get(Integer.parseInt(fieldchooser.nextString())); 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); - db.read(table,keyname,fields,new HashMap<String,ByteIterator>()); + if (dataintegrity) { + verifyRow(keyname, cells); + } } public void doTransactionReadModifyWrite(DB db) @@ -549,7 +663,7 @@ public class CoreWorkload extends Workload if (!readallfields) { //read a random field - String fieldname="field"+fieldchooser.nextString(); + String fieldname=fieldnames.get(Integer.parseInt(fieldchooser.nextString())); fields=new HashSet<String>(); fields.add(fieldname); @@ -560,25 +674,34 @@ public class CoreWorkload extends Workload if (writeallfields) { //new data for all the fields - values = buildValues(); + values = buildValues(keyname); } else { //update a random field - values = buildUpdate(); + values = buildSingleValue(keyname); } //do the transaction - - long st=System.nanoTime(); - db.read(table,keyname,fields,new HashMap<String,ByteIterator>()); + 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(); - - Measurements.getMeasurements().measure("READ-MODIFY-WRITE", (int)((en-st)/1000)); + + 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) @@ -596,7 +719,7 @@ public class CoreWorkload extends Workload if (!readallfields) { //read a random field - String fieldname="field"+fieldchooser.nextString(); + String fieldname=fieldnames.get(Integer.parseInt(fieldchooser.nextString())); fields=new HashSet<String>(); fields.add(fieldname); @@ -617,12 +740,12 @@ public class CoreWorkload extends Workload if (writeallfields) { //new data for all the fields - values = buildValues(); + values = buildValues(keyname); } else { //update a random field - values = buildUpdate(); + values = buildSingleValue(keyname); } db.update(table,keyname,values); @@ -633,9 +756,13 @@ public class CoreWorkload extends Workload //choose the next key int keynum=transactioninsertkeysequence.nextInt(); - String dbkey = buildKeyName(keynum); + try { + String dbkey = buildKeyName(keynum); - HashMap<String, ByteIterator> values = buildValues(); - db.insert(table,dbkey,values); + 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/TestByteIterator.java b/core/src/test/java/com/yahoo/ycsb/TestByteIterator.java index b95415b09a89e15540983694a7c53ea1870116ce..7edbc947d27061f4e9be1ae4db0661bfe1224e99 100644 --- a/core/src/test/java/com/yahoo/ycsb/TestByteIterator.java +++ b/core/src/test/java/com/yahoo/ycsb/TestByteIterator.java @@ -1,3 +1,20 @@ +/** + * Copyright (c) 2012 YCSB contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You + * may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. See accompanying + * LICENSE file. + */ + package com.yahoo.ycsb; import org.testng.annotations.Test; 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..54e02322cbbb53d44d8a2a6e2dd84b974ee9edfb --- /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.nextInt(); + + 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 new file mode 100644 index 0000000000000000000000000000000000000000..4b7cc2a43ec606dc000684e8e0a907da0a50bb7e --- /dev/null +++ b/core/src/test/java/com/yahoo/ycsb/generator/TestZipfianGenerator.java @@ -0,0 +1,39 @@ +/** + * 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.generator; + +import org.testng.annotations.Test; + +import static org.testng.AssertJUnit.assertFalse; + + +public class TestZipfianGenerator { + @Test + public void testMinAndMaxParameter() { + long min = 5; + long max = 10; + ZipfianGenerator zipfian = new ZipfianGenerator(min, max); + + for (int i = 0; i < 10000; i++) { + long rnd = zipfian.nextLong(); + 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 new file mode 100644 index 0000000000000000000000000000000000000000..1d24f9ae34f73ada9dbe72ff036335d475e367fa --- /dev/null +++ b/core/src/test/java/com/yahoo/ycsb/measurements/exporter/TestMeasurementsExporter.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2015 Yahoo! Inc. 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.measurements.exporter; + +import com.yahoo.ycsb.generator.ZipfianGenerator; +import com.yahoo.ycsb.measurements.Measurements; +import org.codehaus.jackson.JsonNode; +import org.codehaus.jackson.map.ObjectMapper; +import org.testng.annotations.Test; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.Properties; + +import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertTrue; + +public class TestMeasurementsExporter { + @Test + public void testJSONArrayMeasurementsExporter() throws IOException { + 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); + + long min = 5000; + long max = 100000; + ZipfianGenerator zipfian = new ZipfianGenerator(min, max); + for (int i = 0; i < 1000; i++) { + int rnd = zipfian.nextInt(); + mm.measure("UPDATE", rnd); + } + mm.exportMeasurements(export); + export.close(); + + ObjectMapper mapper = new ObjectMapper(); + JsonNode json = mapper.readTree(out.toString("UTF-8")); + assertTrue(json.isArray()); + assertEquals(json.get(0).get("measurement").asText(), "Operations"); + 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 new file mode 100644 index 0000000000000000000000000000000000000000..4004cb7f0521d6c760144b85ba1c8ba18346285b --- /dev/null +++ b/couchbase/README.md @@ -0,0 +1,67 @@ +<!-- +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. +--> + +# Couchbase Driver for YCSB +This driver is a binding for the YCSB facilities to operate against a Couchbase Server cluster. It uses the official Couchbase Java SDK and provides a rich set of configuration options. + +## Quickstart + +### 1. Start Couchbase Server +You need to start a single node or a cluster to point the client at. Please see [http://couchbase.com](couchbase.com) for more details and instructions. + +### 2. Set up YCSB +You need to clone the repository and compile everything. + +``` +git clone git://github.com/brianfrankcooper/YCSB.git +cd YCSB +mvn clean package +``` + +### 3. Run the Workload +Before you can actually run the workload, you need to "load" the data first. + +``` +bin/ycsb load couchbase -s -P workloads/workloada +``` + +Then, you can run the workload: + +``` +bin/ycsb run couchbase -s -P workloads/workloada +``` + +Please see the general instructions in the `doc` folder if you are not sure how it all works. You can apply a property (as seen in the next section) like this: + +``` +bin/ycsb run couchbase -s -P workloads/workloada -p couchbase.useJson=false +``` + +## 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. + +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.json=true => Use json or java serialization as target format. + diff --git a/couchbase/pom.xml b/couchbase/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..05d6ef66d17a26a35c3a3f5eb7d6b9030d054f1f --- /dev/null +++ b/couchbase/pom.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> + +<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.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> + </parent> + + <artifactId>couchbase-binding</artifactId> + <name>Couchbase Binding</name> + <packaging>jar</packaging> + + <dependencies> + <dependency> + <groupId>couchbase</groupId> + <artifactId>couchbase-client</artifactId> + <version>${couchbase.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.2.2</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <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 new file mode 100644 index 0000000000000000000000000000000000000000..fb29c456006770257dcc66c4f0667d0bd3234c8e --- /dev/null +++ b/couchbase/src/main/java/com/yahoo/ycsb/db/CouchbaseClient.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) 2013 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.fasterxml.jackson.core.JsonFactory; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +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.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"; + public static final String CHECKF_PROPERTY = "couchbase.checkFutures"; + public static final String PERSIST_PROPERTY = "couchbase.persistTo"; + public static final String REPLICATE_PROPERTY = "couchbase.replicateTo"; + public static final String JSON_PROPERTY = "couchbase.json"; + + protected static final ObjectMapper JSON_MAPPER = new ObjectMapper(); + + private com.couchbase.client.CouchbaseClient client; + private PersistTo persistTo; + private ReplicateTo replicateTo; + private boolean checkFutures; + private boolean useJson; + private final Logger log = LoggerFactory.getLogger(getClass()); + + @Override + public void init() throws DBException { + Properties props = getProperties(); + + String url = props.getProperty(URL_PROPERTY, "http://127.0.0.1:8091/pools"); + String bucket = props.getProperty(BUCKET_PROPERTY, "default"); + String password = props.getProperty(PASSWORD_PROPERTY, ""); + + checkFutures = props.getProperty(CHECKF_PROPERTY, "true").equals("true"); + useJson = props.getProperty(JSON_PROPERTY, "true").equals("true"); + + persistTo = parsePersistTo(props.getProperty(PERSIST_PROPERTY, "0")); + replicateTo = parseReplicateTo(props.getProperty(REPLICATE_PROPERTY, "0")); + + 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 + ); + } catch (Exception e) { + throw new DBException("Could not create CouchbaseClient object.", e); + } + } + + /** + * Parse the replicate property into the correct enum. + * + * @param property the stringified property value. + * @throws DBException if parsing the property did fail. + * @return the correct enum. + */ + private ReplicateTo parseReplicateTo(final String property) throws DBException { + 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"); + } + } + + /** + * Parse the persist property into the correct enum. + * + * @param property the stringified property value. + * @throws DBException if parsing the property did fail. + * @return the correct enum. + */ + private PersistTo parsePersistTo(final String property) throws DBException { + 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"); + } + } + + /** + * Shutdown the client. + */ + @Override + public void cleanup() { + client.shutdown(); + } + + @Override + 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 Status.ERROR; + } + + decode(loaded, fields, result); + return Status.OK; + } catch (Exception e) { + if (log.isErrorEnabled()) { + log.error("Could not read value for key " + formattedKey, e); + } + 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 Status.ERROR, because not implemented yet. + */ + @Override + public Status scan(final String table, final String startkey, final int recordcount, + final Set<String> fields, final Vector<HashMap<String, ByteIterator>> result) { + return Status.ERROR; + } + + @Override + 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 + ); + return checkFutureStatus(future); + } catch (Exception e) { + if (log.isErrorEnabled()) { + log.error("Could not update value for key " + formattedKey, e); + } + return Status.ERROR; + } + } + + @Override + 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 + ); + return checkFutureStatus(future); + } catch (Exception e) { + if (log.isErrorEnabled()) { + log.error("Could not insert value for key " + formattedKey, e); + } + return Status.ERROR; + } + } + + @Override + public Status delete(final String table, final String key) { + String formattedKey = formatKey(table, key); + + try { + final OperationFuture<Boolean> future = client.delete(formattedKey, persistTo, replicateTo); + return checkFutureStatus(future); + } catch (Exception e) { + if (log.isErrorEnabled()) { + log.error("Could not delete value for key " + formattedKey, e); + } + return Status.ERROR; + } + } + + /** + * Prefix the key with the given prefix, to establish a unique namespace. + * + * @param prefix the prefix to use. + * @param key the actual key. + * @return the formatted and prefixed key. + */ + private String formatKey(final String prefix, final String key) { + return prefix + ":" + key; + } + + /** + * Wrapper method that either inspects the future or not. + * + * @param future the future to potentially verify. + * @return the status of the future result. + */ + private Status checkFutureStatus(final OperationFuture<?> future) { + if (checkFutures) { + return future.getStatus().isSuccess() ? Status.OK : Status.ERROR; + } else { + return Status.OK; + } + } + + /** + * Decode the object from server into the storable result. + * + * @param source the loaded object. + * @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) { + if (useJson) { + try { + JsonNode json = JSON_MAPPER.readTree((String) source); + boolean checkFields = fields != null && fields.size() > 0; + for (Iterator<Map.Entry<String, JsonNode>> jsonFields = json.fields(); jsonFields.hasNext();) { + 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()) { + dest.put(name, new StringByteIterator(jsonValue.asText())); + } + } + } catch (Exception e) { + throw new RuntimeException("Could not decode JSON"); + } + } else { + HashMap<String, String> converted = (HashMap<String, String>) source; + for (Map.Entry<String, String> entry : converted.entrySet()) { + dest.put(entry.getKey(), new StringByteIterator(entry.getValue())); + } + } + } + + /** + * Encode the object for couchbase storage. + * + * @param source the source value. + * @return the storable object. + */ + private Object encode(final HashMap<String, ByteIterator> source) { + HashMap<String, String> stringMap = StringByteIterator.getStringMap(source); + if (!useJson) { + return stringMap; + } + + ObjectNode node = JSON_MAPPER.createObjectNode(); + for (Map.Entry<String, String> pair : stringMap.entrySet()) { + node.put(pair.getKey(), pair.getValue()); + } + JsonFactory jsonFactory = new JsonFactory(); + Writer writer = new StringWriter(); + try { + JsonGenerator jsonGenerator = jsonFactory.createGenerator(writer); + JSON_MAPPER.writeTree(jsonGenerator, node); + } catch (Exception e) { + throw new RuntimeException("Could not encode JSON value"); + } + return writer.toString(); + } + + +} diff --git a/distribution/pom.xml b/distribution/pom.xml index de72268ddccd23be357aa972aa2bd63041a5f1fd..9c11636af9d992b493c94b5f8d6509cc1dcb90c8 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -1,11 +1,27 @@ -<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/xsd/maven-4.0.0.xsd"> +<!-- +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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.yahoo.ycsb</groupId> <artifactId>root</artifactId> - <version>0.1.4</version> + <version>0.6.0-SNAPSHOT</version> </parent> <artifactId>ycsb</artifactId> @@ -17,7 +33,115 @@ It is only used by the build process and does not contain any real code of itself. </description> - + <dependencies> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>accumulo-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>aerospike-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>cassandra-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>couchbase-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>dynamodb-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>elasticsearch-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>gemfire-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <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> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>hypertable-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>infinispan-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <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>mongodb-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>orientdb-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>redis-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>tarantool-binding</artifactId> + <version>${project.version}</version> + </dependency> +<!-- + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>voldemort-binding</artifactId> + <version>${project.version}</version> + </dependency> +--> + </dependencies> <build> <plugins> <plugin> @@ -29,6 +153,7 @@ <descriptor>src/main/assembly/distribution.xml</descriptor> </descriptors> <appendAssemblyId>false</appendAssemblyId> + <tarLongFileMode>posix</tarLongFileMode> </configuration> <executions> <execution> diff --git a/distribution/src/main/assembly/distribution.xml b/distribution/src/main/assembly/distribution.xml index 4715e71fc1801fda2e315686530e263330bf2995..618cee5cc5bd7e0f99e2fc6b087d32a308f56c7c 100644 --- a/distribution/src/main/assembly/distribution.xml +++ b/distribution/src/main/assembly/distribution.xml @@ -1,3 +1,20 @@ +<!-- +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. +--> + <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> <id>package</id> @@ -12,7 +29,6 @@ <fileMode>0644</fileMode> <includes> <include>README</include> - <include>CHANGELOG</include> <include>LICENSE.txt</include> <include>NOTICE.txt</include> </includes> @@ -21,6 +37,9 @@ <directory>../bin</directory> <outputDirectory>bin</outputDirectory> <fileMode>0755</fileMode> + <includes> + <include>ycsb</include> + </includes> </fileSet> <fileSet> <directory>../workloads</directory> @@ -28,36 +47,52 @@ <fileMode>0644</fileMode> </fileSet> </fileSets> + <dependencySets> + <dependencySet> + <outputDirectory>lib</outputDirectory> + <includes> + <include>com.yahoo.ycsb:core</include> + </includes> + <scope>runtime</scope> + <useProjectArtifact>false</useProjectArtifact> + <useProjectAttachments>false</useProjectAttachments> + <useTransitiveDependencies>true</useTransitiveDependencies> + <useTransitiveFiltering>true</useTransitiveFiltering> + </dependencySet> + </dependencySets> <moduleSets> <moduleSet> <useAllReactorProjects>true</useAllReactorProjects> <includeSubModules>true</includeSubModules> + <excludes> + <exclude>com.yahoo.ycsb:core</exclude> + <exclude>com.yahoo.ycsb:binding-parent</exclude> + <exclude>com.yahoo.ycsb:datastore-specific-descriptor</exclude> + <exclude>com.yahoo.ycsb:ycsb</exclude> + <exclude>com.yahoo.ycsb:root</exclude> + </excludes> <sources> - <includeModuleDirectory>true</includeModuleDirectory> - <fileSets> <fileSet> - <directory>.</directory> - <fileMode>0644</fileMode> - <includes> - <include>README</include> + <includes> + <include>README.md</include> </includes> </fileSet> <fileSet> - <directory>src/main/conf</directory> <outputDirectory>conf</outputDirectory> - <fileMode>0644</fileMode> + <directory>src/main/conf</directory> </fileSet> - <fileSet> + <fileSet> <outputDirectory>lib</outputDirectory> - <directory>target</directory> - <includes> - <include>*.jar</include> - </includes> - <fileMode>0644</fileMode> + <directory>target/dependency</directory> </fileSet> </fileSets> </sources> + <binaries> + <includeDependencies>false</includeDependencies> + <outputDirectory>${module.artifactId}/lib</outputDirectory> + <unpack>false</unpack> + </binaries> </moduleSet> </moduleSets> </assembly> diff --git a/doc/coreproperties.html b/doc/coreproperties.html index 81b2ede066e7e4f2fef6fa080b0e4f2db0fad6e1..a03e967357a30b70d2416613168648a05dedd241 100644 --- a/doc/coreproperties.html +++ b/doc/coreproperties.html @@ -1,4 +1,21 @@ <HTML> +<!-- +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. +--> + <HEAD> <TITLE>YCSB - Core workload package properties</TITLE> </HEAD> diff --git a/doc/coreworkloads.html b/doc/coreworkloads.html index d039ac86fb1b477e9828544efd360842830d5a6f..e6f195a867816706b484ba4d1499b4f3de56a2ad 100644 --- a/doc/coreworkloads.html +++ b/doc/coreworkloads.html @@ -1,4 +1,21 @@ <HTML> +<!-- +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. +--> + <HEAD> <TITLE>YCSB - Core workloads</TITLE> </HEAD> diff --git a/doc/dblayer.html b/doc/dblayer.html index 35cdfdbf299ab479b9ac8a4c55e0b6263fd374fb..e75b68149e66d4aeaa4779c66ee41831d335c7cc 100644 --- a/doc/dblayer.html +++ b/doc/dblayer.html @@ -1,4 +1,21 @@ <HTML> +<!-- +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. +--> + <HEAD> <TITLE>YCSB - DB Interface Layer</TITLE> </HEAD> diff --git a/doc/index.html b/doc/index.html index 0aeb3eef1483cbfd6214896cfcd6cafa140a91b4..6e2a20dbb2a6fdb9a446942935c31b6eb6e6f1f9 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,4 +1,21 @@ <html> +<!-- +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. +--> + <head> <title>YCSB - Yahoo! Cloud Serving Benchmark</title> </head> 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/doc/parallelclients.html b/doc/parallelclients.html index 4735bb5ba399d993e9afd2a2b3be2d4df1ca362e..3de79caca3a115eb8a2847cfb7496b5e1594644b 100644 --- a/doc/parallelclients.html +++ b/doc/parallelclients.html @@ -1,4 +1,21 @@ <HTML> +<!-- +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. +--> + <HEAD> <TITLE>YCSB - Parallel clients</TITLE> </HEAD> diff --git a/doc/tipsfaq.html b/doc/tipsfaq.html index 27f4a5e9ea5f330e8349cf40349cdbeb1e56fbbd..3bd5a590356046ff2f53cf73327a9dcd24baccc1 100644 --- a/doc/tipsfaq.html +++ b/doc/tipsfaq.html @@ -1,4 +1,21 @@ <HTML> +<!-- +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. +--> + <HEAD> <TITLE>YCSB - Tips and FAQ</TITLE> </HEAD> diff --git a/doc/workload.html b/doc/workload.html index 305d0204fcfa960f5020e4beddbf89476f7f0e78..02c41e92222e9f569d6fe201ae7cd7df0e99620c 100644 --- a/doc/workload.html +++ b/doc/workload.html @@ -1,4 +1,21 @@ <HTML> +<!-- +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. +--> + <HEAD> <TITLE>YCSB - Implementing new workloads</TITLE> </HEAD> diff --git a/dynamodb/README b/dynamodb/README.md similarity index 55% rename from dynamodb/README rename to dynamodb/README.md index 798d8cf3c7b49e271588142ba2b546928aec5cba..61455ed919c6a7e9c98f8abcfe6cb035877e4b09 100644 --- a/dynamodb/README +++ b/dynamodb/README.md @@ -1,19 +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 -BENCHMARK +http://www.apache.org/licenses/LICENSE-2.0 -$YCSB_HOME/bin/ycsb load dynamodb -P worklaods/workloada -P dynamodb.properties -$YCSB_HOME/bin/ycsb run dynamodb -P worklaods/workloada -P dynamodb.properties +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. +--> -PROPERTIES +# DynamoDB Binding -$DYNAMODB_HOME/conf/dynamodb.properties -$DYNAMODB_HOME/conf/AWSCredentials.properties +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 + + $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 + + $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 @@ -24,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 @@ -40,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/AWSCredentials.properties b/dynamodb/conf/AWSCredentials.properties index dab032a1088f54478cb32fe2b5b772dbabbc7421..e337b391f0c9548ffdc75d564a5a77eb79f419aa 100644 --- a/dynamodb/conf/AWSCredentials.properties +++ b/dynamodb/conf/AWSCredentials.properties @@ -1,3 +1,18 @@ +# Copyright (c) 2012 YCSB contributors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You +# may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. See accompanying +# LICENSE file. + # Fill in your AWS Access Key ID and Secret Access Key # http://aws.amazon.com/security-credentials #accessKey = diff --git a/dynamodb/conf/dynamodb.properties b/dynamodb/conf/dynamodb.properties index 762e55fbce49a56ef71b8af21189146db1991c1d..691e20e80c60281b433d21334832478df05037dd 100644 --- a/dynamodb/conf/dynamodb.properties +++ b/dynamodb/conf/dynamodb.properties @@ -1,3 +1,18 @@ +# Copyright (c) 2012 YCSB contributors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You +# may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. See accompanying +# LICENSE file. + # # Sample property file for Amazon DynamoDB database client @@ -9,15 +24,57 @@ # 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 #dynamodb.endpoint = http://dynamodb.us-east-1.amazonaws.com # Strongly recommended to set to uniform.Refer FAQs in README -#requestdistribution = uniform +#requestdistribution = uniform # Enable/disable debug messages.Defaults to false # "true" or "false" diff --git a/dynamodb/pom.xml b/dynamodb/pom.xml index 9e7f2a97fc2863ffba2b7d5dfd9ef1b9cef15f59..e4f669ff45bee5d281437e63abe58c1d10680602 100644 --- a/dynamodb/pom.xml +++ b/dynamodb/pom.xml @@ -1,10 +1,28 @@ <?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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> <artifactId>dynamodb-binding</artifactId> @@ -25,31 +43,7 @@ <groupId>com.yahoo.ycsb</groupId> <artifactId>core</artifactId> <version>${project.version}</version> + <scope>provided</scope> </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/dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java b/dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java index 9c2f601f01b277d9d2e88349a7338c04100000d0..8da110d5e7d8644bc4522a0d5c5ca363be9be89c 100644 --- a/dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java +++ b/dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java @@ -16,24 +16,12 @@ 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.AmazonClientException; +import com.amazonaws.AmazonServiceException; +import com.amazonaws.ClientConfiguration; 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; @@ -49,30 +37,63 @@ import com.amazonaws.services.dynamodb.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 */ 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); + 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"; + public DynamoDBClient() {} /** * 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); @@ -84,6 +105,7 @@ public class DynamoDBClient extends DB { 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); @@ -104,6 +126,32 @@ 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(); @@ -119,7 +167,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,7 +180,7 @@ 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; @@ -143,11 +191,11 @@ public class DynamoDBClient extends DB { 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 +211,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; @@ -187,7 +235,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(); @@ -200,13 +248,13 @@ public class DynamoDBClient extends DB { } startKey = res.getLastEvaluatedKey(); - } + } - 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,20 +271,26 @@ 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; @@ -244,16 +298,16 @@ public class DynamoDBClient extends DB { res = 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 res.getConsumedCapacityUnits().intValue(); + 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; @@ -262,12 +316,12 @@ public class DynamoDBClient extends DB { res = 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 res.getConsumedCapacityUnits().intValue(); + return Status.OK; } private static Map<String, AttributeValue> createAttributes( @@ -293,8 +347,18 @@ public class DynamoDBClient extends DB { return rItems; } - private static Key createPrimaryKey(String key) { - Key k = new Key().withHashKeyElement(new AttributeValue().withS(key)); + private Key createPrimaryKey(String key) { + Key k; + if (primaryKeyType == PrimaryKeyType.HASH) { + k = new Key().withHashKeyElement(new AttributeValue().withS(key)); + } else if (primaryKeyType == PrimaryKeyType.HASH_AND_RANGE) { + k = new Key() + .withHashKeyElement(new AttributeValue().withS(hashKeyValue)) + .withRangeKeyElement(new AttributeValue().withS(key)); + } else { + throw new RuntimeException("Assertion Error: impossible primary key" + + " type"); + } return k; } } diff --git a/dynamodb/src/main/resources/log4j.properties b/dynamodb/src/main/resources/log4j.properties index 8b4120f4ad5e8a9297e060319d335428320b8764..a9f3d668b91255d1bb4abe5d37e1f10994eaa5f1 100644 --- a/dynamodb/src/main/resources/log4j.properties +++ b/dynamodb/src/main/resources/log4j.properties @@ -1,3 +1,18 @@ +# Copyright (c) 2012 YCSB contributors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You +# may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. See accompanying +# LICENSE file. + #define the console appender log4j.appender.consoleAppender = org.apache.log4j.ConsoleAppender diff --git a/elasticsearch/README.md b/elasticsearch/README.md new file mode 100644 index 0000000000000000000000000000000000000000..32c6d2b27d59384be47ded52a3071041b99a6554 --- /dev/null +++ b/elasticsearch/README.md @@ -0,0 +1,82 @@ +<!-- +Copyright (c) 2012 YCSB contributors. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You +may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. See accompanying +LICENSE file. +--> + +## Quick Start + +This section describes how to run YCSB on ElasticSearch running locally. + +### 1. Set Up YCSB + +Clone the YCSB git repository and compile: + + git clone git://github.com/brianfrankcooper/YCSB.git + cd YCSB + mvn clean package + +### 2. Run YCSB + +Now you are ready to run! First, load the data: + + ./bin/ycsb load elasticsearch -s -P workloads/workloada + +Then, run the workload: + + ./bin/ycsb run elasticsearch -s -P workloads/workloada + +For further configuration see below: + +### Defaults Configuration +The default setting for the ElasticSearch node that is created is as follows: + + cluster.name=es.ycsb.cluster + node.local=true + path.data=$TEMP_DIR/esdata + discovery.zen.ping.multicast.enabled=false + index.mapping._id.indexed=true + index.gateway.type=none + gateway.type=none + index.number_of_shards=1 + index.number_of_replicas=0 + es.index.key=es.ycsb + +### Custom Configuration +If you wish to customize the settings used to create the ElasticSerach node +you can created a new property file that contains your desired ElasticSearch +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 ElasticSearch node configuration you can execute the following to +pass it into the ElasticSearch client: + + + ./bin/ycsb run elasticsearch -P workloads/workloada -P myproperties.data -s + + +If you wish to use a in-memory store type rather than the default disk store add +the following properties to your custom properties file. For a large number of +insert operations insure that you have sufficient memory on your test system +otherwise you will run out of memory. + + index.store.type=memory + index.store.fs.memory.enabled=true + cache.memory.small_buffer_size=4mb + cache.memory.large_cache_size=1024mb + +If you wish to change the default index name you can set the following property: + + es.index.key=my_index_key diff --git a/elasticsearch/pom.xml b/elasticsearch/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..dfcb18106caee2d5398a7d55bdbbe85c8d1c8890 --- /dev/null +++ b/elasticsearch/pom.xml @@ -0,0 +1,77 @@ +<?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.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> + </parent> + + <artifactId>elasticsearch-binding</artifactId> + <name>ElasticSearch Binding</name> + <packaging>jar</packaging> + <properties> + <elasticsearch-version>0.19.8</elasticsearch-version> + </properties> + <dependencies> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.elasticsearch</groupId> + <artifactId>elasticsearch</artifactId> + <version>${elasticsearch-version}</version> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <version>6.1.1</version> + <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> +</project> diff --git a/elasticsearch/src/main/java/com/yahoo/ycsb/db/ElasticSearchClient.java b/elasticsearch/src/main/java/com/yahoo/ycsb/db/ElasticSearchClient.java new file mode 100644 index 0000000000000000000000000000000000000000..49c2c604b12c356558e91c65e4cf7360fe7c1715 --- /dev/null +++ b/elasticsearch/src/main/java/com/yahoo/ycsb/db/ElasticSearchClient.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) 2012 YCSB contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You + * may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. See accompanying + * LICENSE file. + */ + +package com.yahoo.ycsb.db; + +import static org.elasticsearch.common.settings.ImmutableSettings.*; +import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.elasticsearch.index.query.FilterBuilders.rangeFilter; +import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; +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 org.elasticsearch.action.get.GetResponse; +import org.elasticsearch.action.search.SearchResponse; +import org.elasticsearch.client.Client; +import org.elasticsearch.client.Requests; +import org.elasticsearch.client.transport.TransportClient; +import org.elasticsearch.common.settings.ImmutableSettings.Builder; +import org.elasticsearch.common.transport.InetSocketTransportAddress; +import org.elasticsearch.common.xcontent.XContentBuilder; +import org.elasticsearch.index.query.RangeFilterBuilder; +import org.elasticsearch.node.Node; +import org.elasticsearch.search.SearchHit; + +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> + * + * @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; + + /** + * 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"); + + // 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[] nodes = h.split(":"); + tClient.addTransportAddress( + new InetSocketTransportAddress(nodes[0], + Integer.parseInt(nodes[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 (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(); + } + } + + /** + * 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()); + } + + doc.endObject(); + + client.prepareIndex(indexKey, table, key).setSource(doc).execute() + .actionGet(); + + 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 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 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 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 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()); + } + + client.prepareIndex(indexKey, table, key) + .setSource(response.getSource()).execute().actionGet(); + + return Status.OK; + } + + } 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 Status 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(); + + HashMap<String, ByteIterator> entry; + + 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))); + } + + result.add(entry); + } + + 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 new file mode 100644 index 0000000000000000000000000000000000000000..cc559c7f39d9df27972098efeec7dfefab9fbe08 --- /dev/null +++ b/elasticsearch/src/test/java/com/yahoo/ycsb/db/ElasticSearchClientTest.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2012 YCSB contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You + * may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. See accompanying + * LICENSE file. + */ + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +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 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 + */ +public class ElasticSearchClientTest { + + protected final static ElasticSearchClient instance = new ElasticSearchClient(); + protected final static HashMap<String, ByteIterator> MOCK_DATA; + protected final static String MOCK_TABLE = "MOCK_TABLE"; + protected final static String MOCK_KEY0 = "0"; + protected final static String MOCK_KEY1 = "1"; + protected final static String MOCK_KEY2 = "2"; + + static { + MOCK_DATA = new HashMap<String, ByteIterator>(10); + for (int i = 1; i <= 10; i++) { + MOCK_DATA.put("field" + i, new StringByteIterator("value" + i)); + } + } + + @BeforeClass + public static void setUpClass() throws DBException { + instance.init(); + } + + @AfterClass + public static void tearDownClass() throws DBException { + instance.cleanup(); + } + + @BeforeMethod + public void setUp() { + instance.insert(MOCK_TABLE, MOCK_KEY1, MOCK_DATA); + instance.insert(MOCK_TABLE, MOCK_KEY2, MOCK_DATA); + } + + @AfterMethod + public void tearDown() { + instance.delete(MOCK_TABLE, MOCK_KEY1); + instance.delete(MOCK_TABLE, MOCK_KEY2); + } + + /** + * Test of insert method, of class ElasticSearchClient. + */ + @Test + public void testInsert() { + System.out.println("insert"); + Status result = instance.insert(MOCK_TABLE, MOCK_KEY0, MOCK_DATA); + assertEquals(Status.OK, result); + } + + /** + * Test of delete method, of class ElasticSearchClient. + */ + @Test + public void testDelete() { + System.out.println("delete"); + Status result = instance.delete(MOCK_TABLE, MOCK_KEY1); + assertEquals(Status.OK, result); + } + + /** + * Test of read method, of class ElasticSearchClient. + */ + @Test + public void testRead() { + System.out.println("read"); + Set<String> fields = MOCK_DATA.keySet(); + HashMap<String, ByteIterator> resultParam = new HashMap<String, ByteIterator>(10); + Status result = instance.read(MOCK_TABLE, MOCK_KEY1, fields, resultParam); + assertEquals(Status.OK, result); + } + + /** + * Test of update method, of class ElasticSearchClient. + */ + @Test + public void testUpdate() { + System.out.println("update"); + int i; + HashMap<String, ByteIterator> newValues = new HashMap<String, ByteIterator>(10); + + for (i = 1; i <= 10; 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<String, ByteIterator>(10); + instance.read(MOCK_TABLE, MOCK_KEY1, MOCK_DATA.keySet(), resultParam); + + for (i = 1; i <= 10; i++) { + assertEquals("newvalue" + i, resultParam.get("field" + i).toString()); + } + + } + + /** + * Test of scan method, of class ElasticSearchClient. + */ + @Test + public void testScan() { + System.out.println("scan"); + int recordcount = 10; + Set<String> fields = MOCK_DATA.keySet(); + Vector<HashMap<String, ByteIterator>> resultParam = new Vector<HashMap<String, ByteIterator>>(10); + Status result = instance.scan(MOCK_TABLE, MOCK_KEY1, recordcount, fields, resultParam); + assertEquals(Status.OK, result); + } +} diff --git a/gemfire/pom.xml b/gemfire/pom.xml index 9032b542bc7a69c27c01b6a552f5528d0fbd98e6..96cbfa49cfe43289b24b035a444f2c60e09c315f 100644 --- a/gemfire/pom.xml +++ b/gemfire/pom.xml @@ -1,10 +1,28 @@ <?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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> <artifactId>gemfire-binding</artifactId> @@ -15,44 +33,20 @@ <dependency> <groupId>com.gemstone.gemfire</groupId> <artifactId>gemfire</artifactId> - <version>6.6</version> + <version>${gemfire.version}</version> </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> <artifactId>core</artifactId> <version>${project.version}</version> + <scope>provided</scope> </dependency> </dependencies> <repositories> <repository> <id>gemstone</id> - <url>http://dist.gemstone.com.s3.amazonaws.com/maven/release/</url> + <url>http://dist.gemstone.com.s3.amazonaws.com/maven/release</url> </repository> </repositories> - - <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/gemfire/src/main/conf/cache.xml b/gemfire/src/main/conf/cache.xml index 90254df09aed151860424ce52c734eb5473452fb..372e1c456b8c4a5e14f204d6983e93f44c6309eb 100644 --- a/gemfire/src/main/conf/cache.xml +++ b/gemfire/src/main/conf/cache.xml @@ -1,4 +1,20 @@ <?xml version="1.0"?> +<!-- +Copyright (c) 2012 YCSB contributors. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You +may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. See accompanying +LICENSE file. +--> <!DOCTYPE cache PUBLIC "-//GemStone Systems, Inc.//GemFire Declarative Caching 6.5//EN" diff --git a/gemfire/src/main/java/com/yahoo/ycsb/db/GemFireClient.java b/gemfire/src/main/java/com/yahoo/ycsb/db/GemFireClient.java index 9fe598a6b0ad59d418e1a922d466edc53967daa4..e9b172c990b0f7d43f2778f8a39c998cb90843e9 100644 --- a/gemfire/src/main/java/com/yahoo/ycsb/db/GemFireClient.java +++ b/gemfire/src/main/java/com/yahoo/ycsb/db/GemFireClient.java @@ -1,10 +1,21 @@ -package com.yahoo.ycsb.db; +/** + * Copyright (c) 2013 - 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. + */ -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.Vector; +package com.yahoo.ycsb.db; import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.cache.CacheFactory; @@ -22,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; /** * VMware vFabric GemFire client for the YCSB benchmark.<br /> @@ -49,12 +66,6 @@ import com.yahoo.ycsb.StringByteIterator; */ public class GemFireClient 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 GemFire server is listening for connections */ private static final String SERVERPORT_PROPERTY_NAME = "gemfire.serverport"; @@ -126,48 +137,48 @@ public class GemFireClient 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(key, new ByteArrayByteIterator(val.get(key))); + result.put(k, new ByteArrayByteIterator(val.get(k))); } } 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) { // GemFire 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) { 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..e7ab3eac4c9f9b57bb2d63d8ab3499df3ae63586 --- /dev/null +++ b/googledatastore/pom.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> + +<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.6.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> + <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>false</failsOnError> + </configuration> + <executions> + <execution> + <id>validate</id> + <phase>validate</phase> + <goals> + <goal>checkstyle</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</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..fb3a81ecb1d7c1ebf491b148db14b494a2315c30 --- /dev/null +++ b/googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java @@ -0,0 +1,338 @@ +/* + * 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; + + public GoogleDatastoreClient() {} + + /** + * 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/pom.xml b/hbase/pom.xml deleted file mode 100644 index f0b9f42ce711ea37ede0e65c92456218111b9975..0000000000000000000000000000000000000000 --- a/hbase/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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>root</artifactId> - <version>0.1.4</version> - </parent> - - <artifactId>hbase-binding</artifactId> - <name>HBase DB Binding</name> - - <dependencies> - <dependency> - <groupId>org.apache.hbase</groupId> - <artifactId>hbase</artifactId> - <version>${hbase.version}</version> - </dependency> - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-core</artifactId> - <version>1.0.0</version> - </dependency> - <dependency> - <groupId>com.yahoo.ycsb</groupId> - <artifactId>core</artifactId> - <version>${project.version}</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/hbase/src/main/conf/hbase-site.xml b/hbase/src/main/conf/hbase-site.xml deleted file mode 100644 index 9c95a473d6f84843898f5787041ec2e761df5178..0000000000000000000000000000000000000000 --- a/hbase/src/main/conf/hbase-site.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> -<!-- -/** - * Copyright 2009 The Apache Software Foundation - * - * 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. - */ ---> -<configuration> - <property> - <name>hbase.rootdir</name> - <value>hdfs://<HBASE_MASTER_SERVER>:20001/hbase</value> - <description>The directory shared by region servers. - </description> - </property> - <property> - <name>hbase.master</name> - <value><HBASE_MASTER_SERVER>:60000</value> - <description>The host and port that the HBase master runs at. - </description> - </property> - <property> - <name>hbase.zookeeper.quorum</name> - <value><HBASE_MASTER_SERVER></value> - </property> -</configuration> 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..0aa5970dac21fdb6b55ae4ee7ceeaace68b9fcb8 --- /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.6.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/hbase098/README.md b/hbase098/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8584d05edc7839f1bd86d90deddeed1d45d2b9e2 --- /dev/null +++ b/hbase098/README.md @@ -0,0 +1,76 @@ +<!-- +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.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 + +### 1. Start a HBase Server +You need to start a single node or a cluster to point the client at. Please see [Apache HBase Reference Guide](http://hbase.apache.org/book.html) for more details and instructions. + +### 2. Set up YCSB +You need to clone the repository and compile everything. + +``` +git clone git://github.com/brianfrankcooper/YCSB.git +cd YCSB +mvn clean package +``` + +### 3. Create a HBase table for testing + +For best results, use the pre-splitting strategy recommended in [HBASE-4163](https://issues.apache.org/jira/browse/HBASE-4163): + +``` +hbase(main):001:0> n_splits = 200 # HBase recommends (10 * number of regionservers) +hbase(main):002:0> create 'usertable', 'family', {SPLITS => (1..n_splits).map {|i| "user#{1000+i*(9999-1000)/n_splits}"}} +``` + +*Failing to do so will cause all writes to initially target a single region server*. + +### 4. Run the Workload +Before you can actually run the workload, you need to "load" the data first. + +You should specify a HBase config directory(or any other directory containing your hbase-site.xml) and a table name and a column family(-cp is used to set java classpath and -p is used to set various properties). + +``` +bin/ycsb load hbase -P workloads/workloada -cp /HBASE-HOME-DIR/conf -p table=usertable -p columnfamily=family +``` + +Then, you can run the workload: + +``` +bin/ycsb run hbase -P workloads/workloada -cp /HBASE-HOME-DIR/conf -p table=usertable -p columnfamily=family +``` + +Please see the general instructions in the `doc` folder if you are not sure how it all works. You can apply additional properties (as seen in the next section) like this: + +``` +bin/ycsb run hbase -P workloads/workloada -cp /HBASE-HOME-DIR/conf -p table=usertable -p columnfamily=family -p clientbuffering=true +``` + +## Configuration Options +Following options can be configurable using `-p`. + +* `columnfamily`: The HBase column family to target. +* `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. diff --git a/hbase098/pom.xml b/hbase098/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..19adec500d6200bb459971e8407112b863ddfd3e --- /dev/null +++ b/hbase098/pom.xml @@ -0,0 +1,44 @@ +<?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.6.0-SNAPSHOT</version> + <relativePath>../binding-parent/</relativePath> + </parent> + + <artifactId>hbase098-binding</artifactId> + <name>HBase 0.98.x DB Binding</name> + + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-client</artifactId> + <version>${hbase098.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/hbase/src/main/java/com/yahoo/ycsb/db/HBaseClient.java b/hbase098/src/main/java/com/yahoo/ycsb/db/HBaseClient.java similarity index 80% 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 90b8db9a7dd96b9cabef2bdf8d3d2d930a16b8ce..e469e43a19eab4c956cef09f7618c19c55cdb26e 100644 --- a/hbase/src/main/java/com/yahoo/ycsb/db/HBaseClient.java +++ b/hbase098/src/main/java/com/yahoo/ycsb/db/HBaseClient.java @@ -17,33 +17,35 @@ package com.yahoo.ycsb.db; - -import com.yahoo.ycsb.DBException; -import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.ByteArrayByteIterator; -import com.yahoo.ycsb.StringByteIterator; - -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.conf.Configuration; +import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.KeyValue; -import org.apache.hadoop.hbase.client.HTable; -//import org.apache.hadoop.hbase.client.Scanner; +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; /** * HBase client for YCSB framework @@ -60,11 +62,12 @@ public class HBaseClient extends com.yahoo.ycsb.DB public HTable _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(); @@ -80,6 +83,18 @@ public class HBaseClient extends com.yahoo.ycsb.DB _debug=true; } + if (getProperties().containsKey("clientbuffering")) + { + _clientSideBuffering = Boolean.parseBoolean(getProperties().getProperty("clientbuffering")); + } + if (getProperties().containsKey("writebuffersize")) + { + _writeBufferSize = Long.parseLong(getProperties().getProperty("writebuffersize")); + } + if ("false".equals(getProperties().getProperty("hbase.usepagefilter", "true"))) { + _usePageFilter = false; + } + _columnFamily = getProperties().getProperty("columnfamily"); if (_columnFamily == null) { @@ -88,6 +103,19 @@ public class HBaseClient extends com.yahoo.ycsb.DB } _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 + { + HTable ht = new HTable(config, table); + HTableDescriptor dsc = ht.getTableDescriptor(); + } + catch (IOException e) + { + throw new DBException(e); + } } /** @@ -96,10 +124,16 @@ public class HBaseClient extends com.yahoo.ycsb.DB */ public void cleanup() throws DBException { + // Get the measurements instance as this is the only client that should + // count clean up time like an update since autoflush is off. + Measurements _measurements = Measurements.getMeasurements(); try { + long st=System.nanoTime(); if (_hTable != null) { _hTable.flushCommits(); } + long en=System.nanoTime(); + _measurements.measure("UPDATE", (int)((en-st)/1000)); } catch (IOException e) { throw new DBException(e); } @@ -110,8 +144,8 @@ public class HBaseClient extends com.yahoo.ycsb.DB synchronized (tableLock) { _hTable = new HTable(config, table); //2 suggestions from http://ryantwopointoh.blogspot.com/2009/01/performance-of-hbase-importing.html - _hTable.setAutoFlush(false); - _hTable.setWriteBufferSize(1024*1024*12); + _hTable.setAutoFlush(!_clientSideBuffering, true); + _hTable.setWriteBufferSize(_writeBufferSize); //return hTable; } @@ -126,7 +160,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)) { @@ -139,7 +173,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; } } @@ -163,12 +197,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()) { @@ -181,7 +215,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB } } - return Ok; + return Status.OK; } /** @@ -194,7 +228,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)) { @@ -207,7 +241,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; } } @@ -215,6 +249,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) @@ -253,6 +290,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; @@ -266,14 +306,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; } /** @@ -285,7 +325,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)) { @@ -298,7 +338,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; } } @@ -309,11 +349,12 @@ public class HBaseClient extends com.yahoo.ycsb.DB Put p = new Put(Bytes.toBytes(key)); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { + byte[] value = entry.getValue().toArray(); if (_debug) { System.out.println("Adding field/value " + entry.getKey() + "/"+ - entry.getValue() + " to put request"); + Bytes.toStringBinary(value) + " to put request"); } - p.add(_columnFamilyBytes,Bytes.toBytes(entry.getKey()),entry.getValue().toArray()); + p.add(_columnFamilyBytes,Bytes.toBytes(entry.getKey()), value); } try @@ -325,15 +366,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; } /** @@ -345,7 +386,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); } @@ -357,7 +398,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)) { @@ -370,7 +411,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; } } @@ -388,10 +429,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) @@ -441,7 +482,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"); @@ -460,15 +501,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..62f5209f553697644918075f05e8261c0c544de6 --- /dev/null +++ b/hbase10/pom.xml @@ -0,0 +1,80 @@ +<?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.6.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> + <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> +</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..68b4e91784a3950cb217e67880eb60ccf8a33084 --- /dev/null +++ b/hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java @@ -0,0 +1,495 @@ +/** + * 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.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.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; + +/** + * 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 boolean debug = false; + + private String tableName = ""; + private 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")); + } + + 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; + } + + 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); + HTableDescriptor dsc = + 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)); + 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 699c9595be5c84b0d187acf63a8a3354253884aa..01917473f65b6525c8826a3c761078c7bd7d7ceb 100644 --- a/hypertable/pom.xml +++ b/hypertable/pom.xml @@ -1,10 +1,28 @@ <?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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> <artifactId>hypertable-binding</artifactId> @@ -16,6 +34,7 @@ <groupId>com.yahoo.ycsb</groupId> <artifactId>core</artifactId> <version>${project.version}</version> + <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.thrift</groupId> @@ -35,29 +54,4 @@ <url>http://clojars.org/repo</url> </repository> </repositories> - - <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/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/README.md b/infinispan/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c4673aae09b24e59f080f12236efaff49ec85d5f --- /dev/null +++ b/infinispan/README.md @@ -0,0 +1,58 @@ +<!-- +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 infinispan. + +### 1. Install Java and Maven + +### 2. Set Up YCSB +1. Git clone YCSB and compile: + ``` +git clone http://github.com/brianfrankcooper/YCSB.git +cd YCSB +mvn clean package + ``` + +2. Copy and untar YCSB distribution in distribution/target/ycsb-x.x.x.tar.gz to target machine + +### 4. Load data and run tests +####4.1 embedded mode with cluster or not +Load the data: +``` +./bin/ycsb load infinispan -P workloads/workloada -p infinispan.clustered=<true or false> +``` +Run the workload test: +``` +./bin/ycsb run infinispan -s -P workloads/workloada -p infinispan.clustered=<true or false> +``` +####4.2 client-server mode + +1. start infinispan server + +2. read [RemoteCacheManager](http://docs.jboss.org/infinispan/7.2/apidocs/org/infinispan/client/hotrod/RemoteCacheManager.html) doc and customize hotrod client properties in infinispan-binding/conf/remote-cache.properties + +3. Load the data with specified cache: + ``` +./bin/ycsb load infinispan-cs -s -P workloads/workloada -P infinispan-binding/conf/remote-cache.properties -p cache=<cache name> + ``` + +4. Run the workload test with specified cache: + ``` +./bin/ycsb run infinispan-cs -s -P workloads/workloada -P infinispan-binding/conf/remote-cache.properties -p cache=<cache name> + ``` \ No newline at end of file diff --git a/infinispan/pom.xml b/infinispan/pom.xml index da1124536e6c2fce7ac2e19550a25b0470321c1d..2b3fa922b88c16577e5a705fc99124d326eee270 100644 --- a/infinispan/pom.xml +++ b/infinispan/pom.xml @@ -1,10 +1,28 @@ <?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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> <artifactId>infinispan-binding</artifactId> @@ -13,39 +31,20 @@ <dependencies> <dependency> - <groupId>org.jboss.as</groupId> - <artifactId>jboss-as-clustering-infinispan</artifactId> + <groupId>org.infinispan</groupId> + <artifactId>infinispan-client-hotrod</artifactId> + <version>${infinispan.version}</version> + </dependency> + <dependency> + <groupId>org.infinispan</groupId> + <artifactId>infinispan-core</artifactId> <version>${infinispan.version}</version> </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> <artifactId>core</artifactId> <version>${project.version}</version> + <scope>provided</scope> </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/infinispan/src/main/conf/infinispan-config.xml b/infinispan/src/main/conf/infinispan-config.xml index 15b9978c60118c999fba6579611346718cb3f5b3..fedf281610a5ec92e40a0bc71ca0c3730f6694d0 100644 --- a/infinispan/src/main/conf/infinispan-config.xml +++ b/infinispan/src/main/conf/infinispan-config.xml @@ -1,4 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (c) 2012 YCSB contributors. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You +may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. See accompanying +LICENSE file. +--> <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" diff --git a/infinispan/src/main/conf/remote-cache.properties b/infinispan/src/main/conf/remote-cache.properties new file mode 100644 index 0000000000000000000000000000000000000000..8e96ff5e6cb1752cc9b456bb835d32758f1570bb --- /dev/null +++ b/infinispan/src/main/conf/remote-cache.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. + +infinispan.client.hotrod.server_list=192.168.101.17:11222 +infinispan.client.hotrod.force_return_values=false + +maxActive=-1 +maxIdle=-1 +minIdle=1 +maxTotal=-1 + +whenExhaustedAction=1 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 528ded5ca70d1a9dbf3ad311103883a96b9afa9d..3abf7f6501456be2ca32b143bd8bab37a8f25be5 100644 --- a/infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanClient.java +++ b/infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanClient.java @@ -1,8 +1,26 @@ +/** + * Copyright (c) 2012 YCSB contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You + * may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. See accompanying + * LICENSE file. + */ + 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; @@ -28,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; @@ -56,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) { @@ -73,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); @@ -100,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); @@ -116,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 new file mode 100644 index 0000000000000000000000000000000000000000..fb969e4905ba5839bb789b82a552e477ac4c36af --- /dev/null +++ b/infinispan/src/main/java/com/yahoo/ycsb/db/InfinispanRemoteClient.java @@ -0,0 +1,146 @@ +/** + * 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.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 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. + * + * @author mylesjao + * + */ +public class InfinispanRemoteClient extends DB { + + private RemoteCacheManager remoteIspnManager; + + private String cacheName = null; + + private static final Log logger = LogFactory.getLog(InfinispanRemoteClient.class); + + public InfinispanRemoteClient() { + + } + + @Override + public void init() throws DBException { + remoteIspnManager = RemoteCacheManagerHolder.getInstance(getProperties()); + cacheName = getProperties().getProperty("cache"); + } + + @Override + public void cleanup() { + remoteIspnManager.stop(); + remoteIspnManager = null; + } + + @Override + 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); + try { + cache().put(compositKey, stringValues); + return Status.OK; + } catch (Exception e) { + return Status.ERROR; + } + } + + @Override + 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); + + if(values == null || values.isEmpty()){ + return Status.NOT_FOUND; + } + + if(fields == null){ //get all field/value pairs + StringByteIterator.putAllAsByteIterators(result, values); + }else{ + for(String field: fields){ + String value = values.get(field); + if(value != null){ + result.put(field, new StringByteIterator(value) ); + } + } + } + + return Status.OK; + } catch (Exception e) { + return Status.ERROR; + } + } + + @Override + 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_IMPLEMENTED; + } + + @Override + 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>(); + StringByteIterator.putAllAsStrings(stringValues, values); + cache().put(compositKey, stringValues); + return Status.OK; + } catch (Exception e) { + return Status.ERROR; + } + } + @Override + public Status delete(String table, String recordKey) { + String compositKey = createKey(table, recordKey); + try { + cache().remove(compositKey); + return Status.OK; + } catch (Exception e) { + return Status.ERROR; + } + } + + private RemoteCache<String, Map<String,String>> cache(){ + if(this.cacheName != null){ + return remoteIspnManager.getCache(cacheName); + }else{ + return remoteIspnManager.getCache(); + } + } + + private String createKey(String table, String recordKey){ + return table + "-" + recordKey; + } +} diff --git a/infinispan/src/main/java/com/yahoo/ycsb/db/RemoteCacheManagerHolder.java b/infinispan/src/main/java/com/yahoo/ycsb/db/RemoteCacheManagerHolder.java new file mode 100644 index 0000000000000000000000000000000000000000..b166f6b882993654657d52d6cafa1a182758caa0 --- /dev/null +++ b/infinispan/src/main/java/com/yahoo/ycsb/db/RemoteCacheManagerHolder.java @@ -0,0 +1,42 @@ +/** + * 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 java.util.Properties; + +import org.infinispan.client.hotrod.RemoteCacheManager; + +public class RemoteCacheManagerHolder { + + private static volatile RemoteCacheManager cacheManager = null; + + private RemoteCacheManagerHolder() {} + + public static RemoteCacheManager getInstance(Properties props){ + RemoteCacheManager result = cacheManager; + if(result == null){ + synchronized (RemoteCacheManagerHolder.class) { + result = cacheManager; + if (result == null) { + cacheManager = result = new RemoteCacheManager(props); + } + } + } + return result; + } +} 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 e8e9b6c602fc0ef18a2d0d51b9b8c87fa5477256..80bfc20c1840ba5ce124353f7de97a7978bac7f9 100644 --- a/jdbc/pom.xml +++ b/jdbc/pom.xml @@ -1,10 +1,28 @@ <?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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> <artifactId>jdbc-binding</artifactId> @@ -21,31 +39,19 @@ <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.hsqldb</groupId> + <artifactId>hsqldb</artifactId> + <version>2.3.3</version> + <scope>test</scope> </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/jdbc/src/main/conf/db.properties b/jdbc/src/main/conf/db.properties index c985d57bc4c329971764bff1906e30d799853611..81849a6320ec69ea0847c6100a8a3c3da702f587 100644 --- a/jdbc/src/main/conf/db.properties +++ b/jdbc/src/main/conf/db.properties @@ -1,6 +1,22 @@ +# Copyright (c) 2012 YCSB contributors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You +# may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. See accompanying +# LICENSE file. + # Properties file that contains database connection information. jdbc.driver=org.h2.Driver +# jdbc.fetchsize=20 db.url=jdbc:h2:tcp://foo.com:9092/~/h2/ycsb db.user=sa db.passwd= diff --git a/jdbc/src/main/conf/h2.properties b/jdbc/src/main/conf/h2.properties index c985d57bc4c329971764bff1906e30d799853611..d698edec43f5d952b73086b62490f1991916a414 100644 --- a/jdbc/src/main/conf/h2.properties +++ b/jdbc/src/main/conf/h2.properties @@ -1,3 +1,18 @@ +# Copyright (c) 2012 YCSB contributors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You +# may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. See accompanying +# LICENSE file. + # Properties file that contains database connection information. jdbc.driver=org.h2.Driver 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 8d1a6a7ea3411ce090cd1ded32dcd7d9268eeafa..7da1d5ecbb2ffef390fdf6a494e2235c89f46c28 100644 --- a/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClient.java +++ b/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClient.java @@ -20,6 +20,7 @@ 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.*; @@ -55,6 +56,7 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { 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; @@ -176,6 +178,19 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { 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); @@ -185,9 +200,13 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { 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. - conn.setAutoCommit(true); + + // 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); } @@ -226,7 +245,7 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { 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; @@ -240,7 +259,7 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { 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; @@ -253,7 +272,7 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { 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; @@ -265,15 +284,15 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { StringBuilder update = new StringBuilder("UPDATE "); update.append(updateType.tableName); update.append(" SET "); - for (int i = 1; i <= updateType.numFields; i++) { + for (int i = 0; i < updateType.numFields; i++) { update.append(COLUMN_PREFIX); update.append(i); update.append("=?"); - if (i < updateType.numFields) update.append(", "); + if (i < updateType.numFields - 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; @@ -286,23 +305,20 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { 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); PreparedStatement stmt = cachedStatements.putIfAbsent(scanType, scanStatement); if (stmt == null) return scanStatement; else return stmt; } @Override - public int read(String tableName, String key, Set<String> fields, + public Status read(String tableName, String key, Set<String> fields, HashMap<String, ByteIterator> result) { - if (tableName == null) { - return -1; - } - if (key == null) { - return -1; - } try { StatementType type = new StatementType(StatementType.Type.READ, tableName, 1, getShardIndexByKey(key)); PreparedStatement readStatement = cachedStatements.get(type); @@ -313,7 +329,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) { @@ -322,22 +338,16 @@ 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; + return Status.ERROR; } } @Override - public int scan(String tableName, String startKey, int recordcount, + public Status 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; - } try { StatementType type = new StatementType(StatementType.Type.SCAN, tableName, 1, getShardIndexByKey(startKey)); PreparedStatement scanStatement = cachedStatements.get(type); @@ -345,6 +355,7 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { 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) { @@ -357,21 +368,15 @@ 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; - } + 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)); @@ -385,22 +390,16 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { } updateStatement.setString(index, key); int result = updateStatement.executeUpdate(); - if (result == 1) return SUCCESS; - else return 1; + if (result == 1) return Status.OK; + else 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; - } + public Status insert(String tableName, String key, HashMap<String, ByteIterator> values) { try { int numFields = values.size(); StatementType type = new StatementType(StatementType.Type.INSERT, tableName, numFields, getShardIndexByKey(key)); @@ -415,22 +414,16 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { insertStatement.setString(index++, field); } int result = insertStatement.executeUpdate(); - if (result == 1) return SUCCESS; - else return 1; + if (result == 1) return Status.OK; + else 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; - } + public Status delete(String tableName, String key) { try { StatementType type = new StatementType(StatementType.Type.DELETE, tableName, 1, getShardIndexByKey(key)); PreparedStatement deleteStatement = cachedStatements.get(type); @@ -439,11 +432,11 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants { } deleteStatement.setString(1, key); int result = deleteStatement.executeUpdate(); - if (result == 1) return SUCCESS; - else return 1; + if (result == 1) return Status.OK; + else return Status.UNEXPECTED_STATE; } catch (SQLException e) { System.err.println("Error in processing delete to table: " + tableName + e); - return -1; + return Status.ERROR; } } } diff --git a/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClientConstants.java b/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClientConstants.java index 79e0525e2a20f6c6ba809fa1b54a73e55865293d..4d396ac13c8787cbc7398b651cc10098197a32b8 100644 --- a/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClientConstants.java +++ b/jdbc/src/main/java/com/yahoo/ycsb/db/JdbcDBClientConstants.java @@ -16,6 +16,7 @@ */ package com.yahoo.ycsb.db; + /** * Constants used by the JDBC client. * @@ -35,7 +36,13 @@ public interface JdbcDBClientConstants { /** 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"; @@ -45,9 +52,6 @@ public interface JdbcDBClientConstants { /** 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"; 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..901c8a668a035a8130a9070d044664736fc994ca --- /dev/null +++ b/jdbc/src/test/java/com/yahoo/ycsb/db/JdbcDBClientTest.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) 2015 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; + +/** + * Created by kruthar on 11/2/15. + */ +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(JdbcDBClientConstants.CONNECTION_URL, TEST_DB_URL); + p.setProperty(JdbcDBClientConstants.DRIVER_CLASS, TEST_DB_DRIVER); + p.setProperty(JdbcDBClientConstants.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++) { + // TODO: This will fail until the fix is made to insert and update fields in the correct order. + // TODO: Uncomment this assertEquals when the fix is made. + //assertEquals(resultSet.getString(FIELD_PREFIX + i), insertMap.get(FIELD_PREFIX + i)); + } + // 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++) { + // TODO: This will fail until the fix is made to insert and update fields in the correct order. + // TODO: Uncomment this assertEquals when the fix is made. + //assertEquals(resultSet.getString(FIELD_PREFIX + i), updateMap.get(FIELD_PREFIX + i)); + } + + // 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) { + // TODO: This will fail until the fix is made to insert and update fields in the correct order. + // TODO: Uncomment this assertEquals when the fix is made. + //assertEquals("Assert " + field + " was read correctly", insertMap.get(field), readResultMap.get(field)); + } + + 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) { + // TODO: This will fail until the fix is made to insert and update fields in the correct order. + // TODO: Uncomment this assertEquals when the fix is made. + //assertEquals("Assert " + field + " was read correctly", insertMap.get(field), readResultMap.get(field)); + } + } + + @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) { + // TODO: This will fail until the fix is made to insert and update fields in the correct order. + // TODO: Uncomment this assertEquals when the fix is made. + //assertEquals("Assert this field is correct in this row", keyMap.get(KEY_PREFIX + testIndex).get(field), result.get(field)); + } + 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..5ee69c15aa4e7485428ba1b8a8bca14d68e61ece --- /dev/null +++ b/kudu/pom.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> + +<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.6.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> + <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> + <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..f063ed7d768caa3f1736dcce2756f81cfc500efd --- /dev/null +++ b/kudu/src/main/java/com/yahoo/ycsb/db/KuduYCSBClient.java @@ -0,0 +1,347 @@ +/** + * 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).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); + + CreateTableBuilder builder = new CreateTableBuilder(); + 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 c9b75fa8186659858bc82c0eccd6d621a715c1d7..8b4060ec1153b265b95926ebd2ccc29c38bd95c6 100644 --- a/mapkeeper/pom.xml +++ b/mapkeeper/pom.xml @@ -1,10 +1,28 @@ <?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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> <artifactId>mapkeeper-binding</artifactId> @@ -21,33 +39,9 @@ <groupId>com.yahoo.ycsb</groupId> <artifactId>core</artifactId> <version>${project.version}</version> + <scope>provided</scope> </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> - <repositories> <repository> <id>mapkeeper-releases</id> 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 5af5ed9e14e05d01bbce276bcac73e39ae550bb4..763d98e3c9ee61be9f71e7b00b0a3eb61ea322fb 100644 --- a/mapkeeper/src/main/java/com/yahoo/ycsb/db/MapKeeperClient.java +++ b/mapkeeper/src/main/java/com/yahoo/ycsb/db/MapKeeperClient.java @@ -1,3 +1,20 @@ +/** + * Copyright (c) 2012 YCSB contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You + * may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. See accompanying + * LICENSE file. + */ + package com.yahoo.ycsb.db; import java.nio.ByteBuffer; diff --git a/mongodb/README.md b/mongodb/README.md index 63d0158aa6cd2154ac77c96d841dd90c203a10dd..fcb8869083c999d3bdcee35ca20c1fd64e66d140 100644 --- a/mongodb/README.md +++ b/mongodb/README.md @@ -1,42 +1,152 @@ +<!-- +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. +--> + ## Quick Start -This section describes how to run YCSB on MongoDB running locally. +This section describes how to run YCSB on MongoDB. ### 1. Start MongoDB First, download MongoDB and start `mongod`. For example, to start MongoDB on x86-64 Linux box: - wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.8.3.tgz - tar xfvz mongodb-linux-x86_64-1.8.3.tgz + wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-x.x.x.tgz + tar xfvz mongodb-linux-x86_64-*.tgz mkdir /tmp/mongodb - cd mongodb-linux-x86_64-1.8.3 + cd mongodb-linux-x86_64-* ./bin/mongod --dbpath /tmp/mongodb -### 2. Set Up YCSB +Replace x.x.x above with the latest stable release version for MongoDB. +See http://docs.mongodb.org/manual/installation/ for installation steps for various operating systems. + +### 2. Install Java and Maven + +Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html + +and get the url to download the rpm into your server. For example: + + wget http://download.oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.rpm?AuthParam=11232426132 -o jdk-7u40-linux-x64.rpm + rpm -Uvh jdk-7u40-linux-x64.rpm + +Or install via yum/apt-get + + sudo yum install java-devel + +Download MVN from http://maven.apache.org/download.cgi + + wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz + sudo tar xzf apache-maven-*-bin.tar.gz -C /usr/local + cd /usr/local + sudo ln -s apache-maven-* maven + sudo vi /etc/profile.d/maven.sh + +Add the following to `maven.sh` -Clone the YCSB git repository and compile: + export M2_HOME=/usr/local/maven + export PATH=${M2_HOME}/bin:${PATH} + +Reload bash and test mvn + + bash + mvn -version + +### 3. Set Up YCSB + +Download the YCSB zip file and compile: git clone git://github.com/brianfrankcooper/YCSB.git cd YCSB - mvn clean package + mvn -pl com.yahoo.ycsb:mongodb-binding -am clean package -### 3. Run YCSB - -Now you are ready to run! First, load the data: +### 4. Run YCSB + +Now you are ready to run! First, use the asynchronous driver to load the data: - ./bin/ycsb load mongodb -s -P workloads/workloada + ./bin/ycsb load mongodb-async -s -P workloads/workloada > outputLoad.txt Then, run the workload: - ./bin/ycsb run mongodb -s -P workloads/workloada + ./bin/ycsb run mongodb-async -s -P workloads/workloada > outputRun.txt + +Similarly, to use the synchronous driver from MongoDB Inc. we load the data: -See the next section for the list of configuration parameters for MongoDB. + ./bin/ycsb load mongodb -s -P workloads/workloada > outputLoad.txt -## MongoDB Configuration Parameters +Then, run the workload: -### `mongodb.url` (default: `mongodb://localhost:27017`) + ./bin/ycsb run mongodb -s -P workloads/workloada > outputRun.txt + +See the next section for the list of configuration parameters for MongoDB. -### `mongodb.database` (default: `ycsb`) +## MongoDB Configuration Parameters -### `mongodb.writeConcern` (default `safe`) +- `mongodb.url` + - This should be a MongoDB URI or connection string. + - See http://docs.mongodb.org/manual/reference/connection-string/ for the standard options. + - For the complete set of options for the asynchronous driver see: + - http://www.allanbank.com/mongodb-async-driver/apidocs/index.html?com/allanbank/mongodb/MongoDbUri.html + - For the complete set of options for the synchronous driver see: + - http://api.mongodb.org/java/current/index.html?com/mongodb/MongoClientURI.html + - Default value is `mongodb://localhost:27017/ycsb?w=1` + - Default value of database is `ycsb` + +- `mongodb.batchsize` + - 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.url`. + - Allowed values are : + - `errors_ignored` + - `unacknowledged` + - `acknowledged` + - `journaled` + - `replica_acknowledged` + - `majority` + - Default value is `acknowledged`. + +- `mongodb.readPreference` + - **Deprecated** - Use the `readPreference` options on the MongoDB URI provided by the `mongodb.url`. + - Allowed values are : + - `primary` + - `primary_preferred` + - `secondary` + - `secondary_preferred` + - `nearest` + - Default value is `primary`. + +- `mongodb.maxconnections` + - **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.url`. + - Default value is `5`. + +For example: + + ./bin/ycsb load mongodb-async -s -P workloads/workloada -p mongodb.url=mongodb://localhost:27017/ycsb?w=0 + +To run with the synchronous driver from MongoDB Inc.: + + ./bin/ycsb load mongodb -s -P workloads/workloada -p mongodb.url=mongodb://localhost:27017/ycsb?w=0 diff --git a/mongodb/pom.xml b/mongodb/pom.xml index ed44f29d05e9aef30300774e9a1e1f4e40de3435..a87e81499cfc75fefafa12960e6dcff97ec8821d 100644 --- a/mongodb/pom.xml +++ b/mongodb/pom.xml @@ -1,14 +1,33 @@ <?xml version="1.0" encoding="UTF-8"?> -<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"> +<!-- +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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> - + <artifactId>mongodb-binding</artifactId> - <name>Mongo DB Binding</name> + <name>MongoDB Binding</name> <packaging>jar</packaging> <dependencies> @@ -17,35 +36,71 @@ <artifactId>mongo-java-driver</artifactId> <version>${mongodb.version}</version> </dependency> + <dependency> + <groupId>com.allanbank</groupId> + <artifactId>mongodb-async-driver</artifactId> + <version>${mongodb.async.version}</version> + </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> <artifactId>core</artifactId> <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>1.1.2</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> </dependency> </dependencies> - <build> <plugins> - <plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>${maven.assembly.version}</version> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.15</version> <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - <appendAssemblyId>false</appendAssemblyId> + <consoleOutput>true</consoleOutput> + <configLocation>../checkstyle.xml</configLocation> + <failOnViolation>true</failOnViolation> + <failsOnError>true</failsOnError> </configuration> <executions> <execution> - <phase>package</phase> + <id>validate</id> + <phase>validate</phase> <goals> - <goal>single</goal> + <goal>checkstyle</goal> </goals> </execution> </executions> </plugin> </plugins> </build> - + <repositories> + <repository> + <releases> + <enabled>true</enabled> + <updatePolicy>always</updatePolicy> + <checksumPolicy>warn</checksumPolicy> + </releases> + <snapshots> + <enabled>false</enabled> + <updatePolicy>never</updatePolicy> + <checksumPolicy>fail</checksumPolicy> + </snapshots> + <id>allanbank</id> + <name>Allanbank Releases</name> + <url>http://www.allanbank.com/repo/</url> + <layout>default</layout> + </repository> + </repositories> </project> diff --git a/mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java b/mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java new file mode 100644 index 0000000000000000000000000000000000000000..d8fe38843a34b176a0ea5b0d9bfa0adfc8f8d915 --- /dev/null +++ b/mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java @@ -0,0 +1,550 @@ +/* + * 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. + */ +package com.yahoo.ycsb.db; + +import static com.allanbank.mongodb.builder.QueryBuilder.where; + +import com.allanbank.mongodb.Durability; +import com.allanbank.mongodb.LockType; +import com.allanbank.mongodb.MongoClient; +import com.allanbank.mongodb.MongoClientConfiguration; +import com.allanbank.mongodb.MongoCollection; +import com.allanbank.mongodb.MongoDatabase; +import com.allanbank.mongodb.MongoDbUri; +import com.allanbank.mongodb.MongoFactory; +import com.allanbank.mongodb.MongoIterator; +import com.allanbank.mongodb.ReadPreference; +import com.allanbank.mongodb.bson.Document; +import com.allanbank.mongodb.bson.Element; +import com.allanbank.mongodb.bson.ElementType; +import com.allanbank.mongodb.bson.builder.BuilderFactory; +import com.allanbank.mongodb.bson.builder.DocumentBuilder; +import com.allanbank.mongodb.bson.element.BinaryElement; +import com.allanbank.mongodb.builder.BatchedWrite; +import com.allanbank.mongodb.builder.BatchedWriteMode; +import com.allanbank.mongodb.builder.Find; +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 + * href="http://www.allanbank.com/mongodb-async-driver/">Asynchronous Java + * Driver</a> + * <p> + * See the <code>README.md</code> for configuration information. + * </p> + * + * @author rjm + * @see <a href="http://www.allanbank.com/mongodb-async-driver/">Asynchronous + * Java Driver</a> + */ +public class AsyncMongoDbClient extends DB { + + /** Used to include a field in a response. */ + protected static final int INCLUDE = 1; + + /** The database to use. */ + private static String databaseName; + + /** Thread local document builder. */ + private static final ThreadLocal<DocumentBuilder> DOCUMENT_BUILDER = + new ThreadLocal<DocumentBuilder>() { + @Override + protected DocumentBuilder initialValue() { + return BuilderFactory.start(); + } + }; + + /** The write concern for the requests. */ + private static final AtomicInteger INIT_COUNT = new AtomicInteger(0); + + /** The connection to MongoDB. */ + private static MongoClient mongoClient; + + /** The write concern for the requests. */ + private static Durability writeConcern; + + /** Which servers to use for reads. */ + private static ReadPreference readPreference; + + /** The database to MongoDB. */ + private MongoDatabase database; + + /** 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() + .mode(BatchedWriteMode.REORDERED); + + /** The number of writes in the batchedWrite. */ + private int batchedWriteCount = 0; + + /** + * Cleanup any state for this DB. Called once per DB instance; there is one DB + * instance per client thread. + */ + @Override + public final void cleanup() throws DBException { + if (INIT_COUNT.decrementAndGet() == 0) { + try { + mongoClient.close(); + } catch (final Exception e1) { + System.err.println("Could not close MongoDB connection pool: " + + e1.toString()); + e1.printStackTrace(); + return; + } finally { + mongoClient = null; + database = null; + } + } + } + + /** + * 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 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 Status.NOT_FOUND; + } + return Status.OK; + } catch (final Exception e) { + System.err.println(e.toString()); + return Status.ERROR; + } + } + + /** + * Initialize any state for this DB. Called once per DB instance; there is one + * DB instance per client thread. + */ + @Override + public final void init() throws DBException { + final int count = INIT_COUNT.incrementAndGet(); + + synchronized (AsyncMongoDbClient.class) { + final Properties props = getProperties(); + + if (mongoClient != null) { + database = mongoClient.getDatabase(databaseName); + + // If there are more threads (count) than connections then the + // Low latency spin lock is not really needed as we will keep + // the connections occupied. + if (count > mongoClient.getConfig().getMaxConnectionCount()) { + mongoClient.getConfig().setLockType(LockType.MUTEX); + } + + return; + } + + // 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. + String url = + props + .getProperty("mongodb.url", "mongodb://localhost:27017/ycsb?w=1"); + if (!url.startsWith("mongodb://")) { + System.err.println("ERROR: Invalid URL: '" + url + + "'. Must be of the form " + + "'mongodb://<host1>:<port1>,<host2>:<port2>/database?" + + "options'. See " + + "http://docs.mongodb.org/manual/reference/connection-string/."); + System.exit(1); + } + + MongoDbUri uri = new MongoDbUri(url); + + try { + databaseName = uri.getDatabase(); + if ((databaseName == null) || databaseName.isEmpty()) { + // Default database is "ycsb" if database is not + // specified in URL + databaseName = "ycsb"; + } + + mongoClient = MongoFactory.createClient(uri); + + MongoClientConfiguration config = mongoClient.getConfig(); + if (!url.toLowerCase().contains("locktype=")) { + config.setLockType(LockType.LOW_LATENCY_SPIN); // assumed... + } + + readPreference = config.getDefaultReadPreference(); + writeConcern = config.getDefaultDurability(); + + database = mongoClient.getDatabase(databaseName); + + System.out.println("mongo connection created with " + url); + } catch (final Exception e1) { + System.err + .println("Could not initialize MongoDB connection pool for Loader: " + + e1.toString()); + e1.printStackTrace(); + return; + } + } + } + + /** + * 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 the {@link DB} + * class's description for a discussion of error codes. + */ + @Override + public final Status insert(final String table, final String key, + final HashMap<String, ByteIterator> values) { + try { + final MongoCollection collection = database.getCollection(table); + final DocumentBuilder toInsert = + DOCUMENT_BUILDER.get().reset().add("_id", key); + final Document query = toInsert.build(); + for (final Map.Entry<String, ByteIterator> entry : values.entrySet()) { + toInsert.add(entry.getKey(), entry.getValue().toArray()); + } + + // Do an upsert. + if (batchSize <= 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 { + if (useUpsert) { + batchedWrite.update(query, toInsert, /* multi= */false, + /* upsert= */true); + } else { + batchedWrite.insert(toInsert); + } + batchedWriteCount += 1; + + if (batchedWriteCount < batchSize) { + return Status.OK; + } + + long count = collection.write(batchedWrite); + if (count == batchedWriteCount) { + batchedWrite.reset().mode(BatchedWriteMode.REORDERED); + batchedWriteCount = 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 Status.ERROR; + } catch (Exception e) { + System.err.println("Exception while trying bulk insert with " + + batchedWriteCount); + e.printStackTrace(); + return Status.ERROR; + } + } catch (final 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 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); + final DocumentBuilder query = + DOCUMENT_BUILDER.get().reset().add("_id", key); + + Document queryResult = null; + if (fields != null) { + final DocumentBuilder fieldsToReturn = BuilderFactory.start(); + final Iterator<String> iter = fields.iterator(); + while (iter.hasNext()) { + fieldsToReturn.add(iter.next(), 1); + } + + final Find.Builder fb = new Find.Builder(query); + fb.projection(fieldsToReturn); + fb.setLimit(1); + fb.setBatchSize(1); + fb.readPreference(readPreference); + + final MongoIterator<Document> ci = collection.find(fb.build()); + if (ci.hasNext()) { + queryResult = ci.next(); + ci.close(); + } + } else { + queryResult = collection.findOne(query); + } + + if (queryResult != null) { + fillMap(result, queryResult); + } + return queryResult != null ? Status.OK : Status.NOT_FOUND; + } catch (final Exception e) { + System.err.println(e.toString()); + 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 the {@link DB} + * class's description for a discussion of error codes. + */ + @Override + public final Status scan(final String table, final String startkey, + final int recordcount, final Set<String> fields, + final Vector<HashMap<String, ByteIterator>> result) { + try { + final MongoCollection collection = database.getCollection(table); + + final Find.Builder find = + Find.builder().query(where("_id").greaterThanOrEqualTo(startkey)) + .limit(recordcount).batchSize(recordcount).sort(Sort.asc("_id")) + .readPreference(readPreference); + + if (fields != null) { + final DocumentBuilder fieldsDoc = BuilderFactory.start(); + for (final String field : fields) { + fieldsDoc.add(field, INCLUDE); + } + + find.projection(fieldsDoc); + } + + result.ensureCapacity(recordcount); + + final MongoIterator<Document> cursor = collection.find(find); + if (!cursor.hasNext()) { + System.err.println("Nothing found in scan for key " + startkey); + return Status.NOT_FOUND; + } + while (cursor.hasNext()) { + // toMap() returns a Map but result.add() expects a + // Map<String,String>. Hence, the suppress warnings. + final Document doc = cursor.next(); + final HashMap<String, ByteIterator> docAsMap = + new HashMap<String, ByteIterator>(); + + fillMap(docAsMap, doc); + + result.add(docAsMap); + } + + return Status.OK; + } catch (final Exception e) { + System.err.println(e.toString()); + 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 the {@link DB} + * class's description for a discussion of error codes. + */ + @Override + public final Status update(final String table, final String key, + final HashMap<String, ByteIterator> values) { + try { + final MongoCollection collection = database.getCollection(table); + final DocumentBuilder query = BuilderFactory.start().add("_id", key); + final DocumentBuilder update = BuilderFactory.start(); + final DocumentBuilder fieldsToSet = update.push("$set"); + + for (final Map.Entry<String, ByteIterator> entry : values.entrySet()) { + fieldsToSet.add(entry.getKey(), entry.getValue().toArray()); + } + final long res = + collection.update(query, update, false, false, writeConcern); + return res == 1 ? Status.OK : Status.NOT_FOUND; + } catch (final Exception e) { + System.err.println(e.toString()); + return Status.ERROR; + } + } + + /** + * Fills the map with the ByteIterators from the document. + * + * @param result + * The map to fill. + * @param queryResult + * The document to fill from. + */ + protected final void fillMap(final HashMap<String, ByteIterator> result, + final Document queryResult) { + for (final Element be : queryResult) { + if (be.getType() == ElementType.BINARY) { + result.put(be.getName(), + new BinaryByteArrayIterator((BinaryElement) be)); + } + } + } + + /** + * BinaryByteArrayIterator provides an adapter from a {@link BinaryElement} to + * a {@link ByteIterator}. + */ + private static final class BinaryByteArrayIterator extends ByteIterator { + + /** The binary data. */ + private final BinaryElement binaryElement; + + /** The current offset into the binary element. */ + private int offset; + + /** + * Creates a new BinaryByteArrayIterator. + * + * @param element + * The {@link BinaryElement} to iterate over. + */ + public BinaryByteArrayIterator(final BinaryElement element) { + this.binaryElement = element; + this.offset = 0; + } + + /** + * {@inheritDoc} + * <p> + * Overridden to return the number of bytes remaining in the iterator. + * </p> + */ + @Override + public long bytesLeft() { + return Math.max(0, binaryElement.length() - offset); + } + + /** + * {@inheritDoc} + * <p> + * Overridden to return true if there is more data in the + * {@link BinaryElement}. + * </p> + */ + @Override + public boolean hasNext() { + return (offset < binaryElement.length()); + } + + /** + * {@inheritDoc} + * <p> + * Overridden to return the next value and advance the iterator. + * </p> + */ + @Override + public byte nextByte() { + final byte value = binaryElement.get(offset); + offset += 1; + + return value; + } + } +} 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 7c8df19af43655211130c26be6650e3389dfa8d4..e0654aa2fa8029f9a9da4ec86dfdedf7d96b95a7 100644 --- a/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java +++ b/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java @@ -1,321 +1,468 @@ /** - * MongoDB client binding for YCSB. + * Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. * - * Submitted by Yen Pai on 5/11/2010. + * 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 * - * https://gist.github.com/000a66b8db2caf42467b#file_mongo_db.java + * 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. */ +/* + * MongoDB client binding for YCSB. + * + * Submitted by Yen Pai on 5/11/2010. + * + * https://gist.github.com/000a66b8db2caf42467b#file_mongo_database.java + */ package com.yahoo.ycsb.db; +import com.mongodb.MongoClient; +import com.mongodb.MongoClientURI; +import com.mongodb.ReadPreference; +import com.mongodb.WriteConcern; +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; +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.Iterator; +import java.util.List; +import java.util.Map; import java.util.Properties; import java.util.Set; -import java.util.Map; import java.util.Vector; - -import com.mongodb.BasicDBObject; -import com.mongodb.DBAddress; -import com.mongodb.DBCollection; -import com.mongodb.DBCursor; -import com.mongodb.DBObject; -import com.mongodb.Mongo; -import com.mongodb.WriteConcern; -import com.mongodb.WriteResult; - -import com.yahoo.ycsb.DB; -import com.yahoo.ycsb.DBException; -import com.yahoo.ycsb.ByteIterator; -import com.yahoo.ycsb.StringByteIterator; +import java.util.concurrent.atomic.AtomicInteger; /** - * MongoDB client for YCSB framework. - * - * Properties to set: - * - * mongodb.url=mongodb://localhost:27017 - * mongodb.database=ycsb - * mongodb.writeConcern=normal - * + * MongoDB asynchronous client 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. + * </p> + * * @author ypai - * + * @see <a href="http://docs.mongodb.org/ecosystem/drivers/java/">MongoDB Inc. + * driver</a> */ public class MongoDbClient extends DB { - private Mongo mongo; - private WriteConcern writeConcern; - private String database; - - @Override - /** - * Initialize any state for this DB. - * Called once per DB instance; there is one DB instance per client thread. - */ - public void init() throws DBException { - // initialize MongoDb driver - Properties props = getProperties(); - String url = props.getProperty("mongodb.url", "mongodb://localhost:27017"); - database = props.getProperty("mongodb.database", "ycsb"); - String writeConcernType = props.getProperty("mongodb.writeConcern", "safe").toLowerCase(); - - if ("none".equals(writeConcernType)) { - writeConcern = WriteConcern.NONE; - } else if ("safe".equals(writeConcernType)) { - writeConcern = WriteConcern.SAFE; - } else if ("normal".equals(writeConcernType)) { - writeConcern = WriteConcern.NORMAL; - } else if ("fsync_safe".equals(writeConcernType)) { - writeConcern = WriteConcern.FSYNC_SAFE; - } else if ("replicas_safe".equals(writeConcernType)) { - writeConcern = WriteConcern.REPLICAS_SAFE; + /** Used to include a field in a response. */ + private static final Integer INCLUDE = Integer.valueOf(1); + + /** The options to use for inserting many documents. */ + private static final InsertManyOptions INSERT_UNORDERED = + new InsertManyOptions().ordered(false); + + /** The options to use for inserting a single document. */ + private static final UpdateOptions UPDATE_WITH_UPSERT = new UpdateOptions() + .upsert(true); + + /** + * The database name to access. + */ + private static String databaseName; + + /** The database name to access. */ + private static MongoDatabase database; + + /** + * Count the number of times initialized to teardown on the last + * {@link #cleanup()}. + */ + private static final AtomicInteger INIT_COUNT = new AtomicInteger(0); + + /** A singleton Mongo instance. */ + private static MongoClient mongoClient; + + /** The default read preference for the test. */ + private static ReadPreference readPreference; + + /** The default write concern for the test. */ + private static WriteConcern writeConcern; + + /** 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>(); + + /** + * 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) { + try { + mongoClient.close(); + } catch (Exception e1) { + System.err.println("Could not close MongoDB connection pool: " + + e1.toString()); + e1.printStackTrace(); + return; + } finally { + database = null; + mongoClient = null; + } + } + } + + /** + * 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 the {@link DB} + * class's description for a discussion of error codes. + */ + @Override + public Status delete(String table, String key) { + try { + MongoCollection<Document> collection = database.getCollection(table); + + Document query = new Document("_id", key); + DeleteResult result = + collection.withWriteConcern(writeConcern).deleteOne(query); + if (result.wasAcknowledged() && result.getDeletedCount() == 0) { + System.err.println("Nothing deleted for key " + key); + return Status.NOT_FOUND; + } + return Status.OK; + } catch (Exception e) { + System.err.println(e.toString()); + return Status.ERROR; + } + } + + /** + * 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 { + INIT_COUNT.incrementAndGet(); + synchronized (INCLUDE) { + if (mongoClient != null) { + return; + } + + Properties props = getProperties(); + + // 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. + String url = props.getProperty("mongodb.url", null); + boolean defaultedUrl = false; + if (url == null) { + defaultedUrl = true; + url = "mongodb://localhost:27017/ycsb?w=1"; + } + + url = OptionsSupport.updateUrl(url, props); + + if (!url.startsWith("mongodb://")) { + System.err.println("ERROR: Invalid URL: '" + url + + "'. Must be of the form " + + "'mongodb://<host1>:<port1>,<host2>:<port2>/database?options'. " + + "http://docs.mongodb.org/manual/reference/connection-string/"); + System.exit(1); + } + + try { + MongoClientURI uri = new MongoClientURI(url); + + String uriDb = uri.getDatabase(); + if (!defaultedUrl && (uriDb != null) && !uriDb.isEmpty() + && !"admin".equals(uriDb)) { + databaseName = uriDb; } else { - System.err.println("ERROR: Invalid writeConcern: '" + writeConcernType + "'. " + - "Must be [ none | safe | normal | fsync_safe | replicas_safe ]"); - System.exit(1); + // If no database is specified in URI, use "ycsb" + databaseName = "ycsb"; + } - try { - // strip out prefix since Java driver doesn't currently support - // standard connection format URL yet - // http://www.mongodb.org/display/DOCS/Connections - if (url.startsWith("mongodb://")) { - url = url.substring(10); - } + readPreference = uri.getOptions().getReadPreference(); + writeConcern = uri.getOptions().getWriteConcern(); - // need to append db to url. - url += "/"+database; - System.out.println("new database url = "+url); - mongo = new Mongo(new DBAddress(url)); - System.out.println("mongo connection created with "+url); - } catch (Exception e1) { - System.err.println( - "Could not initialize MongoDB connection pool for Loader: " - + e1.toString()); - e1.printStackTrace(); - return; - } + mongoClient = new MongoClient(uri); + database = + mongoClient.getDatabase(databaseName) + .withReadPreference(readPreference) + .withWriteConcern(writeConcern); + System.out.println("mongo client connection created with " + url); + } catch (Exception e1) { + System.err + .println("Could not initialize MongoDB connection pool for Loader: " + + e1.toString()); + e1.printStackTrace(); + return; + } } - - @Override - /** - * Cleanup any state for this DB. - * Called once per DB instance; there is one DB instance per client thread. - */ - public void cleanup() throws DBException - { - try { - mongo.close(); - } catch (Exception e1) { - System.err.println( - "Could not close MongoDB connection pool: " - + e1.toString()); - e1.printStackTrace(); - return; - } - } - - @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) { - com.mongodb.DB db=null; - try { - db = mongo.getDB(database); - db.requestStart(); - DBCollection collection = db.getCollection(table); - DBObject q = new BasicDBObject().append("_id", key); - WriteResult res = collection.remove(q, writeConcern); - return res.getN() == 1 ? 0 : 1; - } catch (Exception e) { - System.err.println(e.toString()); - return 1; + } + + /** + * 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 the {@link DB} + * class's description for a discussion of error codes. + */ + @Override + public Status insert(String table, String key, + HashMap<String, ByteIterator> values) { + try { + MongoCollection<Document> collection = database.getCollection(table); + Document toInsert = new Document("_id", key); + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { + toInsert.put(entry.getKey(), entry.getValue().toArray()); + } + + if (batchSize == 1) { + 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); } - finally - { - if (db!=null) - { - db.requestDone(); + } else { + bulkInserts.add(toInsert); + if (bulkInserts.size() == batchSize) { + 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(); } + } + return Status.OK; + } catch (Exception e) { + System.err.println("Exception while trying bulk insert with " + + bulkInserts.size()); + e.printStackTrace(); + return Status.ERROR; } - @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) { - com.mongodb.DB db = null; - try { - db = mongo.getDB(database); - - db.requestStart(); - - DBCollection collection = db.getCollection(table); - DBObject r = new BasicDBObject().append("_id", key); - for(String k: values.keySet()) { - r.put(k, values.get(k).toArray()); - } - WriteResult res = collection.insert(r,writeConcern); - return res.getError() == null ? 0 : 1; - } catch (Exception e) { - e.printStackTrace(); - return 1; - } finally { - if (db!=null) - { - db.requestDone(); - } - } - } + } - @Override - @SuppressWarnings("unchecked") - /** - * 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) { - com.mongodb.DB db = null; - try { - db = mongo.getDB(database); - - db.requestStart(); - - DBCollection collection = db.getCollection(table); - DBObject q = new BasicDBObject().append("_id", key); - DBObject fieldsToReturn = new BasicDBObject(); - boolean returnAllFields = fields == null; - - DBObject queryResult = null; - if (!returnAllFields) { - Iterator<String> iter = fields.iterator(); - while (iter.hasNext()) { - fieldsToReturn.put(iter.next(), 1); - } - queryResult = collection.findOne(q, fieldsToReturn); - } else { - queryResult = collection.findOne(q); - } + /** + * 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 { + MongoCollection<Document> collection = database.getCollection(table); + Document query = new Document("_id", key); - if (queryResult != null) { - result.putAll(queryResult.toMap()); - } - return queryResult != null ? 0 : 1; - } catch (Exception e) { - System.err.println(e.toString()); - return 1; - } finally { - if (db!=null) - { - db.requestDone(); - } + FindIterable<Document> findIterable = collection.find(query); + + if (fields != null) { + Document projection = new Document(); + for (String field : fields) { + projection.put(field, INCLUDE); } + findIterable.projection(projection); + } + + Document queryResult = findIterable.first(); + + if (queryResult != null) { + fillMap(result, queryResult); + } + return queryResult != null ? Status.OK : Status.NOT_FOUND; + } catch (Exception e) { + System.err.println(e.toString()); + 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 the {@link DB} + * 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) { + MongoCursor<Document> cursor = null; + try { + MongoCollection<Document> collection = database.getCollection(table); - @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) { - com.mongodb.DB db = null; - try { - db = mongo.getDB(database); - - db.requestStart(); - - DBCollection collection = db.getCollection(table); - DBObject q = new BasicDBObject().append("_id", key); - DBObject u = new BasicDBObject(); - DBObject fieldsToSet = new BasicDBObject(); - Iterator<String> keys = values.keySet().iterator(); - while (keys.hasNext()) { - String tmpKey = keys.next(); - fieldsToSet.put(tmpKey, values.get(tmpKey).toArray()); + Document scanRange = new Document("$gte", startkey); + Document query = new Document("_id", scanRange); + Document sort = new Document("_id", INCLUDE); - } - u.put("$set", fieldsToSet); - WriteResult res = collection.update(q, u, false, false, - writeConcern); - return res.getN() == 1 ? 0 : 1; - } catch (Exception e) { - System.err.println(e.toString()); - return 1; - } finally { - if (db!=null) - { - db.requestDone(); - } + FindIterable<Document> findIterable = + collection.find(query).sort(sort).limit(recordcount); + + if (fields != null) { + Document projection = new Document(); + for (String fieldName : fields) { + projection.put(fieldName, INCLUDE); } + findIterable.projection(projection); + } + + cursor = findIterable.iterator(); + + if (!cursor.hasNext()) { + System.err.println("Nothing found in scan for key " + startkey); + return Status.ERROR; + } + + result.ensureCapacity(recordcount); + + while (cursor.hasNext()) { + HashMap<String, ByteIterator> resultMap = + new HashMap<String, ByteIterator>(); + + Document obj = cursor.next(); + fillMap(resultMap, obj); + + result.add(resultMap); + } + + return Status.OK; + } catch (Exception e) { + System.err.println(e.toString()); + return Status.ERROR; + } finally { + if (cursor != null) { + cursor.close(); + } } + } - @Override - @SuppressWarnings("unchecked") - /** - * 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) { - com.mongodb.DB db=null; - try { - db = mongo.getDB(database); - db.requestStart(); - DBCollection collection = db.getCollection(table); - // { "_id":{"$gte":startKey, "$lte":{"appId":key+"\uFFFF"}} } - DBObject scanRange = new BasicDBObject().append("$gte", startkey); - DBObject q = new BasicDBObject().append("_id", scanRange); - DBCursor cursor = collection.find(q).limit(recordcount); - while (cursor.hasNext()) { - //toMap() returns a Map, but result.add() expects a Map<String,String>. Hence, the suppress warnings. - result.add(StringByteIterator.getByteIteratorMap((Map<String,String>)cursor.next().toMap())); - } + /** + * 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 { + MongoCollection<Document> collection = database.getCollection(table); - return 0; - } catch (Exception e) { - System.err.println(e.toString()); - return 1; - } - finally - { - if (db!=null) - { - db.requestDone(); - } - } + Document query = new Document("_id", key); + Document fieldsToSet = new Document(); + for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { + fieldsToSet.put(entry.getKey(), entry.getValue().toArray()); + } + Document update = new Document("$set", fieldsToSet); + UpdateResult result = collection.updateOne(query, update); + if (result.wasAcknowledged() && result.getMatchedCount() == 0) { + System.err.println("Nothing updated for key " + key); + return Status.NOT_FOUND; + } + return Status.OK; + } catch (Exception e) { + System.err.println(e.toString()); + return Status.ERROR; } -} + } + /** + * Fills the map with the values from the DBObject. + * + * @param resultMap + * The map to fill/ + * @param obj + * The object to copy values from. + */ + protected void fillMap(Map<String, ByteIterator> resultMap, Document obj) { + for (Map.Entry<String, Object> entry : obj.entrySet()) { + if (entry.getValue() instanceof Binary) { + resultMap.put(entry.getKey(), + new ByteArrayByteIterator(((Binary) entry.getValue()).getData())); + } + } + } +} diff --git a/mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java b/mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java new file mode 100644 index 0000000000000000000000000000000000000000..62092a0d10a51e4384156235f4a59504585ea853 --- /dev/null +++ b/mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java @@ -0,0 +1,145 @@ +/* + * 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. + */ +package com.yahoo.ycsb.db; + +import java.util.Properties; + +/** + * OptionsSupport provides methods for handling legacy options. + * + * @author rjm + */ +public final class OptionsSupport { + + /** Value for an unavailable property. */ + private static final String UNAVAILABLE = "n/a"; + + /** + * Updates the URL with the appropriate attributes if legacy properties are + * set and the URL does not have the property already set. + * + * @param url + * The URL to update. + * @param props + * The legacy properties. + * @return The updated URL. + */ + public static String updateUrl(String url, Properties props) { + String result = url; + + // max connections. + final String maxConnections = + props.getProperty("mongodb.maxconnections", UNAVAILABLE).toLowerCase(); + if (!UNAVAILABLE.equals(maxConnections)) { + result = addUrlOption(result, "maxPoolSize", maxConnections); + } + + // Blocked thread multiplier. + final String threadsAllowedToBlockForConnectionMultiplier = + props + .getProperty( + "mongodb.threadsAllowedToBlockForConnectionMultiplier", + UNAVAILABLE).toLowerCase(); + if (!UNAVAILABLE.equals(threadsAllowedToBlockForConnectionMultiplier)) { + result = + addUrlOption(result, "waitQueueMultiple", + threadsAllowedToBlockForConnectionMultiplier); + } + + // write concern + String writeConcernType = + props.getProperty("mongodb.writeConcern", UNAVAILABLE).toLowerCase(); + if (!UNAVAILABLE.equals(writeConcernType)) { + if ("errors_ignored".equals(writeConcernType)) { + result = addUrlOption(result, "w", "0"); + } else if ("unacknowledged".equals(writeConcernType)) { + result = addUrlOption(result, "w", "0"); + } else if ("acknowledged".equals(writeConcernType)) { + result = addUrlOption(result, "w", "1"); + } else if ("journaled".equals(writeConcernType)) { + result = addUrlOption(result, "journal", "true"); // this is the + // documented option + // name + result = addUrlOption(result, "j", "true"); // but keep this until + // MongoDB Java driver + // supports "journal" option + } else if ("replica_acknowledged".equals(writeConcernType)) { + result = addUrlOption(result, "w", "2"); + } else if ("majority".equals(writeConcernType)) { + result = addUrlOption(result, "w", "majority"); + } else { + System.err.println("WARNING: Invalid writeConcern: '" + + writeConcernType + "' will be ignored. " + + "Must be one of [ unacknowledged | acknowledged | " + + "journaled | replica_acknowledged | majority ]"); + } + } + + // read preference + String readPreferenceType = + props.getProperty("mongodb.readPreference", UNAVAILABLE).toLowerCase(); + if (!UNAVAILABLE.equals(readPreferenceType)) { + if ("primary".equals(readPreferenceType)) { + result = addUrlOption(result, "readPreference", "primary"); + } else if ("primary_preferred".equals(readPreferenceType)) { + result = addUrlOption(result, "readPreference", "primaryPreferred"); + } else if ("secondary".equals(readPreferenceType)) { + result = addUrlOption(result, "readPreference", "secondary"); + } else if ("secondary_preferred".equals(readPreferenceType)) { + result = addUrlOption(result, "readPreference", "secondaryPreferred"); + } else if ("nearest".equals(readPreferenceType)) { + result = addUrlOption(result, "readPreference", "nearest"); + } else { + System.err.println("WARNING: Invalid readPreference: '" + + readPreferenceType + "' will be ignored. " + + "Must be one of [ primary | primary_preferred | " + + "secondary | secondary_preferred | nearest ]"); + } + } + + return result; + } + + /** + * Adds an option to the url if it does not already contain the option. + * + * @param url + * The URL to append the options to. + * @param name + * The name of the option. + * @param value + * The value for the option. + * @return The updated URL. + */ + private static String addUrlOption(String url, String name, String value) { + String fullName = name + "="; + if (!url.contains(fullName)) { + if (url.contains("?")) { + return url + "&" + fullName + value; + } + return url + "?" + fullName + value; + } + return url; + } + + /** + * Hidden Constructor. + */ + private OptionsSupport() { + // Nothing. + } +} diff --git a/mongodb/src/main/java/com/yahoo/ycsb/db/package-info.java b/mongodb/src/main/java/com/yahoo/ycsb/db/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..6c64e3fa7434b191b5bc4374cb0c763fc633e769 --- /dev/null +++ b/mongodb/src/main/java/com/yahoo/ycsb/db/package-info.java @@ -0,0 +1,32 @@ +/* + * 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.mongodb.org/">MongoDB</a>. + * For additional details on using and configuring the binding see the + * accompanying <a + * href="https://github.com/brianfrankcooper/YCSB/blob/master/mongodb/README.md" + * >README.md</a>. + * <p> + * A YCSB binding is provided for both the the + * <a href="http://www.allanbank.com/mongodb-async-driver/">Asynchronous + * Java Driver</a> and the MongoDB Inc. + * <a href="http://docs.mongodb.org/ecosystem/drivers/java/">driver</a>. + * </p> + */ +package com.yahoo.ycsb.db; + diff --git a/mongodb/src/test/java/com/yahoo/ycsb/db/AbstractDBTestCases.java b/mongodb/src/test/java/com/yahoo/ycsb/db/AbstractDBTestCases.java new file mode 100644 index 0000000000000000000000000000000000000000..9a0b095f3d7c36a864b31744cd4714167704e9f6 --- /dev/null +++ b/mongodb/src/test/java/com/yahoo/ycsb/db/AbstractDBTestCases.java @@ -0,0 +1,339 @@ +/* + * 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. + */ +package com.yahoo.ycsb.db; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.junit.Assert.assertFalse; +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; + +/** + * MongoDbClientTest provides runs the basic DB test cases. + * <p> + * The tests will be skipped if MongoDB is not running on port 27017 on the + * local machine. See the README.md for how to get MongoDB running. + * </p> + */ +@SuppressWarnings("boxing") +public abstract class AbstractDBTestCases { + + /** The default port for MongoDB. */ + private static final int MONGODB_DEFAULT_PORT = 27017; + + /** + * Verifies the mongod process (or some process) is running on port 27017, if + * not the tests are skipped. + */ + @BeforeClass + public static void setUpBeforeClass() { + // Test if we can connect. + Socket socket = null; + try { + // Connect + socket = new Socket(InetAddress.getLocalHost(), MONGODB_DEFAULT_PORT); + assertThat("Socket is not bound.", socket.getLocalPort(), not(-1)); + } catch (IOException connectFailed) { + assumeNoException("MongoDB is not running. Skipping tests.", + connectFailed); + } finally { + if (socket != null) { + try { + socket.close(); + } catch (IOException ignore) { + // Ignore. + } + } + socket = null; + } + } + + /** + * Test method for {@link DB#insert}, {@link DB#read}, and {@link DB#delete} . + */ + @Test + public void testInsertReadDelete() { + final DB client = getDB(); + + final String table = getClass().getSimpleName(); + final String id = "delete"; + + 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(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()); + } + + result = client.delete(table, id); + 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(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(Status.NOT_FOUND)); + } + + /** + * Test method for {@link DB#insert}, {@link DB#read}, and {@link DB#update} . + */ + @Test + public void testInsertReadUpdate() { + DB client = getDB(); + + final String table = getClass().getSimpleName(); + final String id = "update"; + + 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(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(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#scan}. + */ + @Test + public void testScan() { + final DB client = getDB(); + + final String table = getClass().getSimpleName(); + + // Insert a bunch of documents. + for (int i = 0; i < 100; ++i) { + HashMap<String, ByteIterator> inserted = + new HashMap<String, ByteIterator>(); + inserted.put("a", new ByteArrayByteIterator(new byte[] { + (byte) (i & 0xFF), (byte) (i >> 8 & 0xFF), (byte) (i >> 16 & 0xFF), + (byte) (i >> 24 & 0xFF) })); + 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>>(); + 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); + 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) ((i + 50) & 0xFF)))); + assertTrue(iter.hasNext()); + assertThat(iter.nextByte(), + is(Byte.valueOf((byte) ((i + 50) >> 8 & 0xFF)))); + assertTrue(iter.hasNext()); + assertThat(iter.nextByte(), + is(Byte.valueOf((byte) ((i + 50) >> 16 & 0xFF)))); + assertTrue(iter.hasNext()); + assertThat(iter.nextByte(), + is(Byte.valueOf((byte) ((i + 50) >> 24 & 0xFF)))); + assertFalse(iter.hasNext()); + } + } + } + + /** + * 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); + + /** + * Creates a zero padded integer. + * + * @param i + * The integer to padd. + * @return The padded integer. + */ + private String padded(int i) { + String result = String.valueOf(i); + while (result.length() < 5) { + result = "0" + result; + } + return result; + } + +} \ No newline at end of file diff --git a/mongodb/src/test/java/com/yahoo/ycsb/db/AsyncMongoDbClientTest.java b/mongodb/src/test/java/com/yahoo/ycsb/db/AsyncMongoDbClientTest.java new file mode 100644 index 0000000000000000000000000000000000000000..ff75def61d7a4041235029f9f9cdf301b9cb2adb --- /dev/null +++ b/mongodb/src/test/java/com/yahoo/ycsb/db/AsyncMongoDbClientTest.java @@ -0,0 +1,68 @@ +/* + * 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. + */ +package com.yahoo.ycsb.db; + +import static org.junit.Assume.assumeNoException; + +import java.util.Properties; + +import org.junit.After; + +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; + + /** + * Stops the test client. + */ + @After + public void tearDown() { + try { + myClient.cleanup(); + } catch (Exception error) { + // Ignore. + } finally { + myClient = null; + } + } + + /** + * {@inheritDoc} + * <p> + * Overridden to return the {@link AsyncMongoDbClient}. + * </p> + */ + @Override + protected DB getDB(Properties props) { + if( myClient == null ) { + myClient = new AsyncMongoDbClient(); + myClient.setProperties(props); + try { + myClient.init(); + } catch (Exception error) { + assumeNoException(error); + } + } + return myClient; + } +} diff --git a/mongodb/src/test/java/com/yahoo/ycsb/db/MongoDbClientTest.java b/mongodb/src/test/java/com/yahoo/ycsb/db/MongoDbClientTest.java new file mode 100644 index 0000000000000000000000000000000000000000..6a0bb58066d790a60f61b93565a102ebbb223c2b --- /dev/null +++ b/mongodb/src/test/java/com/yahoo/ycsb/db/MongoDbClientTest.java @@ -0,0 +1,68 @@ +/* + * 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. + */ +package com.yahoo.ycsb.db; + +import static org.junit.Assume.assumeNoException; + +import java.util.Properties; + +import org.junit.After; + +import com.yahoo.ycsb.DB; + +/** + * MongoDbClientTest provides runs the basic workload operations. + */ +public class MongoDbClientTest extends AbstractDBTestCases { + + /** The client to use. */ + private MongoDbClient myClient = null; + + /** + * Stops the test client. + */ + @After + public void tearDown() { + try { + myClient.cleanup(); + } catch (Exception error) { + // Ignore. + } finally { + myClient = null; + } + } + + /** + * {@inheritDoc} + * <p> + * Overridden to return the {@link MongoDbClient}. + * </p> + */ + @Override + protected DB getDB(Properties props) { + if( myClient == null ) { + myClient = new MongoDbClient(); + myClient.setProperties(props); + try { + myClient.init(); + } catch (Exception error) { + assumeNoException(error); + } + } + return myClient; + } +} diff --git a/mongodb/src/test/java/com/yahoo/ycsb/db/OptionsSupportTest.java b/mongodb/src/test/java/com/yahoo/ycsb/db/OptionsSupportTest.java new file mode 100644 index 0000000000000000000000000000000000000000..be7f52fe1d6a8ffbe53bdd9a743869c1eccbca60 --- /dev/null +++ b/mongodb/src/test/java/com/yahoo/ycsb/db/OptionsSupportTest.java @@ -0,0 +1,184 @@ +/* + * 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. + */ +package com.yahoo.ycsb.db; + +import static com.yahoo.ycsb.db.OptionsSupport.updateUrl; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +import java.util.Properties; + +import org.junit.Test; + +/** + * OptionsSupportTest provides tests for the OptionsSupport class. + * + * @author rjm + */ +public class OptionsSupportTest { + + /** + * Test method for {@link OptionsSupport#updateUrl(String, Properties)} for + * {@code mongodb.maxconnections}. + */ + @Test + public void testUpdateUrlMaxConnections() { + assertThat( + updateUrl("mongodb://locahost:27017/", + props("mongodb.maxconnections", "1234")), + is("mongodb://locahost:27017/?maxPoolSize=1234")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", + props("mongodb.maxconnections", "1234")), + is("mongodb://locahost:27017/?foo=bar&maxPoolSize=1234")); + assertThat( + updateUrl("mongodb://locahost:27017/?maxPoolSize=1", + props("mongodb.maxconnections", "1234")), + is("mongodb://locahost:27017/?maxPoolSize=1")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", props("foo", "1234")), + is("mongodb://locahost:27017/?foo=bar")); + } + + /** + * Test method for {@link OptionsSupport#updateUrl(String, Properties)} for + * {@code mongodb.threadsAllowedToBlockForConnectionMultiplier}. + */ + @Test + public void testUpdateUrlWaitQueueMultiple() { + assertThat( + updateUrl( + "mongodb://locahost:27017/", + props("mongodb.threadsAllowedToBlockForConnectionMultiplier", + "1234")), + is("mongodb://locahost:27017/?waitQueueMultiple=1234")); + assertThat( + updateUrl( + "mongodb://locahost:27017/?foo=bar", + props("mongodb.threadsAllowedToBlockForConnectionMultiplier", + "1234")), + is("mongodb://locahost:27017/?foo=bar&waitQueueMultiple=1234")); + assertThat( + updateUrl( + "mongodb://locahost:27017/?waitQueueMultiple=1", + props("mongodb.threadsAllowedToBlockForConnectionMultiplier", + "1234")), is("mongodb://locahost:27017/?waitQueueMultiple=1")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", props("foo", "1234")), + is("mongodb://locahost:27017/?foo=bar")); + } + + /** + * Test method for {@link OptionsSupport#updateUrl(String, Properties)} for + * {@code mongodb.threadsAllowedToBlockForConnectionMultiplier}. + */ + @Test + public void testUpdateUrlWriteConcern() { + assertThat( + updateUrl("mongodb://locahost:27017/", + props("mongodb.writeConcern", "errors_ignored")), + is("mongodb://locahost:27017/?w=0")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", + props("mongodb.writeConcern", "unacknowledged")), + is("mongodb://locahost:27017/?foo=bar&w=0")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", + props("mongodb.writeConcern", "acknowledged")), + is("mongodb://locahost:27017/?foo=bar&w=1")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", + props("mongodb.writeConcern", "journaled")), + is("mongodb://locahost:27017/?foo=bar&journal=true&j=true")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", + props("mongodb.writeConcern", "replica_acknowledged")), + is("mongodb://locahost:27017/?foo=bar&w=2")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", + props("mongodb.writeConcern", "majority")), + is("mongodb://locahost:27017/?foo=bar&w=majority")); + + // w already exists. + assertThat( + updateUrl("mongodb://locahost:27017/?w=1", + props("mongodb.writeConcern", "acknowledged")), + is("mongodb://locahost:27017/?w=1")); + + // Unknown options + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", props("foo", "1234")), + is("mongodb://locahost:27017/?foo=bar")); + } + + /** + * Test method for {@link OptionsSupport#updateUrl(String, Properties)} for + * {@code mongodb.threadsAllowedToBlockForConnectionMultiplier}. + */ + @Test + public void testUpdateUrlReadPreference() { + assertThat( + updateUrl("mongodb://locahost:27017/", + props("mongodb.readPreference", "primary")), + is("mongodb://locahost:27017/?readPreference=primary")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", + props("mongodb.readPreference", "primary_preferred")), + is("mongodb://locahost:27017/?foo=bar&readPreference=primaryPreferred")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", + props("mongodb.readPreference", "secondary")), + is("mongodb://locahost:27017/?foo=bar&readPreference=secondary")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", + props("mongodb.readPreference", "secondary_preferred")), + is("mongodb://locahost:27017/?foo=bar&readPreference=secondaryPreferred")); + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", + props("mongodb.readPreference", "nearest")), + is("mongodb://locahost:27017/?foo=bar&readPreference=nearest")); + + // readPreference already exists. + assertThat( + updateUrl("mongodb://locahost:27017/?readPreference=primary", + props("mongodb.readPreference", "secondary")), + is("mongodb://locahost:27017/?readPreference=primary")); + + // Unknown options + assertThat( + updateUrl("mongodb://locahost:27017/?foo=bar", props("foo", "1234")), + is("mongodb://locahost:27017/?foo=bar")); + } + + /** + * Factory method for a {@link Properties} object. + * + * @param key + * The key for the property to set. + * @param value + * The value for the property to set. + * @return The {@link Properties} with the property added. + */ + private Properties props(String key, String value) { + Properties props = new Properties(); + + props.setProperty(key, value); + + return props; + } + +} 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 4bc4664bd87262dbef889829de5948df7d737515..48ef883e31f958cca920f0e107e75f8ec1ca474d 100644 --- a/nosqldb/pom.xml +++ b/nosqldb/pom.xml @@ -1,10 +1,28 @@ <?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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> <artifactId>nosqldb-binding</artifactId> @@ -20,37 +38,7 @@ <groupId>com.yahoo.ycsb</groupId> <artifactId>core</artifactId> <version>${project.version}</version> + <scope>provided</scope> </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> - - <repositories> - <repository> - <id>central</id> - <url>file:///Users/michi/.m2/repository</url> - </repository> - </repositories> </project> diff --git a/nosqldb/src/main/conf/nosqldb.properties b/nosqldb/src/main/conf/nosqldb.properties index 22f2504e110e52e2df94accda85a024ad7efccb4..9ab5cd1c77d7beaf0f9edcab0b6a92435290998d 100644 --- a/nosqldb/src/main/conf/nosqldb.properties +++ b/nosqldb/src/main/conf/nosqldb.properties @@ -1,3 +1,18 @@ +# Copyright (c) 2012 YCSB contributors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You +# may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. See accompanying +# LICENSE file. + # # Sample property file for Oracle NoSQL Database client # diff --git a/nosqldb/src/main/conf/script.txt b/nosqldb/src/main/conf/script.txt index 87f1c8af413ceeb9be4c1317e4ddc9a91d12e85b..679d76213878dc2f036c4e68475c72d2958ba94c 100644 --- a/nosqldb/src/main/conf/script.txt +++ b/nosqldb/src/main/conf/script.txt @@ -1,3 +1,18 @@ +# Copyright (c) 2012 YCSB contributors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You +# may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. See accompanying +# LICENSE file. + # Simple configuration file; only one node in a system configure kvstore plan -execute -name "Deploy DC" deploy-datacenter "Local" 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 a19d8f8fe47446f32ef235284786920e46730282..1426678dcc185c9631238c5daf69bb2c2879875a 100644 --- a/nosqldb/src/main/java/com/yahoo/ycsb/db/NoSqlDbClient.java +++ b/nosqldb/src/main/java/com/yahoo/ycsb/db/NoSqlDbClient.java @@ -1,3 +1,20 @@ +/** + * Copyright (c) 2012 YCSB contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You + * may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. See accompanying + * LICENSE file. + */ + package com.yahoo.ycsb.db; import java.util.ArrayList; diff --git a/orientdb/README.md b/orientdb/README.md index 05211935a07d5f181dcfaf5e4493884da43bd29f..02d1a23ef231fabd55df70507093656ac71a57c0 100644 --- a/orientdb/README.md +++ b/orientdb/README.md @@ -1,3 +1,20 @@ +<!-- +Copyright (c) 2012 YCSB contributors. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You +may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. See accompanying +LICENSE file. +--> + ## Quick Start This section describes how to run YCSB on OrientDB running locally. diff --git a/orientdb/pom.xml b/orientdb/pom.xml index 8654435be25cfd65288ee10bb5fb318d7ef2130b..7e450344ca70ff600c4dacdad593ff930f2a9564 100644 --- a/orientdb/pom.xml +++ b/orientdb/pom.xml @@ -1,10 +1,28 @@ <?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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> <artifactId>orientdb-binding</artifactId> @@ -22,36 +40,12 @@ <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.0.1</version> + <version>1.7.10</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/orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java b/orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java index 490851a72d79597e436cdc1b5edcfaa90dacb6c2..2d8706e99cf62feed6dc0ee62bbfcec479afe14e 100644 --- a/orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java +++ b/orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java @@ -1,3 +1,20 @@ +/** + * 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. + */ + /** * OrientDB client binding for YCSB. * @@ -7,24 +24,26 @@ package com.yahoo.ycsb.db; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map.Entry; -import java.util.Properties; -import java.util.Set; -import java.util.Vector; - import com.orientechnologies.orient.core.config.OGlobalConfiguration; 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.index.OIndexCursor; import com.orientechnologies.orient.core.intent.OIntentMassiveInsert; import com.orientechnologies.orient.core.record.ORecordInternal; 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 java.util.HashMap; +import java.util.Map.Entry; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; + /** * OrientDB client for YCSB framework. * @@ -40,8 +59,8 @@ import com.yahoo.ycsb.StringByteIterator; */ public class OrientDBClient extends DB { - private ODatabaseDocumentTx db; private static final String CLASS = "usertable"; + private ODatabaseDocumentTx db; private ODictionary<ORecordInternal<?>> dictionary; /** @@ -51,7 +70,12 @@ public class OrientDBClient extends DB { // initialize OrientDB driver Properties props = getProperties(); - String url = props.getProperty("orientdb.url", "local:C:/temp/databases/ycsb"); + 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"); + String user = props.getProperty("orientdb.user", "admin"); String password = props.getProperty("orientdb.password", "admin"); Boolean newdb = Boolean.parseBoolean(props.getProperty("orientdb.newdb", "false")); @@ -107,7 +131,7 @@ public class OrientDBClient 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. 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()) @@ -115,11 +139,11 @@ public class OrientDBClient extends DB { document.save(); dictionary.put(key, document); - return 0; + return Status.OK; } catch (Exception e) { e.printStackTrace(); } - return 1; + return Status.ERROR; } @Override @@ -130,14 +154,14 @@ public class OrientDBClient extends DB { * @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 @@ -150,7 +174,7 @@ public class OrientDBClient extends DB { * @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) { @@ -160,12 +184,12 @@ public class OrientDBClient extends DB { 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 @@ -178,19 +202,19 @@ public class OrientDBClient 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. 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()) document.field(entry.getKey(), entry.getValue()); document.save(); - return 0; + return Status.OK; } } catch (Exception e) { e.printStackTrace(); } - return 1; + return Status.ERROR; } @Override @@ -204,21 +228,24 @@ public class OrientDBClient 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. 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) { try { - final Collection<ODocument> documents = dictionary.getIndex().getEntriesMajor(startkey, true, recordcount); - for (ODocument document : documents) { - final HashMap<String, ByteIterator> entry = new HashMap<String, ByteIterator>(fields.size()); - result.add(entry); + final OIndexCursor entries = dictionary.getIndex().iterateEntriesMajor(startkey, true, true); + while (entries.hasNext()) { + final Entry<Object, OIdentifiable> entry = entries.nextEntry(); + final ODocument document = entry.getValue().getRecord(); + + final HashMap<String, ByteIterator> map = new HashMap<String, ByteIterator>(); + result.add(map); for (String field : fields) - entry.put(field, new StringByteIterator((String) document.field(field))); + map.put(field, new StringByteIterator((String) document.field(field))); } - return 0; + return Status.OK; } catch (Exception e) { e.printStackTrace(); } - return 1; + return Status.ERROR; } } diff --git a/pom.xml b/pom.xml index 59abef40ddd91a59d05178557676ec5d608ebc89..a948a5de7b3c22f8d5e679d75acc78686de32d20 100644 --- a/pom.xml +++ b/pom.xml @@ -1,11 +1,27 @@ <?xml version="1.0" encoding="UTF-8"?> -<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/xsd/maven-4.0.0.xsd"> +<!-- +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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.yahoo.ycsb</groupId> <artifactId>root</artifactId> - <version>0.1.4</version> + <version>0.6.0-SNAPSHOT</version> <packaging>pom</packaging> <name>YCSB Root</name> @@ -13,68 +29,100 @@ <description> This is the top level project that builds, packages the core and all the DB bindings for YCSB infrastructure. </description> - <dependencies> - <!-- voldemort --> - <dependency> - <groupId>checkstyle</groupId> - <artifactId>checkstyle</artifactId> - <version>5.0</version> - </dependency> - <dependency> - <groupId>org.jdom</groupId> - <artifactId>jdom</artifactId> - <version>1.1</version> - </dependency> - <dependency> - <groupId>com.google.collections</groupId> - <artifactId>google-collections</artifactId> - <version>1.0</version> - </dependency> - <!-- - Nail down slf4j version to 1.6 so that it defaults to no-op logger. - http://www.slf4j.org/codes.html#StaticLoggerBinder - --> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.6.4</version> - </dependency> - </dependencies> - + + <scm> + <connection>scm:git:git://github.com/brianfrankcooper/YCSB.git</connection> + <tag>master</tag> + <url>https://github.com/brianfrankcooper/YCSB</url> + </scm> + <dependencyManagement> + <dependencies> + <!-- voldemort --> + <dependency> + <groupId>checkstyle</groupId> + <artifactId>checkstyle</artifactId> + <version>5.0</version> + </dependency> + <dependency> + <groupId>org.jdom</groupId> + <artifactId>jdom</artifactId> + <version>1.1</version> + </dependency> + <dependency> + <groupId>com.google.collections</groupId> + <artifactId>google-collections</artifactId> + <version>1.0</version> + </dependency> + <!-- + Nail down slf4j version to 1.6 so that it defaults to no-op logger. + http://www.slf4j.org/codes.html#StaticLoggerBinder + --> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.6.4</version> + </dependency> + </dependencies> + </dependencyManagement> + <!-- Properties Management --> <properties> - <maven.assembly.version>2.2.1</maven.assembly.version> - <hbase.version>0.92.1</hbase.version> - <cassandra.version>0.7.0</cassandra.version> - <infinispan.version>7.1.0.CR1</infinispan.version> + <maven.assembly.version>2.5.5</maven.assembly.version> + <maven.dependency.version>2.10</maven.dependency.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> + <cassandra2.cql.version>2.1.8</cassandra2.cql.version> + <gemfire.version>8.1.0</gemfire.version> + <infinispan.version>7.2.2.Final</infinispan.version> + <kudu.version>0.5.0</kudu.version> <openjpa.jdbc.version>2.1.1</openjpa.jdbc.version> - <mapkeeper.version>1.0</mapkeeper.version> - <mongodb.version>2.8.0</mongodb.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> <redis.version>2.0.0</redis.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> + <aerospike.version>3.1.2</aerospike.version> </properties> <modules> - <!--module>build-tools</module--> + <!-- our internals --> <module>core</module> - <module>hbase</module> - <module>hypertable</module> + <module>binding-parent</module> + <!-- all the datastore bindings, lex sorted please --> + <module>accumulo</module> + <module>aerospike</module> <module>cassandra</module> + <module>cassandra2</module> + <module>couchbase</module> + <module>distribution</module> <module>dynamodb</module> - <!--<module>gemfire</module>--> + <module>elasticsearch</module> + <module>gemfire</module> + <module>googledatastore</module> + <module>hbase094</module> + <module>hbase098</module> + <module>hbase10</module> + <module>hypertable</module> <module>infinispan</module> <module>jdbc</module> - <module>mapkeeper</module> + <module>kudu</module> + <!--<module>mapkeeper</module>--> <module>mongodb</module> - <module>orientdb</module> <!--module>nosqldb</module--> + <module>orientdb</module> <module>redis</module> - <module>voldemort</module> - <module>distribution</module> + <module>tarantool</module> + <!--<module>voldemort</module>--> </modules> <build> @@ -82,7 +130,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> + <version>3.3</version> <configuration> <source>1.6</source> <target>1.6</target> @@ -91,7 +139,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.6</version> + <version>2.15</version> <configuration> <consoleOutput>true</consoleOutput> <configLocation>checkstyle.xml</configLocation> diff --git a/redis/README.md b/redis/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bc883271b071e9419195e4c390ed9268ef35eef7 --- /dev/null +++ b/redis/README.md @@ -0,0 +1,56 @@ +<!-- +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. +--> + +## Quick Start + +This section describes how to run YCSB on Redis. + +### 1. Start Redis + +### 2. Install Java and Maven + +### 3. Set Up YCSB + +Git clone YCSB and compile: + + git clone http://github.com/brianfrankcooper/YCSB.git + cd YCSB + mvn -pl com.yahoo.ycsb:redis-binding -am clean package + +### 4. Provide Redis Connection Parameters + +Set the host, port, and password (do not redis auth is not turned on) in the +workload you plan to run. + +- `redis.host` +- `redis.port` +- `redis.password` + +Or, you can set configs with the shell command, EG: + + ./bin/ycsb load redis -s -P workloads/workloada -p "redis.host=127.0.0.1" -p "redis.port=6379" > outputLoad.txt + +### 5. Load data and run tests + +Load the data: + + ./bin/ycsb load redis -s -P workloads/workloada > outputLoad.txt + +Run the workload test: + + ./bin/ycsb run redis -s -P workloads/workloada > outputRun.txt + diff --git a/redis/pom.xml b/redis/pom.xml index 5f5ee32069df9b4646ee40adb69fc360d5d74ae7..c374869cbd257296bd9662445a1644e914aa4e86 100644 --- a/redis/pom.xml +++ b/redis/pom.xml @@ -1,10 +1,28 @@ <?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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> <artifactId>redis-binding</artifactId> @@ -21,32 +39,31 @@ <groupId>com.yahoo.ycsb</groupId> <artifactId>core</artifactId> <version>${project.version}</version> + <scope>provided</scope> </dependency> </dependencies> - - <build> + <build> <plugins> - <plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>${maven.assembly.version}</version> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.15</version> <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - <appendAssemblyId>false</appendAssemblyId> + <consoleOutput>true</consoleOutput> + <configLocation>../checkstyle.xml</configLocation> + <failOnViolation>true</failOnViolation> + <failsOnError>true</failsOnError> </configuration> <executions> <execution> - <phase>package</phase> + <id>validate</id> + <phase>validate</phase> <goals> - <goal>single</goal> + <goal>checkstyle</goal> </goals> </execution> </executions> </plugin> </plugins> </build> - - </project> 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 0d5c3ff1efee1522b57d56688b90bf0be2e5fcba..fbcfcb0a31dfb4c36a5b68a78538448ca03a6ad8 100644 --- a/redis/src/main/java/com/yahoo/ycsb/db/RedisClient.java +++ b/redis/src/main/java/com/yahoo/ycsb/db/RedisClient.java @@ -1,3 +1,20 @@ +/** + * Copyright (c) 2012 YCSB contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You + * may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. See accompanying + * LICENSE file. + */ + /** * Redis client binding for YCSB. * @@ -6,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; @@ -19,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; - - public static final String HOST_PROPERTY = "redis.host"; - public static final String PORT_PROPERTY = "redis.port"; - public static final String PASSWORD_PROPERTY = "redis.password"; + private Jedis jedis; - public static final String INDEX_KEY = "_indices"; + 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 void init() throws DBException { - Properties props = getProperties(); - int port; + public static final String INDEX_KEY = "_indices"; - 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); - } - } + public void init() throws DBException { + Properties props = getProperties(); + int port; - public void cleanup() throws DBException { - jedis.disconnect(); + String portString = props.getProperty(PORT_PROPERTY); + if (portString != null) { + port = Integer.parseInt(portString); + } else { + port = Protocol.DEFAULT_PORT; } + String host = props.getProperty(HOST_PROPERTY); - /* 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(); - } + jedis = new Jedis(host, port); + jedis.connect(); - //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; + String password = props.getProperty(PASSWORD_PROPERTY); + if (password != null) { + jedis.auth(password); } - - @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; + } + + 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 delete(String table, String key) { - return jedis.del(key) == 0 - && jedis.zrem(INDEX_KEY, key) == 0 - ? 1 : 0; + 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 update(String table, String key, HashMap<String, ByteIterator> values) { - return jedis.hmset(key, StringByteIterator.getStringMap(values)).equals("OK") ? 0 : 1; + 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 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/tarantool/README.md b/tarantool/README.md new file mode 100644 index 0000000000000000000000000000000000000000..26854e436a8e0294f6a7e0aa0e58156d78a432df --- /dev/null +++ b/tarantool/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. +--> + +# Tarantool + +## Introduction + +Tarantool is a NoSQL In-Memory database. +It's distributed under BSD licence and is hosted on [github][tarantool-github]. + +Tarantool features: + +* Defferent index types with iterators: + - HASH (the fastest) + - TREE (range and ordered retreival) + - BITSET (bit mask search) + - RTREE (geo search) +* multipart keys for HASH and TREE indexes +* Data persistence with by Write Ahead Log (WAL) and snapshots. +* asynchronous master-master replication, hot standby. +* coroutines and async. IO are used to implement high-performance lock-free access to data. + - socket-io/file-io with yeilds from lua +* stored procedures in Lua (Using LuaJIT) +* supports plugins written on C/C++ (Have two basic plugins for working with MySQL and PostgreSQL) +* Authentication and access control + +## Quick start + +This section descrives how to run YCSB against a local Tarantool instance + +### 1. Start Tarantool + +First, clone Tarantool from it's own git repo and build it (described in our [README.md][tarantool-readme]): + + cp %YCSB%/tarantool/conf/tarantool-tree.lua <vardir>/tarantool.lua + cp %TNT%/src/box/tarantool <vardir> + cd <vardir> + ./tarantool tarantool.lua + +OR you can simply download ans install a binary package for your GNU/Linux or BSD distro from http://tarantool.org/download.html + +### 2. Run YCSB + +Now you are ready to run! First, load the data: + + ./bin/ycsb load tarantool -s -P workloads/workloada + +Then, run the workload: + + ./bin/ycsb run tarantool -s -P workloads/workloada + +See the next section for the list of configuration parameters for Tarantool. + +## Tarantool Configuration Parameters + +#### 'tarantool.host' (default : 'localhost') +Which host YCSB must use for connection with Tarantool +#### 'tarantool.port' (default : 3301) +Which port YCSB must use for connection with Tarantool +#### 'tarantool.space' (default : 1024) + (possible values: 0 .. 255) +Which space YCSB must use for benchmark Tarantool + +[tarantool-github]: https://github.com/tarantool/tarantool/ +[tarantool-readme]: https://github.com/tarantool/tarantool/blob/master/README.md diff --git a/tarantool/pom.xml b/tarantool/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..8016e5daf88f727a453cdb37eedf0ba97f0cf22a --- /dev/null +++ b/tarantool/pom.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> + +<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.6.0-SNAPSHOT</version> + <relativePath>../binding-parent/</relativePath> + </parent> + + <artifactId>tarantool-binding</artifactId> + <name>Tarantool DB Binding</name> + <packaging>jar</packaging> + + <dependencies> + <dependency> + <groupId>org.tarantool</groupId> + <artifactId>connector</artifactId> + <version>${tarantool.version}</version> + </dependency> + <dependency> + <groupId>com.yahoo.ycsb</groupId> + <artifactId>core</artifactId> + <version>${project.version}</version> + <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 new file mode 100644 index 0000000000000000000000000000000000000000..02c55f71a69e83662e5fb71dafe4198193ccbfab --- /dev/null +++ b/tarantool/src/main/conf/tarantool-hash.lua @@ -0,0 +1,27 @@ +-- 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", + log_level=5, + logger_nonblock=true, + wal_mode="none", + pid_file="tarantool.pid" +} + +box.schema.space.create("ycsb", {id = 1024}) +box.space.ycsb:create_index('primary', {type = 'hash', parts = {1, 'STR'}}) +box.schema.user.grant('guest', 'read,write,execute', 'universe') diff --git a/tarantool/src/main/conf/tarantool-tree.lua b/tarantool/src/main/conf/tarantool-tree.lua new file mode 100644 index 0000000000000000000000000000000000000000..0782bb1891474112355a2babe44d476c4cfd00db --- /dev/null +++ b/tarantool/src/main/conf/tarantool-tree.lua @@ -0,0 +1,27 @@ +-- 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", + log_level=5, + logger_nonblock=true, + wal_mode="none", + pid_file="tarantool.pid" +} + +box.schema.space.create("ycsb", {id = 1024}) +box.space.ycsb:create_index('primary', {type = 'tree', parts = {1, 'STR'}}) +box.schema.user.grant('guest', 'read,write,execute', 'universe') diff --git a/tarantool/src/main/java/com/yahoo/ycsb/db/TarantoolClient.java b/tarantool/src/main/java/com/yahoo/ycsb/db/TarantoolClient.java new file mode 100644 index 0000000000000000000000000000000000000000..442a007143727f30f3087f439c805874034e7465 --- /dev/null +++ b/tarantool/src/main/java/com/yahoo/ycsb/db/TarantoolClient.java @@ -0,0 +1,184 @@ +/** + * 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. + */ +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.tarantool.TarantoolConnection16; +import org.tarantool.TarantoolConnection16Impl; +import org.tarantool.TarantoolException; + +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 { + + public static final String HOST_PROPERTY = "tarantool.host"; + public static final String PORT_PROPERTY = "tarantool.port"; + public static final String SPACE_PROPERTY = "tarantool.space"; + + public static final String DEFAULT_HOST = "localhost"; + public static final int DEFAULT_PORT = 3301; + public static final int DEFAULT_SPACE = 1024; + + private static final Logger logger = Logger.getLogger(TarantoolClient.class.getName()); + private TarantoolConnection16 connection; + private int spaceNo; + + public void init() throws DBException { + Properties props = getProperties(); + + int port = DEFAULT_PORT; + String portString = props.getProperty(PORT_PROPERTY); + if (portString != null) { + port = Integer.parseInt(portString); + } + + String host = props.getProperty(HOST_PROPERTY); + if (host == null) { + host = DEFAULT_HOST; + } + + spaceNo = DEFAULT_SPACE; + String spaceString = props.getProperty(SPACE_PROPERTY); + if (spaceString != null) { + spaceNo = Integer.parseInt(spaceString); + } + + try { + this.connection = new TarantoolConnection16Impl(host, port); + } catch (Exception exc) { + logger.log(Level.SEVERE,"Can't initialize Tarantool connection", exc); + return; + } + } + + public void cleanup() throws DBException{ + this.connection.close(); + } + + @Override + public Status 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 Status.ERROR; + } + return Status.OK; + } + + private HashMap<String, ByteIterator> tuple_convert_filter (List<String> input, + Set<String> fields) { + HashMap<String, ByteIterator> result = new HashMap<String, ByteIterator>(); + if (input == null) + return result; + for (int i = 1; i < input.toArray().length; i += 2) + if (fields == null || fields.contains(input.get(i))) + result.put(input.get(i), new StringByteIterator(input.get(i+1))); + return result; + } + + @Override + 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 Status.OK; + } catch (TarantoolException exc) { + logger.log(Level.SEVERE,"Can't select element", exc); + return Status.ERROR; + } catch (NullPointerException exc) { + return Status.ERROR; + } + } + + @Override + public Status scan(String table, String startkey, + int recordcount, Set<String> fields, + Vector<HashMap<String, ByteIterator>> result) { + List<List<String>> response; + try { + 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 Status.ERROR; + } catch (NullPointerException exc) { + 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 Status.OK; + } + + @Override + 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 Status.ERROR; + } catch (NullPointerException e) { + return Status.ERROR; + } + return Status.OK; + } + @Override + public Status update(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 replace element", exc); + return Status.ERROR; + } + return Status.OK; + + } +} diff --git a/voldemort/pom.xml b/voldemort/pom.xml index 918c94e29efd70ee2812cc6a7afdbae997efab26..afb61a899ce6897d0409046b00a1bc54357b940a 100644 --- a/voldemort/pom.xml +++ b/voldemort/pom.xml @@ -1,11 +1,29 @@ <?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>root</artifactId> - <version>0.1.4</version> + <artifactId>binding-parent</artifactId> + <version>0.6.0-SNAPSHOT</version> + <relativePath>../binding-parent</relativePath> </parent> <artifactId>voldemort-binding</artifactId> @@ -27,39 +45,31 @@ <groupId>com.yahoo.ycsb</groupId> <artifactId>core</artifactId> <version>${project.version}</version> + <scope>provided</scope> </dependency> </dependencies> - - <repositories> - <repository> - <id>clojars.org</id> - <url>http://clojars.org/repo</url> - </repository> - </repositories> - - <build> + <build> <plugins> - <plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <version>${maven.assembly.version}</version> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.15</version> <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> - <appendAssemblyId>false</appendAssemblyId> + <consoleOutput>true</consoleOutput> + <configLocation>../checkstyle.xml</configLocation> + <failOnViolation>true</failOnViolation> + <failsOnError>true</failsOnError> </configuration> <executions> <execution> - <phase>package</phase> + <id>validate</id> + <phase>validate</phase> <goals> - <goal>single</goal> + <goal>checkstyle</goal> </goals> </execution> </executions> </plugin> </plugins> - </build> - - + </build> </project> diff --git a/voldemort/src/main/conf/cluster.xml b/voldemort/src/main/conf/cluster.xml index 175f69adab9ff03916b1325a912d8d9b8cef9641..a34e5009fd0b587ff2eb03f19781c797ef49aefc 100644 --- a/voldemort/src/main/conf/cluster.xml +++ b/voldemort/src/main/conf/cluster.xml @@ -1,3 +1,20 @@ +<!-- +Copyright (c) 2012 YCSB contributors. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You +may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. See accompanying +LICENSE file. +--> + <cluster> <name>mycluster</name> <server> diff --git a/voldemort/src/main/conf/server.properties b/voldemort/src/main/conf/server.properties index fce5ee43e6bbd86e2f7b19e17c21734ac32dbf04..783d234b810f1f97d8b7e9fbc631b50d800b24e1 100644 --- a/voldemort/src/main/conf/server.properties +++ b/voldemort/src/main/conf/server.properties @@ -1,3 +1,18 @@ +# Copyright (c) 2012 YCSB contributors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You +# may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. See accompanying +# LICENSE file. + # The ID of *this* particular cluster node node.id=0 diff --git a/voldemort/src/main/conf/stores.xml b/voldemort/src/main/conf/stores.xml index b2d892d722727de28d7f963df4fc8677dfa5aa2f..87abe52e05e0895e9f6b7cd24a7570e7a1aed4ab 100644 --- a/voldemort/src/main/conf/stores.xml +++ b/voldemort/src/main/conf/stores.xml @@ -1,3 +1,20 @@ +<!-- +Copyright (c) 2012 YCSB contributors. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You +may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. See accompanying +LICENSE file. +--> + <stores> <store> <name>usertable</name> 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 84093b917ddb5357f6f105667c24c6b1d1398edf..a4132b2f40afa71d9485cca648065b54f04f3e1d 100644 --- a/voldemort/src/main/java/com/yahoo/ycsb/db/VoldemortClient.java +++ b/voldemort/src/main/java/com/yahoo/ycsb/db/VoldemortClient.java @@ -1,3 +1,20 @@ +/** + * Copyright (c) 2012 YCSB contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You + * may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. See accompanying + * LICENSE file. + */ + package com.yahoo.ycsb.db; import java.util.HashMap; @@ -15,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/voldemort/src/main/resources/config/cluster.xml b/voldemort/src/main/resources/config/cluster.xml index 175f69adab9ff03916b1325a912d8d9b8cef9641..a34e5009fd0b587ff2eb03f19781c797ef49aefc 100644 --- a/voldemort/src/main/resources/config/cluster.xml +++ b/voldemort/src/main/resources/config/cluster.xml @@ -1,3 +1,20 @@ +<!-- +Copyright (c) 2012 YCSB contributors. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You +may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. See accompanying +LICENSE file. +--> + <cluster> <name>mycluster</name> <server> diff --git a/voldemort/src/main/resources/config/server.properties b/voldemort/src/main/resources/config/server.properties index fce5ee43e6bbd86e2f7b19e17c21734ac32dbf04..783d234b810f1f97d8b7e9fbc631b50d800b24e1 100644 --- a/voldemort/src/main/resources/config/server.properties +++ b/voldemort/src/main/resources/config/server.properties @@ -1,3 +1,18 @@ +# Copyright (c) 2012 YCSB contributors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You +# may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. See accompanying +# LICENSE file. + # The ID of *this* particular cluster node node.id=0 diff --git a/voldemort/src/main/resources/config/stores.xml b/voldemort/src/main/resources/config/stores.xml index b2d892d722727de28d7f963df4fc8677dfa5aa2f..87abe52e05e0895e9f6b7cd24a7570e7a1aed4ab 100644 --- a/voldemort/src/main/resources/config/stores.xml +++ b/voldemort/src/main/resources/config/stores.xml @@ -1,3 +1,20 @@ +<!-- +Copyright (c) 2012 YCSB contributors. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You +may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. See accompanying +LICENSE file. +--> + <stores> <store> <name>usertable</name> diff --git a/workloads/workload_template b/workloads/workload_template new file mode 100644 index 0000000000000000000000000000000000000000..6aebd64a178d525032214076a2e7c2d15b104485 --- /dev/null +++ b/workloads/workload_template @@ -0,0 +1,140 @@ +# Copyright (c) 2012 YCSB contributors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you +# may not use this file except in compliance with the License. You +# may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. See accompanying +# LICENSE file. + +# Yahoo! Cloud System Benchmark +# Workload Template: Default Values +# +# File contains all properties that can be set to define a +# YCSB session. All properties are set to their default +# value if one exists. If not, the property is commented +# out. When a property has a finite number of settings, +# the default is enabled and the alternates are shown in +# comments below it. +# +# Use of most explained through comments in Client.java or +# CoreWorkload.java or on the YCSB wiki page: +# https://github.com/brianfrankcooper/YCSB/wiki/Core-Properties + +# The name of the workload class to use +workload=com.yahoo.ycsb.workloads.CoreWorkload + +# There is no default setting for recordcount but it is +# required to be set. +# The number of records in the table to be inserted in +# the load phase or the number of records already in the +# table before the run phase. +recordcount=1000000 + +# There is no default setting for operationcount but it is +# required to be set. +# The number of operations to use during the run phase. +operationcount=3000000 + +# The number of insertions to do, if different from recordcount. +# Used with insertstart to grow an existing table. +#insertcount= + +# The offset of the first insertion +insertstart=0 + +# The number of fields in a record +fieldcount=10 + +# The size of each field (in bytes) +fieldlength=100 + +# Should read all fields +readallfields=true + +# Should write all fields on update +writeallfields=false + +# The distribution used to choose the length of a field +fieldlengthdistribution=constant +#fieldlengthdistribution=uniform +#fieldlengthdistribution=zipfian + +# What proportion of operations are reads +readproportion=0.95 + +# What proportion of operations are updates +updateproportion=0.05 + +# What proportion of operations are inserts +insertproportion=0 + +# What proportion of operations read then modify a record +readmodifywriteproportion=0 + +# What proportion of operations are scans +scanproportion=0 + +# On a single scan, the maximum number of records to access +maxscanlength=1000 + +# The distribution used to choose the number of records to access on a scan +scanlengthdistribution=uniform +#scanlengthdistribution=zipfian + +# Should records be inserted in order or pseudo-randomly +insertorder=hashed +#insertorder=ordered + +# The distribution of requests across the keyspace +requestdistribution=zipfian +#requestdistribution=uniform +#requestdistribution=latest + +# Percentage of data items that constitute the hot set +hotspotdatafraction=0.2 + +# Percentage of operations that access the hot set +hotspotopnfraction=0.8 + +# Maximum execution time in seconds +#maxexecutiontime= + +# The name of the database table to run queries against +table=usertable + +# The column family of fields (required by some databases) +#columnfamily= + +# 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