22 #ifndef Hypertable_Lib_TableScannerAsync_h
23 #define Hypertable_Lib_TableScannerAsync_h
38 #include <condition_variable>
68 const ScanSpec &scan_spec, uint32_t timeout_ms,
84 std::unique_lock<std::mutex> lock(
m_mutex);
104 void handle_error(
int scanner_id,
int error,
const std::string &error_msg,
bool is_create);
113 void handle_timeout(
int scanner_id,
const std::string &error_msg,
bool is_create);
136 std::unique_lock<std::mutex> lock(
m_mutex);
153 std::vector<CellPredicate> &cell_predicates,
154 bool *use_qualifier,
bool *row_intervals_applied);
184 #endif // Hypertable_Lib_TableScannerAsync_h
std::string get_table_name() const
Returns the name of the table as it was when the scanner was created.
std::shared_ptr< TableScannerAsync > TableScannerAsyncPtr
Smart pointer to TableScannerAsync.
void handle_error(int scanner_id, int error, const std::string &error_msg, bool is_create)
Deal with errors.
std::shared_ptr< RangeLocator > RangeLocatorPtr
Smart pointer to RangeLocator.
void init(Comm *comm, ApplicationQueueInterfacePtr &app_queue, Table *table, RangeLocatorPtr &range_locator, const ScanSpec &scan_spec, uint32_t timeout_ms, ResultCallback *cb)
Asynchronous table scanner.
void move_to_next_interval_scanner(int current_scanner)
void handle_timeout(int scanner_id, const std::string &error_msg, bool is_create)
Deal with timeouts.
std::condition_variable m_cond
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
Scan predicate and control specification.
Represents an open table.
int64_t bytes_scanned()
Returns number of bytes scanned.
void wait_for_completion()
std::shared_ptr< ScanCells > ScanCellsPtr
Smart pointer to ScanCells.
Declarations for ProfileDataScanner.
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 maybe_callback_error(int scanner_id, bool next)
Declarations for ClientObject.
std::shared_ptr< ApplicationQueueInterface > ApplicationQueueInterfacePtr
Smart pointer to ApplicationQueueInterface.
Helper class for building a ScanSpec.
Declarations for CellPredicate.
std::set< const char *, LtCstr > CstrRowSet
Base class for Hypertable client objects.
Entry point to AsyncComm service.
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.
void cancel()
Cancels the scanner.
void handle_result(int scanner_id, EventPtr &event, bool is_create)
Deal with results of a scanner.
std::mutex m_cancel_mutex
Table * get_table()
Returns a pointer to the table.
void maybe_callback_ok(int scanner_id, bool next, bool do_callback, ScanCellsPtr &cells)
Declarations for ScanBlock.
ResultCallback for secondary indices; used by TableScannerAsync.
virtual ~TableScannerAsync()
std::vector< IntervalScannerAsyncPtr > m_interval_scanners
ProfileDataScanner m_profile_data
Represents an open table.
void get_profile_data(ProfileDataScanner &profile_data)
Gets profile data.
void transform_primary_scan_spec(ScanSpecBuilder &primary_spec)
Declarations for DispatchHandlerSynchronizer.
void add_index_row(ScanSpecBuilder &ssb, const char *row)