22 #ifndef Hypertable_Lib_DataGenerator_h
23 #define Hypertable_Lib_DataGenerator_h
53 (
"DataGenerator.DeletePercentage",
i32(),
54 "When generating update workload make this percentage of them deletes")
55 (
"DataGenerator.MaxBytes",
i64(),
56 "Maximum number of bytes of key and value data to generate")
57 (
"DataGenerator.MaxKeys",
i64(),
58 "Maximum number of keys to generate for query load")
59 (
"DataGenerator.Seed",
i32()->default_value(1),
60 "Pseudo-random number generator seed")
61 (
"rowkey.order",
str()->default_value(
"random"),
"Order in which to "
62 "generate row keys (random, ascending)")
63 (
"rowkey.distribution",
str()->default_value(
"uniform"),
64 "Default rowkey distribution (uniform, zipf)")
65 (
"rowkey.seed",
i32()->default_value(1),
66 "Default rowkey random number generator seed")
67 (
"rowkey.component.<n>.type",
str(),
68 "Type of rowkey component <n> (string, integer)")
69 (
"rowkey.component.<n>.format",
str(),
"printf-style format string "
70 "for rendering rowkey component <n>.")
71 (
"rowkey.component.<n>.distribution",
str(),
72 "Distribution for rowkey component <n>")
73 (
"rowkey.component.<n>.order",
str(),
74 "Order in which to generate row keys for component <n>")
75 (
"rowkey.component.<n>.min",
str(),
76 "Minimum value for rowkey component <n>.")
77 (
"rowkey.component.<n>.max",
str(),
78 "Maximum value for rowkey component <n>.")
79 (
"rowkey.component.<n>.length.min",
str(),
80 "Minimum length of randomly generated row component <n>.")
81 (
"rowkey.component.<n>.length.max",
str(),
82 "Maximum length of randomly generated row component <n>.")
83 (
"<column>.qualifier.type",
str(),
"Type of qualifier")
84 (
"<column>.qualifier.size",
i32(),
"Size of qualifier")
85 (
"<column>.qualifier.charset",
str(),
86 "Set of characters to use when generating string qualifiers")
87 (
"<column>.value.random",
boo(),
"Generate random values (default=true)")
88 (
"<column>.value.seed",
i32(),
"Pseudo-random generator seed")
89 (
"<column>.value.size",
i32(),
"Size of value")
90 (
"<column>.value.source",
i32(),
"Source file to pull value data from")
91 (
"<column>.value.source.words",
i32(),
"Interpret source as word stream; value.size treated as word count")
92 (
"<column>.value.fixed",
boo(),
"Used the same fixed value for each cell (default=false)")
118 if (other.
m_count != std::numeric_limits< ::int64_t >::max())
119 return m_count <= other.
m_count;
165 int parse_order(
const std::string &
str);
170 #endif // Hypertable_Lib_DataGenerator_h
static void init_options()
Interface and base of config policy.
DataGeneratorIterator(int64_t amount, int64_t count)
std::vector< RowComponent * > m_row_components
bool operator!=(const DataGeneratorIterator &other) const
std::vector< Column * > m_columns
Po::typed_value< String > * str(String *v=0)
std::vector< RowComponentSpec > m_row_component_specs
DataGenerator * m_generator
std::vector< ColumnSpec > m_column_specs
Po::typed_value< int64_t > * i64(int64_t *v=0)
Po::typed_value< int32_t > * i32(int32_t *v=0)
std::shared_ptr< Properties > PropertiesPtr
Desc & file_desc(const char *usage)
Get the config file options description.
DataGeneratorIterator iterator
Po::typed_value< bool > * boo(bool *v=0)
bool allow_unregistered_options(bool choice)
Toggle allow unregistered options.
unsigned long last_data_size()
Provides an STL-style iterator on DataGenerator objects.
Random number generator for int32, int64, double and ascii arrays.
A String class based on std::string.
Desc & cmdline_hidden_desc()
Get the command line hidden options description (for positional options)
Encapsulates decomposed key and value.
void random_generator_set_seed(unsigned seed)
Sets random number generator seed.
unsigned long m_last_data_size