Asynchronous table scanner.
More...
#include <TableScannerAsync.h>
|
| | TableScannerAsync (Comm *comm, ApplicationQueueInterfacePtr &app_queue, Table *table, RangeLocatorPtr &range_locator, const ScanSpec &scan_spec, uint32_t timeout_ms, ResultCallback *cb, int flags=0) |
| | Constructs a TableScannerAsync object. More...
|
| |
| virtual | ~TableScannerAsync () |
| |
| void | cancel () |
| | Cancels the scanner. More...
|
| |
| bool | is_cancelled () |
| |
| bool | is_complete () |
| |
| void | handle_result (int scanner_id, EventPtr &event, bool is_create) |
| | Deal with results of a scanner. More...
|
| |
| void | handle_error (int scanner_id, int error, const std::string &error_msg, bool is_create) |
| | Deal with errors. More...
|
| |
| void | handle_timeout (int scanner_id, const std::string &error_msg, bool is_create) |
| | Deal with timeouts. More...
|
| |
| int64_t | bytes_scanned () |
| | Returns number of bytes scanned. More...
|
| |
| std::string | get_table_name () const |
| | Returns the name of the table as it was when the scanner was created. More...
|
| |
| Table * | get_table () |
| | Returns a pointer to the table. More...
|
| |
| void | get_profile_data (ProfileDataScanner &profile_data) |
| | Gets profile data. More...
|
| |
| virtual | ~ClientObject () |
| | Destructor. More...
|
| |
|
| void | init (Comm *comm, ApplicationQueueInterfacePtr &app_queue, Table *table, RangeLocatorPtr &range_locator, const ScanSpec &scan_spec, uint32_t timeout_ms, ResultCallback *cb) |
| |
| void | maybe_callback_ok (int scanner_id, bool next, bool do_callback, ScanCellsPtr &cells) |
| |
| void | maybe_callback_error (int scanner_id, bool next) |
| |
| void | wait_for_completion () |
| |
| void | move_to_next_interval_scanner (int current_scanner) |
| |
| bool | use_index (Table *table, const ScanSpec &primary_spec, ScanSpecBuilder &index_spec, std::vector< CellPredicate > &cell_predicates, bool *use_qualifier, bool *row_intervals_applied) |
| |
| void | transform_primary_scan_spec (ScanSpecBuilder &primary_spec) |
| |
| void | add_index_row (ScanSpecBuilder &ssb, const char *row) |
| |
Asynchronous table scanner.
Definition at line 50 of file TableScannerAsync.h.
Constructs a TableScannerAsync object.
- Parameters
-
| comm | pointer to the Comm layer |
| app_queue | pointer to ApplicationQueueInterface |
| table | pointer to the table object |
| range_locator | smart pointer to range locator |
| scan_spec | reference to scan specification object |
| timeout_ms | maximum time in milliseconds to allow scanner methods to execute before throwing an exception |
| cb | callback to be notified when results arrive |
| flags | Scanner flags |
Definition at line 42 of file TableScannerAsync.cc.
| TableScannerAsync::~TableScannerAsync |
( |
| ) |
|
|
virtual |
| void TableScannerAsync::add_index_row |
( |
ScanSpecBuilder & |
ssb, |
|
|
const char * |
row |
|
) |
| |
|
private |
| int64_t Hypertable::TableScannerAsync::bytes_scanned |
( |
| ) |
|
|
inline |
| void TableScannerAsync::cancel |
( |
| ) |
|
Gets profile data.
- Parameters
-
| profile_data | Reference to profile data object populated by this method |
Definition at line 135 of file TableScannerAsync.h.
| Table* Hypertable::TableScannerAsync::get_table |
( |
| ) |
|
|
inline |
| String TableScannerAsync::get_table_name |
( |
| ) |
const |
Returns the name of the table as it was when the scanner was created.
Definition at line 733 of file TableScannerAsync.cc.
| void TableScannerAsync::handle_error |
( |
int |
scanner_id, |
|
|
int |
error, |
|
|
const std::string & |
error_msg, |
|
|
bool |
is_create |
|
) |
| |
Deal with errors.
- Parameters
-
| scanner_id | id of the scanner which triggered the error |
| error | error code |
| error_msg | error message |
| is_create | true if this is event is for a create_scanner request |
Definition at line 532 of file TableScannerAsync.cc.
| void TableScannerAsync::handle_result |
( |
int |
scanner_id, |
|
|
EventPtr & |
event, |
|
|
bool |
is_create |
|
) |
| |
Deal with results of a scanner.
- Parameters
-
| scanner_id | id of the scanner which triggered the error |
| event | event with results |
| is_create | true if this is event is for a create_scanner request |
Definition at line 625 of file TableScannerAsync.cc.
| void TableScannerAsync::handle_timeout |
( |
int |
scanner_id, |
|
|
const std::string & |
error_msg, |
|
|
bool |
is_create |
|
) |
| |
Deal with timeouts.
- Parameters
-
| scanner_id | id of the scanner which triggered the error |
| error_msg | error message |
| is_create | true if this is event is for a create_scanner request |
Definition at line 604 of file TableScannerAsync.cc.
| bool TableScannerAsync::is_cancelled |
( |
| ) |
|
| bool Hypertable::TableScannerAsync::is_complete |
( |
| ) |
|
|
inline |
| void TableScannerAsync::maybe_callback_error |
( |
int |
scanner_id, |
|
|
bool |
next |
|
) |
| |
|
private |
| void TableScannerAsync::maybe_callback_ok |
( |
int |
scanner_id, |
|
|
bool |
next, |
|
|
bool |
do_callback, |
|
|
ScanCellsPtr & |
cells |
|
) |
| |
|
private |
| void TableScannerAsync::move_to_next_interval_scanner |
( |
int |
current_scanner | ) |
|
|
private |
| void TableScannerAsync::transform_primary_scan_spec |
( |
ScanSpecBuilder & |
primary_spec | ) |
|
|
private |
| bool TableScannerAsync::use_index |
( |
Table * |
table, |
|
|
const ScanSpec & |
primary_spec, |
|
|
ScanSpecBuilder & |
index_spec, |
|
|
std::vector< CellPredicate > & |
cell_predicates, |
|
|
bool * |
use_qualifier, |
|
|
bool * |
row_intervals_applied |
|
) |
| |
|
private |
| void TableScannerAsync::wait_for_completion |
( |
| ) |
|
|
private |
| int64_t Hypertable::TableScannerAsync::m_bytes_scanned |
|
private |
| std::mutex Hypertable::TableScannerAsync::m_cancel_mutex |
|
private |
| bool Hypertable::TableScannerAsync::m_cancelled |
|
private |
| std::condition_variable Hypertable::TableScannerAsync::m_cond |
|
private |
| int Hypertable::TableScannerAsync::m_current_scanner |
|
private |
| int Hypertable::TableScannerAsync::m_error |
|
private |
| std::string Hypertable::TableScannerAsync::m_error_msg |
|
private |
| std::mutex Hypertable::TableScannerAsync::m_mutex |
|
private |
| int Hypertable::TableScannerAsync::m_outstanding |
|
private |
| CstrRowSet Hypertable::TableScannerAsync::m_rowset |
|
private |
| Table* Hypertable::TableScannerAsync::m_table |
|
private |
| uint32_t Hypertable::TableScannerAsync::m_timeout_ms |
|
private |
| bool Hypertable::TableScannerAsync::m_use_index |
|
private |
The documentation for this class was generated from the following files: