-
Notifications
You must be signed in to change notification settings - Fork 5
Retail Generator Driver
Retail Generator Driver command line interface
bin/generator retail --help
Retail Generator
Usage: generator [options]
-e <value> | --eventsPerSec <value>
number of log events to generate per sec, use this to throttle the generator
-o <value> | --outputFormat <value>
format of the string to write to the file defaults to: 'tsv'
where,
text - string formatted by tabs in between columns
-d <value> | --destination <value>
destination where the generator writes data to, defaults to: 'file'
where,
file - output's directly to flat files
-r <value> | --fileRollSize <value>
size of the file to roll in bytes, defaults to: Int.MaxValue (~2GB)
-p <value> | --filePath <value>
path of the file where the data should be generated, defaults to: '/tmp'
-b <value> | --flushBatch <value>
number of events to flush to file at a single time, defaults to: 10000
--storesCount <value>
number of stores to be used, defaults to: '10'
--productsCount <value>
number of products with in each store id, defaults to: '100'
--startDate <value>
start date to be used for generating date, defaults to: today (yyyy-MM-dd)
--endDate <value>
end date to be used for generating date, defaults to: today + 10 (yyyy-MM-dd)
--threadsCount <value>
number of threads to use for write and read operations, defaults to: 1
--threadPoolSize <value>
size of the thread pool, defaults to: 10
--loggingLevel <value>
Logging level to set, defaults to: INFO
--help
prints this usage text
Examples:
-
To generate events corresponding to 10 stores for 10 products for range of days between current date and 10 days from current date to
/tmp
directorybin/generator retail -p `/tmp`
-
To generate events corresponding to 10 stores for 10 products for range of days between Jan 1, 2014 (2014-01-01) to Dec 31, 2014 (2014-12-31) to
/tmp
directorybin/generator retail --startDate 2014-01-01 --endDate 2014-12-31 -p `/tmp`
-
To generate events corresponding to 10 stores for 10 products for range of days between Jan 1, 2014 (2014-01-01) to Dec 31, 2014 (2014-12-31) to
/tmp
directory in csv formatbin/generator retail --startDate 2014-01-01 --endDate 2014-12-31 -p `/tmp` -o csv
-
To generate events corresponding to 10 stores for 10 products for range of days between Jan 1, 2014 (2014-01-01) to Dec 31, 2014 (2014-12-31) to
/tmp
directory concurrently using 5 threads in csv formatbin/generator retail --startDate 2014-01-01 --endDate 2014-12-31 -p `/tmp` --threadCount 5 -o csv
-
To generate events corresponding to 10 stores for 10 products for range of days between Jan 1, 2014 (2014-01-01) to Dec 31, 2014 (2014-12-31) to
/tmp
directory concurrently using 5 threads in csv formatbin/generator retail --startDate 2014-01-01 --endDate 2014-12-31 -p `/tmp` --threadCount 5 -o csv
-
To generate events corresponding to 10 stores for 10 products for range of days between Jan 1, 2014 (2014-01-01) to Dec 31, 2014 (2014-12-31) to
/tmp
directory concurrently using 5 threads and roll file every 64 MBbin/generator retail --startDate 2014-01-01 --endDate 2014-12-31 -p `/tmp` -r 67108864 --threadCount 5
In cases number (2-6), the number of events generated will be the total events possible for the combination of (combinations) 10 stores for 10 products for each of the 365 days (10 * 10 * 365 = 36,500)