diff --git a/doc/index.html b/doc/index.html index 936790ed..a2ef77a3 100644 --- a/doc/index.html +++ b/doc/index.html @@ -11,8 +11,7 @@
@@ -52,284 +51,13 @@ of each system (for example, as latency versus throughput curves) to see when on

Download YCSB

-... more information soon ... +YCSB is available +at
http://wiki.github.com/brianfrankcooper/YCSB/.
- -

Building YCSB

-To build YCSB, you need to build: - -The YCSB distribution can be built with
ant: -
-  % cd ycsb
-  % ant
-
-If your build was successful, you should be able to run the Client to get the usage message: -
-  % java -cp build/ycsb.jar com.yahoo.ycsb.Client
-Usage: java com.yahoo.ycsb.Client [options]
-Options:
-  -threads n: execute using n threads (default: 1) - can also be specified as the 
-              "threadcount" property using -p
-  -target n: attempt to do n operations per second (default: unlimited) - can also
-             be specified as the "target" property using -p
-  -load:  run the loading phase of the workload
-  -t:  run the transactions phase of the workload (default)
-  -db dbname: specify the name of the DB to use (default: com.yahoo.ycsb.BasicDB) - 
-              can also be specified as the "db" property using -p
-  -P propertyfile: load properties from the given file. Multiple files can
-                   be specified, and will be processed in the order specified
-  -p name=value:  specify a property to be passed to the DB and workloads;
-                  multiple properties can be specified, and override any
-                  values in the propertyfile
-  -s:  show status during run (default: no status)
-  -l label:  use label for status (e.g. to label one experiment out of a whole batch)
-
-Required properties:
-  recordcount: how many records in the database
-  operationcount: how many transactions to execute
-  workload: the name of the workload class to use (e.g. com.yahoo.ycsb.workloads.CoreWorkload)
-
-
- -

Running a workload

-There are 6 steps to running a workload: -
    -
  1. Set up the database system to test -
  2. Choose the appropriate DB interface layer -
  3. Choose the appropriate workload -
  4. Choose the appropriate runtime parameters (number of client threads, target throughput, etc.) -
  5. Load the data -
  6. Execute the workload -
-The steps described here assume you are running a single client server. This should be sufficient for small to medium clusters (e.g. 10 or so machines). For much larger clusters, you may -have to run multiple clients on different servers to generate enough load. Similarly, loading a database may be faster in some cases using multiple client machines. For more details on -running multiple clients in parallel, see
here. -

Step 1. Set up the database system to test

-The first step is to set up the database system you wish to test. This can be done on a single machine or a cluster, depending on the configuration you wish to benchmark. -

-You must also create or set up tables/keyspaces/storage buckets to store records. The details vary according to each database system, and depend on the workload you wish -to run. Before the YCSB Client runs, the tables must be created, since the Client itself will not request to create the tables. This is because for some systems, there -is a manual (human-operated) step to create tables, and for other systems, the table must be created before the database cluster is started. -

-The tables that must be created depends on the workload. For CoreWorkload, the YCSB Client will assume that there is a "table" called "usertable" with a -flexible schema: columns can be added at runtime as desired. This "usertable" can be mapped into whatever storage container is appropriate. For example, in MySQL you would "CREATE TABLE," in -Cassandra you would define a keyspace in the Cassandra configuration, and so on. The database interface layer (described in step 2) will receive requests for -reading or writing records in "usertable" and translate them into requests for the actual storage you have allocated. This may mean that you have to provide -information for the database interface layer to help it understand what the structure of the underlying storage is. For example, in Cassandra, you must define -"column families" in addition to keyspaces. Thus, it is necessary to create a column family and give the family some name (for example, you might use "values.") Then, -the database access layer will need to know to refer to the "values" column family, either because the string "values" is passed in as a property, or because it is -hardcoded in the database interface layer. -

Step 2. Choose the appropriate DB interface layer

-The DB interface layer is a java class that execute read, insert, update, delete and scan calls generated by the YCSB Client into calls against your database's API. This class is a -subclass of the abstract DB class in the com.yahoo.ycsb package. The DB interface layer is not built as part of building YCSB; you must build it separately. Once you have built the interface layer, -you will specify the class name of the layer on the command line when you run YCSB Client, and the Client will dynamically load your interface class. Any properties specified on the command line, or -in parameter files specified on the command line, will be passed to the DB interface instance, and can be used to configure the layer (for example, to tell it the hostname of the database you are benchmarking.) -

-The YCSB Client is distributed with a simple dummy interface layer, com.yahoo.ycsb.BasicDB. This layer just prints the operations it would have executed to System.out. It can be useful for ensuring -that the client is operating properly, and for debugging your workloads. -

-Other sample DB interface layer classes are distributed in src/com/yahoo/ycsb/db. To build those classes, run: -

-% ant dbcompile
-
-Note that these classes will not be built using a normal ant execution, and not included in the resulting ycsb.jar. Thus, to use these classes, you will need -to 1. have them on your classpath, and 2. have any required libraries also on your classpath. For example, the Cassandra database interface layer is com.yahoo.ycsb.db.CassandraClient, and requires the libthrift.jar -to be accessible on your classpath. -

-For more details about implementing a DB interface layer, see here. -

Step 3. Choose the appropriate workload

-The workload defines the data that will be loaded into the database during the loading phase, and the operations that will be executed against the data set during the transaction phase. - -Typically, a workload is a combination of: - -Because the properties of the dataset must be known during the loading phase (so that the proper kind of record can be constructed and inserted) and during the transaction phase (so -that the correct record ids and fields can be referred to) a single set of properties is shared among both phases. Thus the parameter file is used in both phases. The -workload java class uses those properties to either insert records (loading phase) or execute transactions against those records (transaction phase). The choice -of which phase to run is based on a parameter you specify when you run the YCSB Client tool. -

-You specify both the java class and the parameter file on the command line when you run the YCSB Client. The Client will dynamically load your workload class, pass -it the properties from the parameters file (and any additional properties specified on the command line) and then execute the workload. This happens both for the loading and transaction phases, -as the same properties and workload logic applies to both. For example, if the loading phase creates records with 10 fields, then the transaction phase must know that there are 10 fields -it can query and modify. -

-The CoreWorkload is a package of standard workloads that is distributed with the YCSB and can be used directly. In particular, the CoreWorkload defines a simple mix of read/insert/update/scan operations. The relative -frequency of each operation is defined in the parameter file, as are other properties of the workload. Thus, by changing the parameter file, a variety of different concrete workloads can be executed. For more details -on the CoreWorkload, see here. -

-If the CoreWorkload does not satisfy your needs, you can define your own workload by subclassing the com.yahoo.ycsb.Workload class. Details for doing this are here. - -

Step 4. Choose the appropriate runtime parameters

-Although the workload class and paramters file define a specific workload, there are additional settings that you may want to specify for a particular run of the benchmark. These settings are provided on the command line -when you run the YCSB client. These settings are: - -

Step 5. Load the data

-Workloads have two executable phases: the loading phase (which defines the data to be inserted) and the transactions phase (which defines the -operations to be executed against the data set.) To load the data, you run the YCSB Client and tell it to execute the loading section. -

-For example, consider the benchmark workload A (more details about the standard workloads are XXX here XXX). To load the standard dataset: - -

-%  java -cp build/ycsb.jar com.yahoo.ycsb.Client -load -db com.yahoo.ycsb.BasicDB -P workloads/workloada
-
-A few notes about this command: - -If you used BasicDB, you would see the insert statements for the database. If you used a real DB interface layer, the records would be loaded into the database. -

-The standard workload paramter files create very small databases; for example, workloada creates only 1,000 records. This is useful while debugging your setup. However, -to run an actual benchmark you'll want to generate a much larger database. For example, imagine you want to load 100 million records. Then, you will need to -override the default "recordcount" property in the workloada file. This can be done in one of two ways: -

    -
  1. Specifying a new property file containing a new value of "recordcount." If this file is specified on the command line after the workloada file, it will override -any properties in workloada. For example, create a file called "large.dat" with the single line: -
    -recordcount=100000000
    -
    -Then, run the client as follows: -
    -%  java -cp build/ycsb.jar com.yahoo.ycsb.Client -load -db com.yahoo.ycsb.BasicDB -P workloads/workloada -P large.dat
    -
    -The client will load both property files, but will use the value of recordcount from the last file it loaded, e.g. large.dat -
  2. Specify a new value of the "recordcount" property on the command line. Any properties specified on the command line override properties specified in property files. -In this case, run the client as follows: -
    -%  java -cp build/ycsb.jar com.yahoo.ycsb.Client -load -db com.yahoo.ycsb.BasicDB -P workloads/workloada -p recordcount=100000000
    -
    -
-In general, it is good practice to store any important properties in new parameter files, instead of specifying them on the command line. This makes -your benchmark results more reproducible; instead of having to reconstruct the exact command line you used, you just reuse the property files. Note, however, that -the YCSB Client will print out its command line when it begins executing, so if you store the output of the client in a data file, you can retrieve the command line -from that file. -

-Because a large database load will take a long time, you may wish to 1. require the Client to produce status, and 2. direct any output to a datafile. Thus, you might -execute the following to load your database: -

-%  java -cp build/ycsb.jar com.yahoo.ycsb.Client -load -db com.yahoo.ycsb.BasicDB -P workloads/workloada -P large.dat -s > load.dat
-
-The "-s" parameter will require the Client to produce status report on System.err. Thus, the output of this command might be: -
-% java -cp build/ycsb.jar com.yahoo.ycsb.Client -load -db com.yahoo.ycsb.BasicDB -P workloads/workloada -P large.dat -s > load.dat
-Loading workload... (might take a few minutes in some cases for large data sets)
-Starting test.
- 0 sec: 0 operations
- 10 sec: 61731 operations; 6170.6317473010795 operations/sec
- 20 sec: 129054 operations; 6450.76477056883 operations/sec
-...
-
-This status output will help you to see how quickly load operations are executing (so you can estimate the completion time of the load) as well as verify that the -load is making progress. -

-When the load completes, the Client will report statistics about the performance of the load. These statistics are the same as in the transaction phase, so see below for information on -interpreting those statistics. -

Step 6: Execute the workload

-Once the data is loaded, you can execute the workload. This is done by telling the client to run the transaction section of the workload. -

-To execute the workload, you can use the following command: -

-%  java -cp build/ycsb.jar com.yahoo.ycsb.Client -t -db com.yahoo.ycsb.BasicDB -P workloads/workloada -P large.dat -s > transactions.dat
-
-The main difference in this invocation is that we used the "-t" parameter to tell the Client to use the transaction section instead of the data section. -If you used BasicDB, and examine the resulting transactions.dat file, you will see a combination of read and update requests, as well as statistics about the execution. -

-Typically you will want to use the "-threads" and "-target" parameters to control the amount of offered load. For example, we might want 10 threads attempting a total of 100 operations per second (e.g. 10 operations/sec per thread.) As long -as the average latency of operations is not above 100 ms, each thread will be able to carry out its intended 10 operations per second. In general, you need enough threads so that no thread is attempting more operations per second than is possible, otherwise -your achieved throughput will be less than the specified target throughput. For this example, we can execute: -

-%  java -cp build/ycsb.jar com.yahoo.ycsb.Client -t -db com.yahoo.ycsb.BasicDB -P workloads/workloada -P large.dat -s -threads 10 -target 100 > transactions.dat
-
-Note in this example we have used the "-threads 10" command line parameter to specify 10 threads, and "-target 100" command line parameter to specify 100 operations per second as the target. -Alternatively, both values can be set in your parameters file using the "threads" and "target" properties respectively. For example: -
-threads=10
-target=100
-
-

- -At the end of the run, the Client will report performance statistics on System.out. In the above example, these statistics will be written to the transactions.dat file. -The default is to produce average, min, max, 95th and 99th percentile latency for each operation type (read, update, etc.), a count of the return codes for each operation, and a histogram of latencies for each -operation. The return codes are defined by your database interface layer, and allow you to see if there were any errors during the workload. For the above example, we might get output like: -

-[OVERALL],RunTime(ms), 10110
-[OVERALL],Throughput(ops/sec), 98.91196834817013
-[UPDATE], Operations, 491
-[UPDATE], AverageLatency(ms), 0.054989816700611
-[UPDATE], MinLatency(ms), 0
-[UPDATE], MaxLatency(ms), 1
-[UPDATE], 95thPercentileLatency(ms), 1
-[UPDATE], 99thPercentileLatency(ms), 1
-[UPDATE], Return=0, 491
-[UPDATE], 0, 464
-[UPDATE], 1, 27
-[UPDATE], 2, 0
-[UPDATE], 3, 0
-[UPDATE], 4, 0
-...
-
-This output indicates: - -Similar statistics are available for the read operations. -

-While a histogram of latencies is often useful, sometimes a timeseries is more useful. To request a time series, specify the "measurementtype=timeseries" property on the Client command line -or in a properties file. By default, the Client will report average latency for each interval of 1000 milliseconds. You can specify a different granularity for reporting -using the "timeseries.granularity" property. For example: -

-%  java -cp build/ycsb.jar com.yahoo.ycsb.Client -t -db com.yahoo.ycsb.BasicDB -P workloads/workloada -P large.dat -s -threads 10 -target 100 -p measurementtype=timeseries -p timeseries.granularity=2000 > transactions.dat
-
-will report a timeseries, with readings averaged every 2,000 milliseconds (e.g. 2 seconds). The result will be: -
-[OVERALL],RunTime(ms), 10077
-[OVERALL],Throughput(ops/sec), 9923.58836955443
-[UPDATE], Operations, 50396
-[UPDATE], AverageLatency(ms), 0.04339630129375347
-[UPDATE], MinLatency(ms), 0
-[UPDATE], MaxLatency(ms), 338
-[UPDATE], Return=0, 50396
-[UPDATE], 0, 0.10264765784114054
-[UPDATE], 2000, 0.026989343690867442
-[UPDATE], 4000, 0.0352882703777336
-[UPDATE], 6000, 0.004238958990536277
-[UPDATE], 8000, 0.052813085033008175
-[UPDATE], 10000, 0.0
-[READ], Operations, 49604
-[READ], AverageLatency(ms), 0.038242883638416256
-[READ], MinLatency(ms), 0
-[READ], MaxLatency(ms), 230
-[READ], Return=0, 49604
-[READ], 0, 0.08997245741099663
-[READ], 2000, 0.02207505518763797
-[READ], 4000, 0.03188493260913297
-[READ], 6000, 0.004869141813755326
-[READ], 8000, 0.04355329949238579
-[READ], 10000, 0.005405405405405406
-
-This output shows separate time series for update and read operations, with data reported every 2000 milliseconds. The data reported for a time point is the average over the previous 2000 milliseconds only. -(In this case we used 100,000 operations and a target of 10,000 operations per second for a more interesting output.) -A note about latency measurements: the Client measures the end to end latency of executing a particular operation against the database. That is, it starts a timer before calling the appropriate method in the DB interface layer -class, and stops the timer when the method returns. Thus latencies include: executing inside the interface layer, network latency to the database server, and database execution time. They do not include delays introduced for throttling -the target throughput. That is, if you specify a target of 10 operations per second (and a single thread) then the Client will only execute an operation every 100 milliseconds. If the operation takes 12 milliseconds, then the client -will wait for an additional 88 milliseconds before trying the next operation. However, the reported latency will not include this wait time; a latency of 12 milliseconds, not 100, will be reported. + +

Getting started

+Detailed instructions for using YCSB are available on the GitHub wiki: +
http://wiki.github.com/brianfrankcooper/YCSB/getting-started.

Extending YCSB

@@ -345,4 +73,4 @@ More details about the entire class structure of YCSB is available here:
YCSB - Yahoo! Research - Contact cooperb@yahoo-inc.com. - \ No newline at end of file + diff --git a/doc/javadoc/allclasses-frame.html b/doc/javadoc/allclasses-frame.html index f82e655c..01857b31 100644 --- a/doc/javadoc/allclasses-frame.html +++ b/doc/javadoc/allclasses-frame.html @@ -2,7 +2,7 @@ - + All Classes @@ -38,10 +38,6 @@ All Classes
DiscreteGenerator
-FindGoodAB -
-FindGoodScrambleVector -
Generator
IntegerGenerator @@ -58,12 +54,6 @@ All Classes
SkewedLatestGenerator
-TestCollisions -
-TestExpandedZipfian -
-TestZipfian -
UniformGenerator
UniformIntegerGenerator diff --git a/doc/javadoc/allclasses-noframe.html b/doc/javadoc/allclasses-noframe.html index 4a90f94c..e55dd312 100644 --- a/doc/javadoc/allclasses-noframe.html +++ b/doc/javadoc/allclasses-noframe.html @@ -2,7 +2,7 @@ - + All Classes @@ -38,10 +38,6 @@ All Classes
DiscreteGenerator
-FindGoodAB -
-FindGoodScrambleVector -
Generator
IntegerGenerator @@ -58,12 +54,6 @@ All Classes
SkewedLatestGenerator
-TestCollisions -
-TestExpandedZipfian -
-TestZipfian -
UniformGenerator
UniformIntegerGenerator diff --git a/doc/javadoc/com/yahoo/ycsb/BasicDB.html b/doc/javadoc/com/yahoo/ycsb/BasicDB.html index 18eb060a..0c974000 100644 --- a/doc/javadoc/com/yahoo/ycsb/BasicDB.html +++ b/doc/javadoc/com/yahoo/ycsb/BasicDB.html @@ -2,7 +2,7 @@ - + BasicDB diff --git a/doc/javadoc/com/yahoo/ycsb/Client.html b/doc/javadoc/com/yahoo/ycsb/Client.html index 6ce86cc2..3bd51283 100644 --- a/doc/javadoc/com/yahoo/ycsb/Client.html +++ b/doc/javadoc/com/yahoo/ycsb/Client.html @@ -2,7 +2,7 @@ - + Client @@ -96,6 +96,10 @@ java.lang.Object
public class Client
extends java.lang.Object
+

+Main class for executing YCSB. +

+


diff --git a/doc/javadoc/com/yahoo/ycsb/CounterGenerator.html b/doc/javadoc/com/yahoo/ycsb/CounterGenerator.html index 3a32f483..d3d1f681 100644 --- a/doc/javadoc/com/yahoo/ycsb/CounterGenerator.html +++ b/doc/javadoc/com/yahoo/ycsb/CounterGenerator.html @@ -2,7 +2,7 @@ - + CounterGenerator diff --git a/doc/javadoc/com/yahoo/ycsb/DB.html b/doc/javadoc/com/yahoo/ycsb/DB.html index addf368f..4aa547fc 100644 --- a/doc/javadoc/com/yahoo/ycsb/DB.html +++ b/doc/javadoc/com/yahoo/ycsb/DB.html @@ -2,7 +2,7 @@ - + DB diff --git a/doc/javadoc/com/yahoo/ycsb/DBException.html b/doc/javadoc/com/yahoo/ycsb/DBException.html index 226719bb..537aa30c 100644 --- a/doc/javadoc/com/yahoo/ycsb/DBException.html +++ b/doc/javadoc/com/yahoo/ycsb/DBException.html @@ -2,7 +2,7 @@ - + DBException @@ -101,6 +101,10 @@ java.lang.Object
public class DBException
extends java.lang.Exception
+

+Something bad happened while interacting with the database. +

+

See Also:
Serialized Form
diff --git a/doc/javadoc/com/yahoo/ycsb/DBFactory.html b/doc/javadoc/com/yahoo/ycsb/DBFactory.html index b7ceef55..9b321ea7 100644 --- a/doc/javadoc/com/yahoo/ycsb/DBFactory.html +++ b/doc/javadoc/com/yahoo/ycsb/DBFactory.html @@ -2,7 +2,7 @@ - + DBFactory @@ -96,6 +96,10 @@ java.lang.Object
public class DBFactory
extends java.lang.Object
+

+Creates a DB layer by dynamically classloading the specified DB class. +

+


diff --git a/doc/javadoc/com/yahoo/ycsb/DBWrapper.html b/doc/javadoc/com/yahoo/ycsb/DBWrapper.html index 205d812b..c51ad7dc 100644 --- a/doc/javadoc/com/yahoo/ycsb/DBWrapper.html +++ b/doc/javadoc/com/yahoo/ycsb/DBWrapper.html @@ -2,7 +2,7 @@ - + DBWrapper diff --git a/doc/javadoc/com/yahoo/ycsb/DiscreteGenerator.html b/doc/javadoc/com/yahoo/ycsb/DiscreteGenerator.html index a3d808a1..5cd28b8e 100644 --- a/doc/javadoc/com/yahoo/ycsb/DiscreteGenerator.html +++ b/doc/javadoc/com/yahoo/ycsb/DiscreteGenerator.html @@ -2,7 +2,7 @@ - + DiscreteGenerator @@ -52,7 +52,7 @@ function windowTitle()  PREV CLASS  - NEXT CLASSNEXT CLASS FRAMES    NO FRAMES   @@ -97,6 +97,10 @@ java.lang.Object
public class DiscreteGenerator
extends Generator
+

+Generates a distribution by choosing from a discrete set of values. +

+


@@ -291,7 +295,7 @@ public void addValue(double weight,  PREV CLASS  - NEXT CLASSNEXT CLASS
FRAMES    NO FRAMES   diff --git a/doc/javadoc/com/yahoo/ycsb/Generator.html b/doc/javadoc/com/yahoo/ycsb/Generator.html index 1ad19fce..cf8462d0 100644 --- a/doc/javadoc/com/yahoo/ycsb/Generator.html +++ b/doc/javadoc/com/yahoo/ycsb/Generator.html @@ -2,7 +2,7 @@ - + Generator @@ -51,7 +51,7 @@ function windowTitle() PREV CLASS  + PREV CLASS   NEXT CLASS FRAMES   @@ -244,7 +244,7 @@ public abstract java.lang.String lastString() PREV CLASS  + PREV CLASS   NEXT CLASS FRAMES   diff --git a/doc/javadoc/com/yahoo/ycsb/IntegerGenerator.html b/doc/javadoc/com/yahoo/ycsb/IntegerGenerator.html index 749d6c92..c8b29b9b 100644 --- a/doc/javadoc/com/yahoo/ycsb/IntegerGenerator.html +++ b/doc/javadoc/com/yahoo/ycsb/IntegerGenerator.html @@ -2,7 +2,7 @@ - + IntegerGenerator diff --git a/doc/javadoc/com/yahoo/ycsb/Measurements.html b/doc/javadoc/com/yahoo/ycsb/Measurements.html index 522079c7..9b1725fd 100644 --- a/doc/javadoc/com/yahoo/ycsb/Measurements.html +++ b/doc/javadoc/com/yahoo/ycsb/Measurements.html @@ -2,7 +2,7 @@ - + Measurements diff --git a/doc/javadoc/com/yahoo/ycsb/OneMeasurement.html b/doc/javadoc/com/yahoo/ycsb/OneMeasurement.html index 40bde7d6..cc3b9c0d 100644 --- a/doc/javadoc/com/yahoo/ycsb/OneMeasurement.html +++ b/doc/javadoc/com/yahoo/ycsb/OneMeasurement.html @@ -2,7 +2,7 @@ - + OneMeasurement @@ -99,6 +99,10 @@ java.lang.Object
public abstract class OneMeasurement
extends java.lang.Object
+

+A single measured metric (e.g. READ LATENCY) +

+


diff --git a/doc/javadoc/com/yahoo/ycsb/OneMeasurementHistogram.html b/doc/javadoc/com/yahoo/ycsb/OneMeasurementHistogram.html index 6da502b9..739a868c 100644 --- a/doc/javadoc/com/yahoo/ycsb/OneMeasurementHistogram.html +++ b/doc/javadoc/com/yahoo/ycsb/OneMeasurementHistogram.html @@ -2,7 +2,7 @@ - + OneMeasurementHistogram @@ -98,7 +98,7 @@ java.lang.Object

-Take measurements and maintain a histogram of latencies. +Take measurements and maintain a histogram of a given metric, such as READ LATENCY.

diff --git a/doc/javadoc/com/yahoo/ycsb/OneMeasurementTimeSeries.html b/doc/javadoc/com/yahoo/ycsb/OneMeasurementTimeSeries.html index 273213f3..cef9fa8c 100644 --- a/doc/javadoc/com/yahoo/ycsb/OneMeasurementTimeSeries.html +++ b/doc/javadoc/com/yahoo/ycsb/OneMeasurementTimeSeries.html @@ -2,7 +2,7 @@ - + OneMeasurementTimeSeries @@ -97,6 +97,10 @@ java.lang.Object

public class OneMeasurementTimeSeries
extends OneMeasurement
+

+A time series measurement of a metric, such as READ LATENCY. +

+


diff --git a/doc/javadoc/com/yahoo/ycsb/ScrambledZipfianGenerator.html b/doc/javadoc/com/yahoo/ycsb/ScrambledZipfianGenerator.html index d0507a5c..612ca61c 100644 --- a/doc/javadoc/com/yahoo/ycsb/ScrambledZipfianGenerator.html +++ b/doc/javadoc/com/yahoo/ycsb/ScrambledZipfianGenerator.html @@ -2,7 +2,7 @@ - + ScrambledZipfianGenerator diff --git a/doc/javadoc/com/yahoo/ycsb/SkewedLatestGenerator.html b/doc/javadoc/com/yahoo/ycsb/SkewedLatestGenerator.html index 8a2629d2..546e8038 100644 --- a/doc/javadoc/com/yahoo/ycsb/SkewedLatestGenerator.html +++ b/doc/javadoc/com/yahoo/ycsb/SkewedLatestGenerator.html @@ -2,7 +2,7 @@ - + SkewedLatestGenerator @@ -52,7 +52,7 @@ function windowTitle()  PREV CLASS  - NEXT CLASSNEXT CLASS
FRAMES    NO FRAMES   @@ -98,6 +98,10 @@ java.lang.Object
public class SkewedLatestGenerator
extends IntegerGenerator
+

+Generate a popularity distribution of items, skewed to favor recent items significantly more than older items. +

+


@@ -248,7 +252,7 @@ public static void main(java.lang.String[] args)  PREV CLASS  - NEXT CLASSNEXT CLASS
FRAMES    NO FRAMES   diff --git a/doc/javadoc/com/yahoo/ycsb/UniformGenerator.html b/doc/javadoc/com/yahoo/ycsb/UniformGenerator.html index 516d3a1d..89e7fdc8 100644 --- a/doc/javadoc/com/yahoo/ycsb/UniformGenerator.html +++ b/doc/javadoc/com/yahoo/ycsb/UniformGenerator.html @@ -2,7 +2,7 @@ - + UniformGenerator @@ -51,7 +51,7 @@ function windowTitle() PREV CLASS  + PREV CLASS   NEXT CLASS FRAMES   @@ -250,7 +250,7 @@ public java.lang.String lastString() PREV CLASS  + PREV CLASS   NEXT CLASS FRAMES   diff --git a/doc/javadoc/com/yahoo/ycsb/UniformIntegerGenerator.html b/doc/javadoc/com/yahoo/ycsb/UniformIntegerGenerator.html index fd79bfe4..910e825f 100644 --- a/doc/javadoc/com/yahoo/ycsb/UniformIntegerGenerator.html +++ b/doc/javadoc/com/yahoo/ycsb/UniformIntegerGenerator.html @@ -2,7 +2,7 @@ - + UniformIntegerGenerator @@ -98,6 +98,10 @@ java.lang.Object
public class UniformIntegerGenerator
extends IntegerGenerator
+

+Generates integers randomly uniform from an interval. +

+


diff --git a/doc/javadoc/com/yahoo/ycsb/UnknownDBException.html b/doc/javadoc/com/yahoo/ycsb/UnknownDBException.html index 1f8cf44a..104e1254 100644 --- a/doc/javadoc/com/yahoo/ycsb/UnknownDBException.html +++ b/doc/javadoc/com/yahoo/ycsb/UnknownDBException.html @@ -2,7 +2,7 @@ - + UnknownDBException @@ -101,6 +101,10 @@ java.lang.Object
public class UnknownDBException
extends java.lang.Exception
+

+Could not create the specified DB. +

+

See Also:
Serialized Form
diff --git a/doc/javadoc/com/yahoo/ycsb/Utils.html b/doc/javadoc/com/yahoo/ycsb/Utils.html index b328a3ed..09ce7c7e 100644 --- a/doc/javadoc/com/yahoo/ycsb/Utils.html +++ b/doc/javadoc/com/yahoo/ycsb/Utils.html @@ -2,7 +2,7 @@ - + Utils @@ -96,6 +96,10 @@ java.lang.Object
public class Utils
extends java.lang.Object
+

+Utility functions. +

+


@@ -172,7 +176,7 @@ java.lang.Object ASCIIString(int length)
-            +          Generate a random ASCII string of a given length. @@ -196,15 +200,7 @@ java.lang.Object hash(int val)
-            - - - -static int -JenkinsHash(int val) - -
-            +          Hash an integer value.   @@ -300,6 +296,8 @@ ASCIIString
 public static java.lang.String ASCIIString(int length)
+
Generate a random ASCII string of a given length. +

@@ -311,17 +309,8 @@ hash
 public static int hash(int val)
-
-
-
-
-
- -

-JenkinsHash

-
-public static int JenkinsHash(int val)
-
+
Hash an integer value. +

diff --git a/doc/javadoc/com/yahoo/ycsb/Workload.html b/doc/javadoc/com/yahoo/ycsb/Workload.html index f41f8bc7..826114c3 100644 --- a/doc/javadoc/com/yahoo/ycsb/Workload.html +++ b/doc/javadoc/com/yahoo/ycsb/Workload.html @@ -2,7 +2,7 @@ - + Workload diff --git a/doc/javadoc/com/yahoo/ycsb/WorkloadException.html b/doc/javadoc/com/yahoo/ycsb/WorkloadException.html index 35338757..6f087e98 100644 --- a/doc/javadoc/com/yahoo/ycsb/WorkloadException.html +++ b/doc/javadoc/com/yahoo/ycsb/WorkloadException.html @@ -2,7 +2,7 @@ - + WorkloadException @@ -101,6 +101,10 @@ java.lang.Object
public class WorkloadException
extends java.lang.Exception
+

+The workload tried to do something bad. +

+

See Also:
Serialized Form
diff --git a/doc/javadoc/com/yahoo/ycsb/ZipfianGenerator.html b/doc/javadoc/com/yahoo/ycsb/ZipfianGenerator.html index 9d67ffdb..b1672c86 100644 --- a/doc/javadoc/com/yahoo/ycsb/ZipfianGenerator.html +++ b/doc/javadoc/com/yahoo/ycsb/ZipfianGenerator.html @@ -2,7 +2,7 @@ - + ZipfianGenerator diff --git a/doc/javadoc/com/yahoo/ycsb/package-frame.html b/doc/javadoc/com/yahoo/ycsb/package-frame.html index fb138b31..a45074cd 100644 --- a/doc/javadoc/com/yahoo/ycsb/package-frame.html +++ b/doc/javadoc/com/yahoo/ycsb/package-frame.html @@ -2,7 +2,7 @@ - + com.yahoo.ycsb @@ -37,10 +37,6 @@ Classes
 
DiscreteGenerator
-FindGoodAB -
-FindGoodScrambleVector -
Generator
IntegerGenerator @@ -57,12 +53,6 @@ Classes
 
SkewedLatestGenerator
-TestCollisions -
-TestExpandedZipfian -
-TestZipfian -
UniformGenerator
UniformIntegerGenerator diff --git a/doc/javadoc/com/yahoo/ycsb/package-summary.html b/doc/javadoc/com/yahoo/ycsb/package-summary.html index 7ab0dfb1..8bda454c 100644 --- a/doc/javadoc/com/yahoo/ycsb/package-summary.html +++ b/doc/javadoc/com/yahoo/ycsb/package-summary.html @@ -2,7 +2,7 @@ - + com.yahoo.ycsb @@ -90,7 +90,7 @@ Package com.yahoo.ycsb Client -  +Main class for executing YCSB. CounterGenerator @@ -102,7 +102,7 @@ Package com.yahoo.ycsb DBFactory -  +Creates a DB layer by dynamically classloading the specified DB class. DBWrapper @@ -110,15 +110,7 @@ Package com.yahoo.ycsb DiscreteGenerator -  - - -FindGoodAB -  - - -FindGoodScrambleVector -  +Generates a distribution by choosing from a discrete set of values. Generator @@ -134,15 +126,15 @@ Package com.yahoo.ycsb OneMeasurement -  +A single measured metric (e.g. OneMeasurementHistogram -Take measurements and maintain a histogram of latencies. +Take measurements and maintain a histogram of a given metric, such as READ LATENCY. OneMeasurementTimeSeries -  +A time series measurement of a metric, such as READ LATENCY. ScrambledZipfianGenerator @@ -150,19 +142,7 @@ Package com.yahoo.ycsb SkewedLatestGenerator -  - - -TestCollisions -  - - -TestExpandedZipfian -  - - -TestZipfian -  +Generate a popularity distribution of items, skewed to favor recent items significantly more than older items. UniformGenerator @@ -170,11 +150,11 @@ Package com.yahoo.ycsb UniformIntegerGenerator -  +Generates integers randomly uniform from an interval. Utils -  +Utility functions. Workload @@ -196,15 +176,15 @@ Package com.yahoo.ycsb DBException -  +Something bad happened while interacting with the database. UnknownDBException -  +Could not create the specified DB. WorkloadException -  +The workload tried to do something bad.   diff --git a/doc/javadoc/com/yahoo/ycsb/package-tree.html b/doc/javadoc/com/yahoo/ycsb/package-tree.html index 90944fc4..b35e8c64 100644 --- a/doc/javadoc/com/yahoo/ycsb/package-tree.html +++ b/doc/javadoc/com/yahoo/ycsb/package-tree.html @@ -2,7 +2,7 @@ - + com.yahoo.ycsb Class Hierarchy @@ -89,13 +89,13 @@ Class Hierarchy
  • java.lang.Object
    • com.yahoo.ycsb.Client
    • com.yahoo.ycsb.DB -
    • com.yahoo.ycsb.DBFactory
    • com.yahoo.ycsb.FindGoodAB
    • com.yahoo.ycsb.FindGoodScrambleVector
    • com.yahoo.ycsb.Generator
        +
      • com.yahoo.ycsb.DBFactory
      • com.yahoo.ycsb.Generator
      • com.yahoo.ycsb.Measurements
      • com.yahoo.ycsb.OneMeasurement -
      • com.yahoo.ycsb.TestCollisions
      • com.yahoo.ycsb.TestExpandedZipfian
      • com.yahoo.ycsb.TestZipfian
      • java.lang.Throwable (implements java.io.Serializable) +
      • java.lang.Throwable (implements java.io.Serializable)
        • java.lang.Exception diff --git a/doc/javadoc/com/yahoo/ycsb/workloads/CoreWorkload.html b/doc/javadoc/com/yahoo/ycsb/workloads/CoreWorkload.html index 0c19121e..5ea1c558 100644 --- a/doc/javadoc/com/yahoo/ycsb/workloads/CoreWorkload.html +++ b/doc/javadoc/com/yahoo/ycsb/workloads/CoreWorkload.html @@ -2,7 +2,7 @@ - + CoreWorkload diff --git a/doc/javadoc/com/yahoo/ycsb/workloads/package-frame.html b/doc/javadoc/com/yahoo/ycsb/workloads/package-frame.html index 0147c99b..070ade80 100644 --- a/doc/javadoc/com/yahoo/ycsb/workloads/package-frame.html +++ b/doc/javadoc/com/yahoo/ycsb/workloads/package-frame.html @@ -2,7 +2,7 @@ - + com.yahoo.ycsb.workloads diff --git a/doc/javadoc/com/yahoo/ycsb/workloads/package-summary.html b/doc/javadoc/com/yahoo/ycsb/workloads/package-summary.html index 267df3d2..b792122b 100644 --- a/doc/javadoc/com/yahoo/ycsb/workloads/package-summary.html +++ b/doc/javadoc/com/yahoo/ycsb/workloads/package-summary.html @@ -2,7 +2,7 @@ - + com.yahoo.ycsb.workloads diff --git a/doc/javadoc/com/yahoo/ycsb/workloads/package-tree.html b/doc/javadoc/com/yahoo/ycsb/workloads/package-tree.html index 7aac189f..c3c06740 100644 --- a/doc/javadoc/com/yahoo/ycsb/workloads/package-tree.html +++ b/doc/javadoc/com/yahoo/ycsb/workloads/package-tree.html @@ -2,7 +2,7 @@ - + com.yahoo.ycsb.workloads Class Hierarchy diff --git a/doc/javadoc/constant-values.html b/doc/javadoc/constant-values.html index 33180e82..a6d861ef 100644 --- a/doc/javadoc/constant-values.html +++ b/doc/javadoc/constant-values.html @@ -2,7 +2,7 @@ - + Constant Field Values diff --git a/doc/javadoc/deprecated-list.html b/doc/javadoc/deprecated-list.html index a4461ef0..ba042aaa 100644 --- a/doc/javadoc/deprecated-list.html +++ b/doc/javadoc/deprecated-list.html @@ -2,7 +2,7 @@ - + Deprecated List diff --git a/doc/javadoc/help-doc.html b/doc/javadoc/help-doc.html index 7c5b7894..10267e56 100644 --- a/doc/javadoc/help-doc.html +++ b/doc/javadoc/help-doc.html @@ -2,7 +2,7 @@ - + API Help diff --git a/doc/javadoc/index-all.html b/doc/javadoc/index-all.html index eaf4193c..4821b948 100644 --- a/doc/javadoc/index-all.html +++ b/doc/javadoc/index-all.html @@ -2,7 +2,7 @@ - + Index @@ -73,33 +73,21 @@ function windowTitle() -A B C D F G H I J L M N O P R S T U V W Z
          +A B C D F G H I L M N O P R S T U V W Z

          A

          -
          a - -Static variable in class com.yahoo.ycsb.FindGoodAB -
            -
          a - -Static variable in class com.yahoo.ycsb.TestCollisions -
           
          addValue(double, String) - Method in class com.yahoo.ycsb.DiscreteGenerator
           
          ASCIIString(int) - Static method in class com.yahoo.ycsb.Utils -
            +
          Generate a random ASCII string of a given length.

          B

          -
          b - -Static variable in class com.yahoo.ycsb.FindGoodAB -
            -
          b - -Static variable in class com.yahoo.ycsb.TestCollisions -
           
          BasicDB - Class in com.yahoo.ycsb
          Basic DB that just prints out the requested operations, instead of doing them against a database.
          BasicDB() - Constructor for class com.yahoo.ycsb.BasicDB
            @@ -126,7 +114,7 @@ Method in class com.yahoo.ycsb.cleanup() - Method in class com.yahoo.ycsb.Workload
          Cleanup the scenario. -
          Client - Class in com.yahoo.ycsb
           
          Client() - +
          Client - Class in com.yahoo.ycsb
          Main class for executing YCSB.
          Client() - Constructor for class com.yahoo.ycsb.Client
           
          com.yahoo.ycsb - package com.yahoo.ycsb
           
          com.yahoo.ycsb.workloads - package com.yahoo.ycsb.workloads
           
          CoreWorkload - Class in com.yahoo.ycsb.workloads
          The core benchmark scenario.
          CoreWorkload() - @@ -143,7 +131,7 @@ Constructor for class com.yahoo.ycsb.DB - Class in com.yahoo.ycsb
          A layer for accessing a database to be benchmarked.
          DB() - Constructor for class com.yahoo.ycsb.DB
            -
          DBException - Exception in com.yahoo.ycsb
           
          DBException(String) - +
          DBException - Exception in com.yahoo.ycsb
          Something bad happened while interacting with the database.
          DBException(String) - Constructor for exception com.yahoo.ycsb.DBException
           
          DBException() - @@ -155,7 +143,7 @@ Constructor for exception com.yahoo.ycsb.DBException(Throwable) - Constructor for exception com.yahoo.ycsb.DBException
            -
          DBFactory - Class in com.yahoo.ycsb
           
          DBFactory() - +
          DBFactory - Class in com.yahoo.ycsb
          Creates a DB layer by dynamically classloading the specified DB class.
          DBFactory() - Constructor for class com.yahoo.ycsb.DBFactory
           
          DBWrapper - Class in com.yahoo.ycsb
          Wrapper around a "real" DB that measures latencies and counts return codes.
          DBWrapper(DB) - @@ -170,7 +158,7 @@ Method in class com.yahoo.ycsb.delete(String, String) - Method in class com.yahoo.ycsb.DBWrapper
          Delete a record from the database. -
          DiscreteGenerator - Class in com.yahoo.ycsb
           
          DiscreteGenerator() - +
          DiscreteGenerator - Class in com.yahoo.ycsb
          Generates a distribution by choosing from a discrete set of values.
          DiscreteGenerator() - Constructor for class com.yahoo.ycsb.DiscreteGenerator
           
          doInsert(DB, Object) - @@ -217,12 +205,6 @@ Static variable in class com.yahoo.ycsb.workloads.FIELD_LENGTH_PROPERTY_DEFAULT - Static variable in class com.yahoo.ycsb.workloads.CoreWorkload
          The default length of a field in bytes. -
          FindGoodAB - Class in com.yahoo.ycsb
           
          FindGoodAB() - -Constructor for class com.yahoo.ycsb.FindGoodAB -
            -
          FindGoodScrambleVector - Class in com.yahoo.ycsb
           
          FindGoodScrambleVector() - -Constructor for class com.yahoo.ycsb.FindGoodScrambleVector -
           
          FNV_offset_basis_32 - Static variable in class com.yahoo.ycsb.Utils
            @@ -284,18 +266,9 @@ Static variable in class com.yahoo.ycsb.

          H

          -
          hash(int, int) - -Static method in class com.yahoo.ycsb.FindGoodAB -
            -
          hash(int, int) - -Static method in class com.yahoo.ycsb.FindGoodScrambleVector -
            -
          hash(int, int) - -Static method in class com.yahoo.ycsb.TestCollisions -
           
          hash(int) - Static method in class com.yahoo.ycsb.Utils -
            +
          Hash an integer value.

          @@ -357,14 +330,6 @@ Static variable in class com.yahoo.ycsb.

          -J

          -
          -
          JenkinsHash(int) - -Static method in class com.yahoo.ycsb.Utils -
            -
          -

          L

          @@ -391,27 +356,12 @@ Method in class com.yahoo.ycsb.main(String[]) - Static method in class com.yahoo.ycsb.Client
            -
          main(String[]) - -Static method in class com.yahoo.ycsb.FindGoodAB -
            -
          main(String[]) - -Static method in class com.yahoo.ycsb.FindGoodScrambleVector -
           
          main(String[]) - Static method in class com.yahoo.ycsb.ScrambledZipfianGenerator
           
          main(String[]) - Static method in class com.yahoo.ycsb.SkewedLatestGenerator
            -
          main(String[]) - -Static method in class com.yahoo.ycsb.TestCollisions -
            -
          main(String[]) - -Static method in class com.yahoo.ycsb.TestExpandedZipfian -
            -
          main(String[]) - -Static method in class com.yahoo.ycsb.TestZipfian -
           
          main(String[]) - Static method in class com.yahoo.ycsb.ZipfianGenerator
            @@ -494,13 +444,13 @@ Method in class com.yahoo.ycsb.

          O

          -
          OneMeasurement - Class in com.yahoo.ycsb
           
          OneMeasurement(String) - +
          OneMeasurement - Class in com.yahoo.ycsb
          A single measured metric (e.g.
          OneMeasurement(String) - Constructor for class com.yahoo.ycsb.OneMeasurement
            -
          OneMeasurementHistogram - Class in com.yahoo.ycsb
          Take measurements and maintain a histogram of latencies.
          OneMeasurementHistogram(String, Properties) - +
          OneMeasurementHistogram - Class in com.yahoo.ycsb
          Take measurements and maintain a histogram of a given metric, such as READ LATENCY.
          OneMeasurementHistogram(String, Properties) - Constructor for class com.yahoo.ycsb.OneMeasurementHistogram
            -
          OneMeasurementTimeSeries - Class in com.yahoo.ycsb
           
          OneMeasurementTimeSeries(String, Properties) - +
          OneMeasurementTimeSeries - Class in com.yahoo.ycsb
          A time series measurement of a metric, such as READ LATENCY.
          OneMeasurementTimeSeries(String, Properties) - Constructor for class com.yahoo.ycsb.OneMeasurementTimeSeries
           
          OPERATION_COUNT_PROPERTY - @@ -602,18 +552,6 @@ Static variable in class com.yahoo.ycsb.workloads.SCAN_PROPORTION_PROPERTY_DEFAULT - Static variable in class com.yahoo.ycsb.workloads.CoreWorkload
          The default proportion of transactions that are scans. -
          scramble(int) - -Static method in class com.yahoo.ycsb.FindGoodAB -
            -
          scramble(int) - -Static method in class com.yahoo.ycsb.FindGoodScrambleVector -
            -
          scramble(int) - -Static method in class com.yahoo.ycsb.TestCollisions -
            -
          scrambleArray() - -Static method in class com.yahoo.ycsb.FindGoodScrambleVector -
           
          ScrambledZipfianGenerator - Class in com.yahoo.ycsb
          A generator of a zipfian distribution.
          ScrambledZipfianGenerator(long) - Constructor for class com.yahoo.ycsb.ScrambledZipfianGenerator
          Create a zipfian generator for the specified number of items. @@ -638,7 +576,7 @@ Static variable in class com.yahoo.ycsb.SIMULATE_DELAY_DEFAULT - Static variable in class com.yahoo.ycsb.BasicDB
            -
          SkewedLatestGenerator - Class in com.yahoo.ycsb
           
          SkewedLatestGenerator(CounterGenerator) - +
          SkewedLatestGenerator - Class in com.yahoo.ycsb
          Generate a popularity distribution of items, skewed to favor recent items significantly more than older items.
          SkewedLatestGenerator(CounterGenerator) - Constructor for class com.yahoo.ycsb.SkewedLatestGenerator
           
          @@ -649,21 +587,6 @@ Constructor for class com.yahoo.ycsb.TABLENAME - Static variable in class com.yahoo.ycsb.workloads.CoreWorkload
          The name of the database table to run queries against. -
          TestCollisions - Class in com.yahoo.ycsb
           
          TestCollisions() - -Constructor for class com.yahoo.ycsb.TestCollisions -
            -
          TestExpandedZipfian - Class in com.yahoo.ycsb
           
          TestExpandedZipfian() - -Constructor for class com.yahoo.ycsb.TestExpandedZipfian -
            -
          testVector(int) - -Static method in class com.yahoo.ycsb.FindGoodAB -
            -
          testVector(int) - -Static method in class com.yahoo.ycsb.TestCollisions -
            -
          TestZipfian - Class in com.yahoo.ycsb
           
          TestZipfian() - -Constructor for class com.yahoo.ycsb.TestZipfian -
           

          @@ -672,10 +595,10 @@ Constructor for class com.yahoo.ycsb.UniformGenerator - Class in com.yahoo.ycsb
          An expression that generates a random integer in the specified range
          UniformGenerator(Vector<String>) - Constructor for class com.yahoo.ycsb.UniformGenerator
          Creates a generator that will return strings from the specified set uniformly randomly -
          UniformIntegerGenerator - Class in com.yahoo.ycsb
           
          UniformIntegerGenerator(int, int) - +
          UniformIntegerGenerator - Class in com.yahoo.ycsb
          Generates integers randomly uniform from an interval.
          UniformIntegerGenerator(int, int) - Constructor for class com.yahoo.ycsb.UniformIntegerGenerator
          Creates a generator that will return integers uniformly randomly from the interval [lb,ub] inclusive (that is, lb and ub are possible values) -
          UnknownDBException - Exception in com.yahoo.ycsb
           
          UnknownDBException(String) - +
          UnknownDBException - Exception in com.yahoo.ycsb
          Could not create the specified DB.
          UnknownDBException(String) - Constructor for exception com.yahoo.ycsb.UnknownDBException
           
          UnknownDBException() - @@ -705,7 +628,7 @@ Static variable in class com.yahoo.ycsb.workloads.usageMessage() - Static method in class com.yahoo.ycsb.Client
            -
          Utils - Class in com.yahoo.ycsb
           
          Utils() - +
          Utils - Class in com.yahoo.ycsb
          Utility functions.
          Utils() - Constructor for class com.yahoo.ycsb.Utils
           

          @@ -730,7 +653,7 @@ Constructor for class com.yahoo.ycsb.WORKLOAD_PROPERTY - Static variable in class com.yahoo.ycsb.Client
            -
          WorkloadException - Exception in com.yahoo.ycsb
           
          WorkloadException(String) - +
          WorkloadException - Exception in com.yahoo.ycsb
          The workload tried to do something bad.
          WorkloadException(String) - Constructor for exception com.yahoo.ycsb.WorkloadException
           
          WorkloadException() - @@ -770,7 +693,7 @@ Constructor for class com.yahoo.ycsb.A B C D F G H I J L M N O P R S T U V W Z +A B C D F G H I L M N O P R S T U V W Z diff --git a/doc/javadoc/index.html b/doc/javadoc/index.html index 73dd22fb..f0d2fa68 100644 --- a/doc/javadoc/index.html +++ b/doc/javadoc/index.html @@ -2,7 +2,7 @@ - + Generated Documentation (Untitled) diff --git a/doc/javadoc/overview-frame.html b/doc/javadoc/overview-frame.html index 16507ee7..53bef5b5 100644 --- a/doc/javadoc/overview-frame.html +++ b/doc/javadoc/overview-frame.html @@ -2,7 +2,7 @@ - + Overview diff --git a/doc/javadoc/overview-summary.html b/doc/javadoc/overview-summary.html index 09c5b14d..020204af 100644 --- a/doc/javadoc/overview-summary.html +++ b/doc/javadoc/overview-summary.html @@ -2,7 +2,7 @@ - + Overview diff --git a/doc/javadoc/overview-tree.html b/doc/javadoc/overview-tree.html index 0a235260..71d5a37e 100644 --- a/doc/javadoc/overview-tree.html +++ b/doc/javadoc/overview-tree.html @@ -2,7 +2,7 @@ - + Class Hierarchy @@ -88,13 +88,13 @@ Class Hierarchy
        • java.lang.Object
          • com.yahoo.ycsb.Client
          • com.yahoo.ycsb.DB -
          • com.yahoo.ycsb.DBFactory
          • com.yahoo.ycsb.FindGoodAB
          • com.yahoo.ycsb.FindGoodScrambleVector
          • com.yahoo.ycsb.Generator
              +
            • com.yahoo.ycsb.DBFactory
            • com.yahoo.ycsb.Generator
            • com.yahoo.ycsb.Measurements
            • com.yahoo.ycsb.OneMeasurement -
            • com.yahoo.ycsb.TestCollisions
            • com.yahoo.ycsb.TestExpandedZipfian
            • com.yahoo.ycsb.TestZipfian
            • java.lang.Throwable (implements java.io.Serializable) +
            • java.lang.Throwable (implements java.io.Serializable)
              • java.lang.Exception diff --git a/doc/javadoc/serialized-form.html b/doc/javadoc/serialized-form.html index 4b2f347a..337c1f42 100644 --- a/doc/javadoc/serialized-form.html +++ b/doc/javadoc/serialized-form.html @@ -2,7 +2,7 @@ - + Serialized Form diff --git a/src/com/yahoo/ycsb/Client.java b/src/com/yahoo/ycsb/Client.java index 73561c9d..f8677bda 100644 --- a/src/com/yahoo/ycsb/Client.java +++ b/src/com/yahoo/ycsb/Client.java @@ -311,7 +311,9 @@ class ClientThread extends Thread } } - +/** + * Main class for executing YCSB. + */ public class Client { diff --git a/src/com/yahoo/ycsb/DBException.java b/src/com/yahoo/ycsb/DBException.java index 9c681981..c598938a 100644 --- a/src/com/yahoo/ycsb/DBException.java +++ b/src/com/yahoo/ycsb/DBException.java @@ -17,6 +17,9 @@ package com.yahoo.ycsb; +/** + * Something bad happened while interacting with the database. + */ public class DBException extends Exception { /** diff --git a/src/com/yahoo/ycsb/DBFactory.java b/src/com/yahoo/ycsb/DBFactory.java index 53057739..b526aa91 100644 --- a/src/com/yahoo/ycsb/DBFactory.java +++ b/src/com/yahoo/ycsb/DBFactory.java @@ -19,6 +19,9 @@ package com.yahoo.ycsb; import java.util.Properties; +/** + * Creates a DB layer by dynamically classloading the specified DB class. + */ public class DBFactory { @SuppressWarnings("unchecked") diff --git a/src/com/yahoo/ycsb/DiscreteGenerator.java b/src/com/yahoo/ycsb/DiscreteGenerator.java index c324ba7f..0640d883 100644 --- a/src/com/yahoo/ycsb/DiscreteGenerator.java +++ b/src/com/yahoo/ycsb/DiscreteGenerator.java @@ -20,6 +20,9 @@ package com.yahoo.ycsb; import java.util.Vector; import java.util.Random; +/** + * Generates a distribution by choosing from a discrete set of values. + */ public class DiscreteGenerator extends Generator { class Pair diff --git a/src/com/yahoo/ycsb/FindGoodAB.java b/src/com/yahoo/ycsb/FindGoodAB.java deleted file mode 100644 index 2186d384..00000000 --- a/src/com/yahoo/ycsb/FindGoodAB.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Copyright (c) 2010 Yahoo! Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you - * may not use this file except in compliance with the License. You - * may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. See accompanying - * LICENSE file. - */ - -package com.yahoo.ycsb; - -import java.util.Random; - -public class FindGoodAB { - - static final int[] scramblevector={251, 37, 147, 110, 233, 38, 225, 244, 17, 31, 231, 33, 249, 93, 229, 177, 47, 142, 55, 65, 106, 104, 178, 61, 182, 89, 222, 51, 108, 165, 100, 111, 113, 195, 197, 102, 35, 88, 9, 184, 128, 239, 240, 90, 92, 98, 78, 158, 219, 16, 112, 121, 13, 56, 236, 58, 82, 73, 167, 216, 224, 223, 14, 39, 175, 70, 203, 83, 50, 238, 139, 125, 211, 12, 141, 63, 237, 152, 135, 144, 48, 138, 213, 21, 97, 53, 245, 172, 166, 114, 194, 94, 198, 127, 191, 36, 148, 67, 30, 4, 71, 27, 221, 173, 72, 143, 80, 202, 181, 160, 159, 86, 201, 188, 59, 105, 25, 11, 57, 156, 24, 149, 183, 241, 18, 161, 124, 234, 176, 41, 133, 136, 122, 218, 10, 210, 45, 77, 116, 42, 206, 120, 29, 115, 180, 235, 81, 7, 163, 205, 22, 187, 107, 199, 32, 8, 227, 129, 19, 5, 190, 130, 209, 212, 243, 146, 99, 119, 169, 60, 68, 254, 52, 40, 255, 134, 96, 79, 192, 189, 101, 20, 226, 164, 2, 217, 207, 3, 91, 137, 252, 247, 117, 15, 118, 109, 230, 170, 44, 66, 200, 140, 84, 154, 215, 62, 196, 157, 153, 123, 150, 174, 208, 248, 145, 95, 1, 85, 193, 103, 204, 131, 186, 49, 168, 253, 132, 220, 242, 214, 162, 228, 74, 179, 232, 34, 75, 151, 246, 69, 23, 6, 126, 76, 0, 185, 46, 87, 64, 54, 26, 43, 28, 155, 171, 250}; - static final int[] scramblevector2={35, 210, 27, 178, 218, 165, 145, 87, 10, 133, 134, 127, 92, 205, 96, 250, 136, 59, 84, 248, 19, 20, 147, 125, 89, 180, 246, 12, 137, 168, 142, 69, 130, 199, 150, 223, 0, 26, 14, 57, 155, 236, 204, 195, 66, 97, 56, 230, 159, 253, 229, 52, 182, 39, 189, 255, 44, 71, 139, 5, 3, 63, 121, 60, 135, 193, 8, 51, 49, 75, 76, 129, 6, 38, 33, 46, 80, 24, 103, 249, 251, 94, 32, 162, 161, 131, 225, 34, 149, 203, 211, 170, 93, 74, 109, 36, 45, 101, 124, 13, 65, 41, 128, 98, 148, 233, 112, 156, 85, 146, 81, 172, 219, 100, 240, 17, 18, 23, 202, 220, 239, 169, 68, 115, 143, 48, 47, 77, 58, 7, 241, 244, 173, 164, 151, 167, 70, 254, 181, 194, 191, 132, 227, 28, 158, 171, 30, 166, 72, 200, 64, 79, 163, 108, 104, 25, 42, 126, 153, 54, 11, 198, 119, 221, 187, 228, 120, 207, 122, 176, 222, 208, 16, 113, 102, 185, 116, 242, 86, 105, 234, 217, 157, 206, 154, 238, 174, 190, 209, 144, 37, 2, 9, 55, 15, 247, 83, 183, 188, 152, 50, 231, 43, 212, 184, 245, 232, 177, 214, 224, 111, 114, 243, 197, 235, 140, 21, 61, 29, 62, 40, 160, 186, 138, 118, 67, 196, 110, 237, 53, 82, 175, 107, 73, 213, 123, 95, 117, 192, 201, 215, 216, 78, 226, 91, 106, 141, 90, 4, 99, 252, 179, 88, 1, 22, 31}; - static final int[] scramblevector3={208, 11, 56, 253, 167, 174, 228, 75, 251, 5, 227, 198, 57, 120, 103, 169, 218, 76, 24, 45, 170, 83, 55, 139, 40, 20, 87, 192, 21, 188, 200, 63, 13, 143, 99, 144, 96, 6, 36, 244, 176, 175, 59, 118, 67, 155, 195, 121, 77, 220, 101, 60, 235, 163, 212, 116, 78, 153, 216, 23, 219, 8, 138, 126, 136, 47, 217, 85, 247, 34, 50, 7, 252, 221, 64, 209, 22, 206, 110, 157, 249, 193, 199, 236, 30, 25, 89, 245, 182, 124, 154, 242, 43, 141, 80, 62, 201, 4, 51, 16, 254, 1, 186, 191, 86, 137, 100, 106, 91, 10, 215, 223, 95, 164, 129, 71, 246, 239, 127, 190, 39, 93, 119, 151, 210, 184, 28, 224, 202, 123, 72, 108, 146, 12, 27, 204, 73, 90, 179, 66, 84, 237, 65, 173, 158, 37, 105, 194, 178, 159, 230, 148, 35, 42, 131, 140, 15, 94, 250, 48, 180, 203, 166, 0, 88, 49, 171, 29, 122, 205, 111, 185, 107, 160, 189, 14, 98, 69, 46, 3, 31, 168, 241, 26, 225, 145, 156, 234, 243, 135, 214, 54, 109, 70, 248, 233, 161, 17, 222, 196, 183, 115, 41, 232, 213, 9, 134, 211, 58, 181, 113, 172, 132, 150, 79, 255, 114, 165, 152, 112, 33, 97, 44, 207, 147, 177, 197, 61, 2, 149, 82, 162, 38, 231, 92, 32, 128, 226, 52, 238, 125, 117, 68, 102, 142, 74, 53, 240, 19, 18, 187, 104, 229, 130, 133, 81}; - - static final int[][] scramblevectors={scramblevector,scramblevector2,scramblevector3}; - - static final int scrambles=3; - - public static int scramble(int val) - { - int ret=0; - - for (int s=0; s=0; i--) - { - int tval=val>>(8*i); - int octet=tval&0x00ff; - - - ret<<=8; - ret+=scramblevectors[s][octet]; - } - } - - return ret; - } - - /* - public static int hash(int val, int itemcount) - { - //return Math.abs(Utils.scramble(Utils.scramble(val)))%itemcount; - //return Math.abs(Utils.scramble(Utils.scramble(val)))%itemcount; - int ret=val; - - ret=Math.abs(Utils.scramble(ret)); - - return ret%itemcount; - } - */ - - public static int a; - public static int b; - - public static int hash(int val, int itemcount) - { - return Math.abs(val*a+b)%itemcount; - } - - public static void main(String[] args) - { - int itemcount=100000; - - int iterations=0; - - Random r=new Random(); - int bestcount=0; - int besta=0,bestb=0; - while (true) - { - a=r.nextInt(); - b=r.nextInt(); - - int count=testVector(itemcount); - iterations++; - - if (count>bestcount) - { - bestcount=count; - besta=a; - bestb=b; - } - - if (iterations%1000==0) - { - System.out.println(bestcount+" - "+(100.0*((double)bestcount)/((double)itemcount))+"% a="+besta+" b="+bestb); - } - } - } - - public static int testVector(int itemcount) - { - int[] countarray=new int[itemcount]; - - for (int i=0; i0) - { - count++; - } - } - - return count; - } - - -} diff --git a/src/com/yahoo/ycsb/FindGoodScrambleVector.java b/src/com/yahoo/ycsb/FindGoodScrambleVector.java deleted file mode 100644 index 44b22210..00000000 --- a/src/com/yahoo/ycsb/FindGoodScrambleVector.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Copyright (c) 2010 Yahoo! Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you - * may not use this file except in compliance with the License. You - * may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. See accompanying - * LICENSE file. - */ - -package com.yahoo.ycsb; - -import java.util.Random; - -public class FindGoodScrambleVector { -static Random r=new Random(); - - static final int permutations=2; - - static final int scrambles=3; - - static int[] scramblevector=null; - static int[] bestscramblevector=null; - static int bestcount=0; - - public static int[] scrambleArray() - { - int[] arr=new int[256]; - - for (int i=0; i<256; i++) - { - arr[i]=i; - } - - for (int p=0; p=1; i--) - { - int index=r.nextInt(256); - int swp=arr[i]; - arr[i]=arr[index]; - arr[index]=swp; - } - } - - return arr; - } - - public static int scramble(int val) - { - int ret=0; - - for (int i = 3; i >=0; i--) - { - int tval=val>>(8*i); - int octet=tval&0x00ff; - - - ret<<=8; - ret+=scramblevector[octet]; - } - - return ret; - } - - public static int hash(int val, int itemcount) - { - //return Math.abs(Utils.scramble(Utils.scramble(val)))%itemcount; - //return Math.abs(Utils.scramble(Utils.scramble(val)))%itemcount; - int ret=val; - - for (int i=0; i0) - { - itemsleft++; - } - } - - if (itemsleft>bestcount) - { - bestscramblevector=scramblevector; - bestcount=itemsleft; - } - - iterations++; - - if (iterations%1000==0) - { - System.out.println(iterations+". "+bestcount); - System.out.print(" "); - for (int i=0; i<256; i++) - { - System.out.print(bestscramblevector[i]+", "); - } - System.out.println(); - - } - } - - - } -} diff --git a/src/com/yahoo/ycsb/OneMeasurement.java b/src/com/yahoo/ycsb/OneMeasurement.java index 4a660274..a531220c 100644 --- a/src/com/yahoo/ycsb/OneMeasurement.java +++ b/src/com/yahoo/ycsb/OneMeasurement.java @@ -19,6 +19,9 @@ package com.yahoo.ycsb; import java.io.PrintStream; +/** + * A single measured metric (e.g. READ LATENCY) + */ public abstract class OneMeasurement { String _name; diff --git a/src/com/yahoo/ycsb/OneMeasurementHistogram.java b/src/com/yahoo/ycsb/OneMeasurementHistogram.java index 48d04f0a..be81dd0b 100644 --- a/src/com/yahoo/ycsb/OneMeasurementHistogram.java +++ b/src/com/yahoo/ycsb/OneMeasurementHistogram.java @@ -24,7 +24,7 @@ import java.util.Properties; /** - * Take measurements and maintain a histogram of latencies. + * Take measurements and maintain a histogram of a given metric, such as READ LATENCY. * * @author cooperb * diff --git a/src/com/yahoo/ycsb/OneMeasurementTimeSeries.java b/src/com/yahoo/ycsb/OneMeasurementTimeSeries.java index 21698505..4f4d4aa6 100644 --- a/src/com/yahoo/ycsb/OneMeasurementTimeSeries.java +++ b/src/com/yahoo/ycsb/OneMeasurementTimeSeries.java @@ -37,6 +37,9 @@ class SeriesUnit public double average; } +/** + * A time series measurement of a metric, such as READ LATENCY. + */ public class OneMeasurementTimeSeries extends OneMeasurement { /** diff --git a/src/com/yahoo/ycsb/SkewedLatestGenerator.java b/src/com/yahoo/ycsb/SkewedLatestGenerator.java index 1a97140f..dbe789aa 100644 --- a/src/com/yahoo/ycsb/SkewedLatestGenerator.java +++ b/src/com/yahoo/ycsb/SkewedLatestGenerator.java @@ -17,6 +17,9 @@ package com.yahoo.ycsb; +/** + * Generate a popularity distribution of items, skewed to favor recent items significantly more than older items. + */ public class SkewedLatestGenerator extends IntegerGenerator { CounterGenerator _basis; diff --git a/src/com/yahoo/ycsb/TestCollisions.java b/src/com/yahoo/ycsb/TestCollisions.java deleted file mode 100644 index e268e0b3..00000000 --- a/src/com/yahoo/ycsb/TestCollisions.java +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (c) 2010 Yahoo! Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you - * may not use this file except in compliance with the License. You - * may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. See accompanying - * LICENSE file. - */ - -package com.yahoo.ycsb; - -import java.util.Random; - - -public class TestCollisions { - - static final int[] scramblevector={251, 37, 147, 110, 233, 38, 225, 244, 17, 31, 231, 33, 249, 93, 229, 177, 47, 142, 55, 65, 106, 104, 178, 61, 182, 89, 222, 51, 108, 165, 100, 111, 113, 195, 197, 102, 35, 88, 9, 184, 128, 239, 240, 90, 92, 98, 78, 158, 219, 16, 112, 121, 13, 56, 236, 58, 82, 73, 167, 216, 224, 223, 14, 39, 175, 70, 203, 83, 50, 238, 139, 125, 211, 12, 141, 63, 237, 152, 135, 144, 48, 138, 213, 21, 97, 53, 245, 172, 166, 114, 194, 94, 198, 127, 191, 36, 148, 67, 30, 4, 71, 27, 221, 173, 72, 143, 80, 202, 181, 160, 159, 86, 201, 188, 59, 105, 25, 11, 57, 156, 24, 149, 183, 241, 18, 161, 124, 234, 176, 41, 133, 136, 122, 218, 10, 210, 45, 77, 116, 42, 206, 120, 29, 115, 180, 235, 81, 7, 163, 205, 22, 187, 107, 199, 32, 8, 227, 129, 19, 5, 190, 130, 209, 212, 243, 146, 99, 119, 169, 60, 68, 254, 52, 40, 255, 134, 96, 79, 192, 189, 101, 20, 226, 164, 2, 217, 207, 3, 91, 137, 252, 247, 117, 15, 118, 109, 230, 170, 44, 66, 200, 140, 84, 154, 215, 62, 196, 157, 153, 123, 150, 174, 208, 248, 145, 95, 1, 85, 193, 103, 204, 131, 186, 49, 168, 253, 132, 220, 242, 214, 162, 228, 74, 179, 232, 34, 75, 151, 246, 69, 23, 6, 126, 76, 0, 185, 46, 87, 64, 54, 26, 43, 28, 155, 171, 250}; - static final int[] scramblevector2={35, 210, 27, 178, 218, 165, 145, 87, 10, 133, 134, 127, 92, 205, 96, 250, 136, 59, 84, 248, 19, 20, 147, 125, 89, 180, 246, 12, 137, 168, 142, 69, 130, 199, 150, 223, 0, 26, 14, 57, 155, 236, 204, 195, 66, 97, 56, 230, 159, 253, 229, 52, 182, 39, 189, 255, 44, 71, 139, 5, 3, 63, 121, 60, 135, 193, 8, 51, 49, 75, 76, 129, 6, 38, 33, 46, 80, 24, 103, 249, 251, 94, 32, 162, 161, 131, 225, 34, 149, 203, 211, 170, 93, 74, 109, 36, 45, 101, 124, 13, 65, 41, 128, 98, 148, 233, 112, 156, 85, 146, 81, 172, 219, 100, 240, 17, 18, 23, 202, 220, 239, 169, 68, 115, 143, 48, 47, 77, 58, 7, 241, 244, 173, 164, 151, 167, 70, 254, 181, 194, 191, 132, 227, 28, 158, 171, 30, 166, 72, 200, 64, 79, 163, 108, 104, 25, 42, 126, 153, 54, 11, 198, 119, 221, 187, 228, 120, 207, 122, 176, 222, 208, 16, 113, 102, 185, 116, 242, 86, 105, 234, 217, 157, 206, 154, 238, 174, 190, 209, 144, 37, 2, 9, 55, 15, 247, 83, 183, 188, 152, 50, 231, 43, 212, 184, 245, 232, 177, 214, 224, 111, 114, 243, 197, 235, 140, 21, 61, 29, 62, 40, 160, 186, 138, 118, 67, 196, 110, 237, 53, 82, 175, 107, 73, 213, 123, 95, 117, 192, 201, 215, 216, 78, 226, 91, 106, 141, 90, 4, 99, 252, 179, 88, 1, 22, 31}; - static final int[] scramblevector3={208, 11, 56, 253, 167, 174, 228, 75, 251, 5, 227, 198, 57, 120, 103, 169, 218, 76, 24, 45, 170, 83, 55, 139, 40, 20, 87, 192, 21, 188, 200, 63, 13, 143, 99, 144, 96, 6, 36, 244, 176, 175, 59, 118, 67, 155, 195, 121, 77, 220, 101, 60, 235, 163, 212, 116, 78, 153, 216, 23, 219, 8, 138, 126, 136, 47, 217, 85, 247, 34, 50, 7, 252, 221, 64, 209, 22, 206, 110, 157, 249, 193, 199, 236, 30, 25, 89, 245, 182, 124, 154, 242, 43, 141, 80, 62, 201, 4, 51, 16, 254, 1, 186, 191, 86, 137, 100, 106, 91, 10, 215, 223, 95, 164, 129, 71, 246, 239, 127, 190, 39, 93, 119, 151, 210, 184, 28, 224, 202, 123, 72, 108, 146, 12, 27, 204, 73, 90, 179, 66, 84, 237, 65, 173, 158, 37, 105, 194, 178, 159, 230, 148, 35, 42, 131, 140, 15, 94, 250, 48, 180, 203, 166, 0, 88, 49, 171, 29, 122, 205, 111, 185, 107, 160, 189, 14, 98, 69, 46, 3, 31, 168, 241, 26, 225, 145, 156, 234, 243, 135, 214, 54, 109, 70, 248, 233, 161, 17, 222, 196, 183, 115, 41, 232, 213, 9, 134, 211, 58, 181, 113, 172, 132, 150, 79, 255, 114, 165, 152, 112, 33, 97, 44, 207, 147, 177, 197, 61, 2, 149, 82, 162, 38, 231, 92, 32, 128, 226, 52, 238, 125, 117, 68, 102, 142, 74, 53, 240, 19, 18, 187, 104, 229, 130, 133, 81}; - - static final int[][] scramblevectors={scramblevector,scramblevector2,scramblevector3}; - - static final int scrambles=3; - - public static int scramble(int val) - { - int ret=0; - - for (int s=0; s=0; i--) - { - int tval=val>>(8*i); - int octet=tval&0x00ff; - - - ret<<=8; - ret+=scramblevectors[s][octet]; - } - } - - return ret; - } - - /* - public static int hash(int val, int itemcount) - { - //return Math.abs(Utils.scramble(Utils.scramble(val)))%itemcount; - //return Math.abs(Utils.scramble(Utils.scramble(val)))%itemcount; - int ret=val; - - ret=Math.abs(Utils.scramble(ret)); - - return ret%itemcount; - } - */ - - public static int a=787690635; - public static int b=-1147376859; - - public static int hash(int val, int itemcount) - { - return Math.abs((val*a+b)%itemcount); - } - - public static void main(String[] args) - { - Random r=new Random(); - for (int itemcount=1000000; itemcount<500000000; itemcount+=1000000) - { - int bestcount=0; - int besta=0; - int bestb=0; - int iterations=0; - while (true) - { - a=r.nextInt(itemcount); - b=r.nextInt(itemcount); - int count=testVector(itemcount); - if (count>bestcount) - { - bestcount=count; - besta=a; - bestb=b; - } - iterations++; - if (iterations%1000==0) - { - System.err.println(" "+itemcount+" - "+(100.0*((double)bestcount)/((double)itemcount))+"(a="+besta+", b="+bestb+")"); - } - if (((double)bestcount)/((double)itemcount)>0.9) - { - break; - } - } - System.err.println(itemcount+" - "+(100.0*((double)bestcount)/((double)itemcount))+"(a="+besta+", b="+bestb+")"); - System.out.println(itemcount+" - "+(100.0*((double)bestcount)/((double)itemcount))+"(a="+besta+", b="+bestb+")"); - } - } - - public static int testVector(int itemcount) - { - int[] countarray=new int[itemcount]; - - for (int i=0; i0) - { - count++; - } - } - - /* - for (int i=0; i0) - { - hits++; - } - System.out.println(count[i]+", "+i); - } - - System.err.println(hits+", "+(100.0*((double)hits)/((double)itemcount))+" %"); - - } - -} diff --git a/src/com/yahoo/ycsb/TestZipfian.java b/src/com/yahoo/ycsb/TestZipfian.java deleted file mode 100644 index 22add709..00000000 --- a/src/com/yahoo/ycsb/TestZipfian.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright (c) 2010 Yahoo! Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you - * may not use this file except in compliance with the License. You - * may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing - * permissions and limitations under the License. See accompanying - * LICENSE file. - */ - -package com.yahoo.ycsb; - -public class TestZipfian { - - public static void main(String[] args) { - int itemcount=100000; - int operationcount=10000000; - - IntegerGenerator gen=new ZipfianGenerator(itemcount); - - int[] counter=new int[itemcount]; - - for (int i=0; imaxcount) - { - maxcount=counter[i]; - } - } - - int[] buckets=new int[maxcount+1]; - - for (int i=0; i0) - { - System.out.println(i+", "+buckets[i]); - } - } - - */ - } - -} diff --git a/src/com/yahoo/ycsb/UniformIntegerGenerator.java b/src/com/yahoo/ycsb/UniformIntegerGenerator.java index a4262238..f4cca3e9 100644 --- a/src/com/yahoo/ycsb/UniformIntegerGenerator.java +++ b/src/com/yahoo/ycsb/UniformIntegerGenerator.java @@ -19,6 +19,9 @@ package com.yahoo.ycsb; import java.util.Random; +/** + * Generates integers randomly uniform from an interval. + */ public class UniformIntegerGenerator extends IntegerGenerator { Random _random; diff --git a/src/com/yahoo/ycsb/UnknownDBException.java b/src/com/yahoo/ycsb/UnknownDBException.java index f24dfc0b..9e20a351 100644 --- a/src/com/yahoo/ycsb/UnknownDBException.java +++ b/src/com/yahoo/ycsb/UnknownDBException.java @@ -17,6 +17,9 @@ package com.yahoo.ycsb; +/** + * Could not create the specified DB. + */ public class UnknownDBException extends Exception { /** diff --git a/src/com/yahoo/ycsb/Utils.java b/src/com/yahoo/ycsb/Utils.java index 33bee065..fc905296 100644 --- a/src/com/yahoo/ycsb/Utils.java +++ b/src/com/yahoo/ycsb/Utils.java @@ -19,98 +19,87 @@ package com.yahoo.ycsb; import java.util.Random; +/** + * Utility functions. + */ public class Utils { static Random random=new Random(); - public static String ASCIIString(int length) - { - int interval='~'-' '+1; - - StringBuilder str=new StringBuilder(); - for (int i=0; i>8; - - hash += octet; - hash += (hash << 10); - hash ^= (hash >> 6); - } - hash += (hash << 3); - hash ^= (hash >> 11); - hash += (hash << 15); - return Math.abs(hash); - } - - public static final int FNV_offset_basis_32=0x811c9dc5; - public static final int FNV_prime_32=16777619; - - /** - * 32 bit FNV hash. Produces more "random" hashes than (say) String.hashCode(). - * - * @param val The value to hash. - * @return The hash value - */ - public static int FNVhash32(int val) - { - //from http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash - int hashval = FNV_offset_basis_32; - - for (int i=0; i<4; i++) - { - int octet=val&0x00ff; - val=val>>8; - - hashval = hashval ^ octet; - hashval = hashval * FNV_prime_32; - //hashval = hashval ^ octet; - } - return Math.abs(hashval); - } - - public static final long FNV_offset_basis_64=0xCBF29CE484222325L; - public static final long FNV_prime_64=1099511628211L; - - /** - * 64 bit FNV hash. Produces more "random" hashes than (say) String.hashCode(). - * - * @param val The value to hash. - * @return The hash value - */ - public static long FNVhash64(long val) - { - //from http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash - long hashval = FNV_offset_basis_64; - - for (int i=0; i<8; i++) - { - long octet=val&0x00ff; - val=val>>8; - - hashval = hashval ^ octet; - hashval = hashval * FNV_prime_64; - //hashval = hashval ^ octet; - } - return Math.abs(hashval); - } + public static final int FNV_offset_basis_32=0x811c9dc5; + public static final int FNV_prime_32=16777619; + + /** + * 32 bit FNV hash. Produces more "random" hashes than (say) String.hashCode(). + * + * @param val The value to hash. + * @return The hash value + */ + public static int FNVhash32(int val) + { + //from http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash + int hashval = FNV_offset_basis_32; + + for (int i=0; i<4; i++) + { + int octet=val&0x00ff; + val=val>>8; + + hashval = hashval ^ octet; + hashval = hashval * FNV_prime_32; + //hashval = hashval ^ octet; + } + return Math.abs(hashval); + } + + public static final long FNV_offset_basis_64=0xCBF29CE484222325L; + public static final long FNV_prime_64=1099511628211L; + + /** + * 64 bit FNV hash. Produces more "random" hashes than (say) String.hashCode(). + * + * @param val The value to hash. + * @return The hash value + */ + public static long FNVhash64(long val) + { + //from http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash + long hashval = FNV_offset_basis_64; + + for (int i=0; i<8; i++) + { + long octet=val&0x00ff; + val=val>>8; + + hashval = hashval ^ octet; + hashval = hashval * FNV_prime_64; + //hashval = hashval ^ octet; + } + return Math.abs(hashval); + } } diff --git a/src/com/yahoo/ycsb/WorkloadException.java b/src/com/yahoo/ycsb/WorkloadException.java index 0870eae0..0704881c 100644 --- a/src/com/yahoo/ycsb/WorkloadException.java +++ b/src/com/yahoo/ycsb/WorkloadException.java @@ -17,6 +17,9 @@ package com.yahoo.ycsb; +/** + * The workload tried to do something bad. + */ public class WorkloadException extends Exception { /**