39 #include <boost/algorithm/string.hpp>
40 #include <boost/progress.hpp>
41 #include <boost/shared_array.hpp>
42 #include <boost/thread/thread.hpp>
60 "Usage: ht_generate_load [options] <type>\n\n"
62 " This program is used to generate load on a Hypertable\n"
63 " cluster. The <type> argument indicates the type of load\n"
64 " to generate ('query' or 'update').\n\n"
68 static void init_options() {
71 (
"help-config",
"Show help message for config properties")
72 (
"table",
str()->default_value(
"LoadTest"),
"Name of table to query/update")
73 (
"delete-percentage",
i32(),
74 "When generating update workload make this percentage deletes")
75 (
"max-bytes",
i64(),
"Amount of data to generate, measured by number "
76 "of key and value bytes produced")
77 (
"max-keys",
i64(),
"Maximum number of keys to generate for query load")
78 (
"parallel",
i32()->default_value(0),
79 "Spawn threads to execute requests in parallel")
80 (
"query-delay",
i32(),
"Delay milliseconds between each query")
82 "Whether to query 'index' or 'qualifier' index")
83 (
"sample-file",
str(),
84 "Output file to hold request latencies, one per line")
85 (
"seed",
i32()->default_value(1),
"Pseudo-random number generator seed")
86 (
"row-seed",
i32()->default_value(1),
"Pseudo-random number generator seed")
88 "File containing the DataGenerator specification")
89 (
"stdout",
boo()->zero_tokens()->default_value(
false),
90 "Display generated data to stdout instead of sending load to cluster")
91 (
"verbose,v",
boo()->zero_tokens()->default_value(
false),
92 "Show more verbose output")
93 (
"flush",
boo()->zero_tokens()->default_value(
false),
"Flush after each update")
94 (
"no-log-sync",
boo()->zero_tokens()->default_value(
false),
"Don't sync rangeserver commit logs on autoflush")
95 (
"no-log",
"Don't write to the commit log")
96 (
"flush-interval",
i64()->default_value(0),
97 "Amount of data after which to mutator buffers are flushed "
98 "and commit log is synced. Only used if no-log-sync flag is on")
99 (
"shared-mutator-flush-interval",
i64()->default_value(0),
100 "Created a shared mutator using this value as the flush interval")
101 (
"thrift",
boo()->zero_tokens()->default_value(
false),
102 "Generate load via Thrift interface instead of C++ client library")
103 (
"version",
"Show version information and exit")
104 (
"overwrite-delete-flag",
str(),
"Force delete flag (DELETE_ROW, DELETE_CELL, DELETE_COLUMN_FAMILY)")
106 alias(
"delete-percentage",
"DataGenerator.DeletePercentage");
107 alias(
"max-bytes",
"DataGenerator.MaxBytes");
108 alias(
"max-keys",
"DataGenerator.MaxKeys");
109 alias(
"seed",
"DataGenerator.Seed");
110 alias(
"row-seed",
"rowkey.seed");
112 (
"type",
str(),
"Type (update or query).");
119 typedef Meta::list<AppPolicy, DataGeneratorPolicy, DefaultCommPolicy>
Policies;
123 ::uint32_t mutator_flags, ::uint64_t flush_interval,
124 ::uint64_t shared_mutator_flush_interval,
bool to_stdout,
125 String &sample_fname, ::int32_t delete_pct,
bool thrift);
129 ::int32_t parallel,
bool flush, ::uint32_t mutator_flags,
130 ::uint64_t flush_interval,
131 ::uint64_t shared_mutator_flush_interval,
132 ::int32_t delete_pct,
bool thrift);
135 bool to_stdout, ::int32_t delay,
String &sample_fname,
bool thrift);
140 double std_dev(::uint64_t nn,
double sum,
double sq_sum);
145 int main(
int argc,
char **argv) {
146 String table, load_type, spec_file, sample_fname;
148 bool flush, to_stdout, thrift;
149 ::uint64_t flush_interval=0;
150 ::uint64_t shared_mutator_flush_interval=0;
151 ::int32_t query_delay = 0;
152 ::int32_t delete_pct = 0;
153 ::int32_t parallel = 0;
154 ::uint32_t mutator_flags = 0;
157 init_with_policies<Policies>(argc, argv);
161 quick_exit(EXIT_SUCCESS);
164 load_type = get_str(
"type");
166 table = get_str(
"table");
168 parallel = get_i32(
"parallel");
170 sample_fname =
has(
"sample-file") ? get_str(
"sample-file") :
"";
172 if (
has(
"query-delay"))
173 query_delay = get_i32(
"query-delay");
175 flush = get_bool(
"flush");
178 else if (get_bool(
"no-log-sync"))
180 to_stdout = get_bool(
"stdout");
182 flush_interval = get_i64(
"flush-interval");
183 shared_mutator_flush_interval = get_i64(
"shared-mutator-flush-interval");
184 thrift = get_bool(
"thrift");
186 if (
has(
"spec-file")) {
187 spec_file = get_str(
"spec-file");
196 if (generator_props->has(
"DataGenerator.MaxBytes") &&
197 generator_props->has(
"DataGenerator.MaxKeys")) {
198 HT_ERROR(
"Only one of 'DataGenerator.MaxBytes' or 'DataGenerator.MaxKeys' may be specified");
199 quick_exit(EXIT_FAILURE);
202 if (generator_props->has(
"DataGenerator.DeletePercentage"))
203 delete_pct = generator_props->get_i32(
"DataGenerator.DeletePercentage");
205 if (load_type ==
"update" && parallel > 0)
207 mutator_flags, flush_interval,
208 shared_mutator_flush_interval, delete_pct,
210 else if (load_type ==
"update")
212 flush_interval, shared_mutator_flush_interval,
213 to_stdout, sample_fname, delete_pct, thrift);
214 else if (load_type ==
"query") {
215 if (!generator_props->has(
"DataGenerator.MaxKeys")
216 && !generator_props->has(
"max-keys")) {
217 HT_ERROR(
"'DataGenerator.MaxKeys' or --max-keys must be specified for "
218 "load type 'query'");
219 quick_exit(EXIT_FAILURE);
223 HT_FATAL(
"--stdout switch not supported for parallel queries");
224 quick_exit(EXIT_FAILURE);
226 if (sample_fname !=
"") {
227 HT_FATAL(
"--sample-file not supported for parallel queries");
228 quick_exit(EXIT_FAILURE);
230 if (
has(
"query-mode")) {
231 HT_FATAL(
"--query-mode not supported for parallel queries");
232 quick_exit(EXIT_FAILURE);
235 HT_FATAL(
"thrift mode not supported for parallel queries");
236 quick_exit(EXIT_FAILURE);
243 sample_fname, thrift);
247 quick_exit(EXIT_FAILURE);
256 quick_exit(EXIT_SUCCESS);
263 props->parse_args(argc, argv,
cmdline_desc(), 0, 0,
true);
264 for (
int i=1; i<argc; i++) {
265 if (argv[i][0] ==
'-') {
266 ptr = strchr(argv[i],
'=');
268 key =
String(argv[i], ptr-argv[i]);
269 trim_if(key, is_any_of(
"-"));
271 trim_if(value, is_any_of(
"'\""));
272 if (key ==
"delete-percentage") {
273 props->set(key, boost::any( atoi(value.c_str()) ));
274 props->set(
"DataGenerator.DeletePercentage", boost::any( atoi(value.c_str()) ));
276 else if (key == (
"max-bytes")) {
277 props->set(key, boost::any( strtoll(value.c_str(), 0, 0) ));
278 props->set(
"DataGenerator.MaxBytes", boost::any( strtoll(value.c_str(), 0, 0) ));
280 else if (key == (
"max-keys")) {
281 props->set(key, boost::any( strtoll(value.c_str(), 0, 0) ));
282 props->set(
"DataGenerator.MaxKeys", boost::any( strtoll(value.c_str(), 0, 0) ));
284 else if (key ==
"seed") {
285 props->set(key, boost::any( atoi(value.c_str()) ));
286 props->set(
"DataGenerator.Seed", boost::any( atoi(value.c_str()) ));
288 else if (key ==
"row-seed") {
289 props->set(key, boost::any( atoi(value.c_str()) ));
290 props->set(
"rowkey.seed", boost::any( atoi(value.c_str()) ));
293 props->set(key, boost::any(value));
297 trim_if(key, is_any_of(
"-"));
298 if (!props->has(key))
299 props->set(key, boost::any(
true ));
308 ::uint32_t mutator_flags, ::uint64_t flush_interval,
309 ::uint64_t shared_mutator_flush_interval,
bool to_stdout,
310 String &sample_fname, ::int32_t delete_pct,
bool thrift)
312 double cum_latency=0, cum_sq_latency=0, latency=0;
313 double min_latency=10000000, max_latency=0;
314 ::uint64_t total_cells=0;
316 clock_t start_clocks=0, stop_clocks=0;
317 double clocks_per_usec = (double)CLOCKS_PER_SEC / 1000000.0;
318 bool output_samples =
false;
319 ofstream sample_file;
321 ::uint64_t unflushed_data=0;
322 ::uint64_t total_bytes = 0;
323 ::uint64_t consume_threshold = 0;
326 cout <<
"#row\tcolumn\tvalue\n";
328 if ((*iter).column_qualifier == 0 || *(*iter).column_qualifier == 0) {
329 if (delete_pct != 0 && (::random() % 100) < delete_pct)
330 cout << (*iter).row_key <<
"\t" << (*iter).column_family <<
"\t\tDELETE_CELL\n";
332 cout << (*iter).row_key <<
"\t" << (*iter).column_family
333 <<
"\t" << (
const char *)(*iter).value <<
"\n";
336 if (delete_pct != 0 && (::random() % 100) < delete_pct)
337 cout << (*iter).row_key <<
"\t" << (*iter).column_family <<
":"
338 << (*iter).column_qualifier <<
"\t\tDELETE_CELL\n";
340 cout << (*iter).row_key <<
"\t" << (*iter).column_family <<
":"
341 << (*iter).column_qualifier <<
"\t" << (
const char *)(*iter).value <<
"\n";
348 if (sample_fname !=
"") {
349 sample_file.open(sample_fname.c_str());
350 output_samples =
true;
357 String config_file = get_str(
"config");
358 bool key_limit = props->has(
"DataGenerator.MaxKeys");
359 bool largefile_mode =
false;
360 ::uint32_t adjusted_bytes = 0;
362 if (dg.
get_max_bytes() > std::numeric_limits< ::uint32_t >::max()) {
363 largefile_mode =
true;
365 consume_threshold = 1048576LL;
370 boost::progress_display progress_meter(key_limit ? dg.
get_max_keys() : adjusted_bytes);
372 if (config_file !=
"")
373 load_client_ptr = make_shared<LoadClient>(config_file, thrift);
375 load_client_ptr = make_shared<LoadClient>(thrift);
377 load_client_ptr->create_mutator(tablename, mutator_flags,
378 shared_mutator_flush_interval);
380 unsigned delete_flag = (unsigned)-1;
381 if (
has(
"overwrite-delete-flag")) {
382 String delete_flag_str = get_str(
"overwrite-delete-flag");
383 if (delete_flag_str ==
"DELETE_ROW")
385 else if (delete_flag_str ==
"DELETE_CELL")
387 else if (delete_flag_str ==
"DELETE_COLUMN_FAMILY")
389 else if (delete_flag_str !=
"")
395 if (delete_pct != 0 && (::random() % 100) < delete_pct) {
398 key.
row = (*iter).row_key;
416 key.
flag = delete_flag;
419 key.
flag = delete_flag;
422 key.
flag = delete_flag;
426 start_clocks = clock();
427 load_client_ptr->set_delete(key);
432 cells.push_back(*iter);
434 start_clocks = clock();
435 load_client_ptr->set_cells(cells);
439 load_client_ptr->flush();
440 stop_clocks = clock();
441 if (stop_clocks < start_clocks)
442 latency = ((std::numeric_limits<clock_t>::max() - start_clocks) + stop_clocks) / clocks_per_usec;
444 latency = (stop_clocks-start_clocks) / clocks_per_usec;
446 sample_file << (
unsigned long)latency <<
"\n";
448 cum_latency += latency;
449 cum_sq_latency += pow(latency,2);
450 if (latency < min_latency)
451 min_latency = latency;
452 if (latency > max_latency)
453 max_latency = latency;
456 else if (flush_interval>0) {
459 unflushed_data += iter.last_data_size();
460 if (unflushed_data > flush_interval) {
461 load_client_ptr->flush();
471 if (largefile_mode ==
true) {
472 if (total_bytes >= consume_threshold) {
473 uint32_t consumed = 1 + (uint32_t)((total_bytes - consume_threshold) / 1048576LL);
474 progress_meter += consumed;
475 consume_threshold += (::uint64_t)consumed * 1048576LL;
479 progress_meter += iter.last_data_size();
483 load_client_ptr->flush();
496 printf(
" Elapsed time: %.2f s\n", stopwatch.
elapsed());
497 printf(
"Total cells inserted: %llu\n", (
Llu) total_cells);
498 printf(
"Throughput (cells/s): %.2f\n", (
double)total_cells/stopwatch.
elapsed());
499 printf(
"Total bytes inserted: %llu\n", (
Llu)total_bytes);
500 printf(
"Throughput (bytes/s): %.2f\n", (
double)total_bytes/stopwatch.
elapsed());
502 if (flush && !output_samples) {
503 printf(
" Latency min (usec): %llu\n", (
Llu)min_latency);
504 printf(
" Latency max (usec): %llu\n", (
Llu)max_latency);
505 printf(
" Latency avg (usec): %llu\n", (
Llu)((
double)cum_latency/total_cells));
506 printf(
"Latency stddev (usec): %llu\n", (
Llu)
std_dev(total_cells, cum_latency, cum_sq_latency));
517 ::int32_t parallel,
bool flush, ::uint32_t mutator_flags,
518 ::uint64_t flush_interval,
519 ::uint64_t shared_mutator_flush_interval,
520 ::int32_t delete_pct,
bool thrift)
522 double cum_latency=0, cum_sq_latency=0;
523 double min_latency=0, max_latency=0;
524 ::uint64_t total_cells=0;
525 ::uint64_t total_bytes=0;
527 ofstream sample_file;
529 std::vector<ParallelStateRec> load_vector(parallel);
531 ::uint64_t consume_threshold = 0;
532 ::uint64_t consume_total = 0;
533 boost::thread_group threads;
542 String config_file = get_str(
"config");
543 bool key_limit = props->has(
"DataGenerator.MaxKeys");
544 bool largefile_mode =
false;
545 uint32_t adjusted_bytes = 0;
548 client = make_shared<Hypertable::Client>(config_file);
549 ht_namespace = client->open_namespace(
"/");
550 table = ht_namespace->open_table(tablename);
552 for (::int32_t i=0; i<parallel; i++)
553 threads.create_thread(
LoadThread(table, mutator_flags,
554 shared_mutator_flush_interval,
558 largefile_mode =
true;
560 consume_threshold = 1048576LL;
565 boost::progress_display progress_meter(key_limit ?
570 if (delete_pct != 0 && (::random() % 100) < delete_pct)
571 lrec =
new LoadRec(*iter,
true);
574 lrec->
amount = iter.last_data_size();
577 std::lock_guard<std::mutex> lock(load_vector[next].
mutex);
578 load_vector[next].requests.push_back(lrec);
580 while (!load_vector[next].garbage.empty()) {
581 LoadRec *garbage = load_vector[next].garbage.front();
585 if (largefile_mode ==
true) {
586 consume_total += garbage->
amount;
587 if (consume_total >= consume_threshold) {
588 uint32_t consumed = 1 + (uint32_t)((consume_total
589 - consume_threshold) / 1048576LL);
590 progress_meter += consumed;
591 consume_threshold += (::uint64_t)consumed * 1048576LL;
595 progress_meter += garbage->
amount;
598 load_vector[next].garbage.pop_front();
600 load_vector[next].cond.notify_all();
602 next = (next+1) % parallel;
607 for (::int32_t i=0; i<parallel; i++) {
608 std::lock_guard<std::mutex> lock(load_vector[i].
mutex);
609 load_vector[i].finished =
true;
610 load_vector[i].cond.notify_all();
615 min_latency = load_vector[0].min_latency;
616 for (::int32_t i=0; i<parallel; i++) {
617 cum_latency += load_vector[i].cum_latency;
618 cum_sq_latency += load_vector[i].cum_sq_latency;
619 if (load_vector[i].min_latency < min_latency)
620 min_latency = load_vector[i].min_latency;
621 if (load_vector[i].max_latency > max_latency)
622 max_latency = load_vector[i].max_latency;
634 printf(
" Elapsed time: %.2f s\n", stopwatch.
elapsed());
635 printf(
"Total cells inserted: %llu\n", (
Llu) total_cells);
636 printf(
"Throughput (cells/s): %.2f\n", (
double)total_cells/stopwatch.
elapsed());
637 printf(
"Total bytes inserted: %llu\n", (
Llu)total_bytes);
638 printf(
"Throughput (bytes/s): %.2f\n", (
double)total_bytes/stopwatch.
elapsed());
641 printf(
" Latency min (usec): %llu\n", (
Llu)min_latency);
642 printf(
" Latency max (usec): %llu\n", (
Llu)max_latency);
643 printf(
" Latency avg (usec): %llu\n", (
Llu)((
double)cum_latency/total_cells));
644 printf(
"Latency stddev (usec): %llu\n", (
Llu)
std_dev(total_cells, cum_latency, cum_sq_latency));
659 bool to_stdout, ::int32_t delay,
String &sample_fname,
bool thrift)
661 double cum_latency=0, cum_sq_latency=0, latency=0;
662 double min_latency=10000000, max_latency=0;
663 ::int64_t total_cells=0;
664 ::int64_t total_bytes=0;
666 clock_t start_clocks, stop_clocks;
667 double clocks_per_usec = (double)CLOCKS_PER_SEC / 1000000.0;
668 bool output_samples =
false;
669 ofstream sample_file;
672 if (
has(
"query-mode")) {
673 String qm = get_str(
"query-mode");
676 else if (qm ==
"qualifier")
687 if (*(*iter).column_qualifier == 0)
688 cout << (*iter).row_key <<
"\t" << (*iter).column_family <<
"\n";
690 cout << (*iter).row_key <<
"\t" << (*iter).column_family <<
":"
691 << (*iter).column_qualifier <<
"\n";
693 else if (query_mode ==
INDEX) {
694 cout << (*iter).row_key <<
"\t" << (*iter).column_family;
695 if (*(*iter).column_qualifier != 0)
696 cout <<
":" << (*iter).column_qualifier;
697 cout <<
"\t" << (
const char *)(*iter).value <<
"\n";
700 cout <<
"not implemented!\n";
706 if (sample_fname !=
"") {
707 sample_file.open(sample_fname.c_str());
708 output_samples =
true;
717 String config_file = get_str(
"config");
718 boost::progress_display progress_meter(dg.
get_max_keys());
719 uint64_t last_bytes = 0;
721 if (config_file !=
"")
722 load_client_ptr = make_shared<LoadClient>(config_file, thrift);
724 load_client_ptr = make_shared<LoadClient>(thrift);
729 std::this_thread::sleep_for(std::chrono::milliseconds(delay));
732 if (query_mode ==
INDEX) {
734 (*iter).column_qualifier ? (*iter).column_qualifier :
"",
736 (
const char *)(*iter).value);
740 (*iter).column_qualifier ? (*iter).column_qualifier :
"",
745 scan_spec.
add_row((*iter).row_key);
748 start_clocks = clock();
750 load_client_ptr->create_scanner(tablename, scan_spec.
get());
751 last_bytes = load_client_ptr->get_all_cells();
752 total_bytes += last_bytes;
753 load_client_ptr->close_scanner();
755 stop_clocks = clock();
756 if (stop_clocks < start_clocks)
757 latency = ((std::numeric_limits<clock_t>::max() - start_clocks)
758 + stop_clocks) / clocks_per_usec;
760 latency = (stop_clocks-start_clocks) / clocks_per_usec;
762 sample_file << (
unsigned long)latency <<
"\n";
764 cum_latency += latency;
765 cum_sq_latency += pow(latency,2);
766 if (latency < min_latency)
767 min_latency = latency;
768 if (latency > max_latency)
769 max_latency = latency;
786 printf(
" Elapsed time: %.2f s\n", stopwatch.
elapsed());
787 printf(
"Total cells returned: %llu\n", (
Llu) total_cells);
788 printf(
"Throughput (cells/s): %.2f\n", (
double)total_cells/stopwatch.
elapsed());
789 printf(
"Total bytes returned: %llu\n", (
Llu)total_bytes);
790 printf(
"Throughput (bytes/s): %.2f\n", (
double)total_bytes/stopwatch.
elapsed());
792 if (!output_samples) {
793 printf(
" Latency min (usec): %llu\n", (
Llu)min_latency);
794 printf(
" Latency max (usec): %llu\n", (
Llu)max_latency);
795 printf(
" Latency avg (usec): %llu\n", (
Llu)((
double)cum_latency/total_cells));
796 printf(
"Latency stddev (usec): %llu\n", (
Llu)
std_dev(total_cells, cum_latency, cum_sq_latency));
808 double cum_latency = 0, cum_sq_latency = 0, elapsed_time = 0;
809 double min_latency = 10000000, max_latency = 0;
810 ::int64_t total_cells = 0;
811 ::int64_t total_bytes = 0;
813 int64_t max_keys = props->has(
"DataGenerator.MaxKeys")
814 ? props->get_i64(
"DataGenerator.MaxKeys")
815 : props->get_i64(
"max-keys");
816 boost::progress_display progress(max_keys * parallel);
818 String config_file = get_str(
"config");
819 ClientPtr client = make_shared<Hypertable::Client>(config_file);
820 NamespacePtr ht_namespace = client->open_namespace(
"/");
821 TablePtr table = ht_namespace->open_table(tablename);
823 boost::thread_group threads;
824 std::vector<ParallelStateRec> load_vector(parallel);
825 for (::int32_t i = 0; i < parallel; i++)
826 threads.create_thread(
QueryThread(props, table, &progress, load_vector[i]));
832 min_latency = load_vector[0].min_latency;
833 for (::int32_t i = 0; i < parallel; i++) {
834 cum_latency += load_vector[i].cum_latency;
835 cum_sq_latency += load_vector[i].cum_sq_latency;
836 total_cells += load_vector[i].total_cells;
837 total_bytes += load_vector[i].total_bytes;
838 elapsed_time = load_vector[i].elapsed_time;
839 if (load_vector[i].min_latency < min_latency)
840 min_latency = load_vector[i].min_latency;
841 if (load_vector[i].max_latency > max_latency)
842 max_latency = load_vector[i].max_latency;
847 printf(
" Elapsed time: %.2f s\n", elapsed_time);
848 printf(
"Total cells returned: %llu\n", (
Llu) total_cells);
849 printf(
"Throughput (cells/s): %.2f\n", (
double)total_cells / elapsed_time);
850 printf(
"Total bytes returned: %llu\n", (
Llu)total_bytes);
851 printf(
"Throughput (bytes/s): %.2f\n", (
double)total_bytes / elapsed_time);
853 printf(
" Latency min (usec): %llu\n", (
Llu)min_latency);
854 printf(
" Latency max (usec): %llu\n", (
Llu)max_latency);
855 printf(
" Latency avg (usec): %llu\n", (
Llu)((
double)cum_latency
857 printf(
"Latency stddev (usec): %llu\n", (
Llu)
std_dev(total_cells,
858 cum_latency, cum_sq_latency));
871 double std_dev(::uint64_t nn,
double sum,
double sq_sum)
873 double mean = sum/nn;
874 double sq_std = sqrt((sq_sum/(
double)nn) - pow(mean,2));
Interface and base of config policy.
double elapsed()
Returns the elapsed time.
std::vector< Cell, CellAlloc > Cells
ScanSpec & get()
Returns the built ScanSpec object.
int main(int argc, char **argv)
void clear()
Clears the state.
static const uint32_t FLAG_DELETE_ROW
std::string String
A String is simply a typedef to std::string.
void generate_query_load_parallel(PropertiesPtr &props, String &tablename, int32_t parallel)
The Stopwatch measures elapsed time.
Helper class for printing usage banners on the command line.
long long unsigned int Llu
Shortcut for printf formats.
Po::typed_value< String > * str(String *v=0)
const char * column_qualifier
static bool exists(const String &fname)
Checks if a file or directory exists.
void add_row(const string &str)
Adds a row to be returned in the scan.
static const uint32_t FLAG_DELETE_CELL
size_t column_qualifier_len
static const uint32_t FLAG_DELETE_COLUMN_FAMILY
Desc & cmdline_desc(const char *usage)
A macro which definds global functions like get_bool(), get_str(), get_i16() etc. ...
bool has(const String &name)
Check existence of a configuration value.
std::shared_ptr< Namespace > NamespacePtr
Shared smart pointer to Namespace.
std::shared_ptr< Client > ClientPtr
void generate_query_load(PropertiesPtr &props, String &tablename, bool to_stdout,::int32_t delay, String &sample_fname, bool thrift)
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
Compatibility Macros for C/C++.
void parse_command_line(int argc, char **argv, PropertiesPtr &props)
Po::typed_value< bool > * boo(bool *v=0)
Initialization helper for applications.
Helper class for building a ScanSpec.
void generate_update_load_parallel(PropertiesPtr &props, String &tablename,::int32_t parallel, bool flush,::uint32_t mutator_flags,::uint64_t flush_interval,::uint64_t shared_mutator_flush_interval,::int32_t delete_pct, bool thrift)
bool allow_unregistered_options(bool choice)
Toggle allow unregistered options.
double std_dev(::uint64_t nn, double sum, double sq_sum)
Meta::list< AppPolicy, DataGeneratorPolicy, DefaultCommPolicy > Policies
unsigned long last_data_size()
void add_column(const string &str)
Adds a column family to be returned by the scan.
Provides an STL-style iterator on DataGenerator objects.
void generate_update_load(PropertiesPtr &props, String &tablename, bool flush,::uint32_t mutator_flags,::uint64_t flush_interval,::uint64_t shared_mutator_flush_interval, bool to_stdout, String &sample_fname,::int32_t delete_pct, bool thrift)
std::shared_ptr< LoadClient > LoadClientPtr
The Stopwatch class measures elapsed time between instantiation (or a call to start) and a call to st...
This is a generic exception class for Hypertable.
A String class based on std::string.
void add_column_predicate(const string &column_family, const char *column_qualifier, uint32_t operation, const char *value, uint32_t value_len=0)
Adds a column predicate to the scan.
void alias(const String &cmdline_opt, const String &file_opt, bool overwrite)
Setup command line option alias for config file option.
Desc & cmdline_hidden_desc()
Get the command line hidden options description (for positional options)
Encapsulates decomposed key and value.
PositionalDesc & cmdline_positional_desc()
Get the command line positional options description.
const char * column_family
#define HT_THROW(_code_, _msg_)
std::shared_ptr< Table > TablePtr
void stop()
Stops the Stopwatch.