common
Class Producer

java.lang.Object
  extended by common.Producer

public class Producer
extends java.lang.Object

Implementation of a local data generator. This class is used for experiments.

A record is formatted in order of columns as follows:

Notes:

Author:
vohuudtr
See Also:
for detailed usage.

Field Summary
static java.io.OutputStream paramos
           
static java.io.OutputStream statos
           
 
Constructor Summary
Producer()
           
 
Method Summary
static Record generateRecord()
          Generate a random record.
static Statistics getStats()
          Returns the statistics of generated records.
static void main(java.lang.String[] args)
          Usage:
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

paramos

public static java.io.OutputStream paramos

statos

public static java.io.OutputStream statos
Constructor Detail

Producer

public Producer()
Method Detail

generateRecord

public static Record generateRecord()
Generate a random record. While generating records, statistics about the values are also recorded for evaluation.

Returns:
the generated record.

getStats

public static Statistics getStats()
Returns the statistics of generated records.

Returns:
statistics of generated records.

main

public static void main(java.lang.String[] args)
Usage:

java common.Producer <quantity> <paramfile> <statfile> [datafile]

quantity
Number of records to generate.
paramfile
Path to the parameters file (see Parameters).
statfile
Path to the output statistics file.
datafile
Path to the output data file. The output is automatically split into multiple files (suffixed with numbers) of size not greater than 1GB. If datafile is not specified, the standard output is used.
All the paths can be either absolute or relative paths.

Parameters:
args -