Encapsulates a block of scan results. More...
#include <ScanBlock.h>

Public Types | |
| typedef std::vector< std::pair < SerializedKey, ByteString > > | Vector |
Public Member Functions | |
| ScanBlock () | |
| int | load (EventPtr &event) |
| Loads scanblock data returned from RangeServer. More... | |
| size_t | size () |
| Returns the number of key/value pairs in the scanblock. More... | |
| void | reset () |
| Resets iterator to first key/value pair in the scanblock. More... | |
| bool | next (SerializedKey &key, ByteString &value) |
| Returns the next key/value pair in the scanblock. More... | |
| bool | eos () |
| Returns true if this is the final scanblock returned by the scanner. More... | |
| bool | more () |
| Indicates whether or not there are more key/value pairs in block. More... | |
| size_t | memory_used () const |
| Approximate estimate of memory used by scanblock (returns the size of the event payload) which contains most of the data. More... | |
| int | get_scanner_id () |
| Returns scanner ID associated with this scanblock. More... | |
| int | get_skipped_rows () |
| Returns number of skipped rows because of an OFFSET predicate. More... | |
| int | get_skipped_cells () |
| Returns number of skipped rows because of a CELL_OFFSET predicate. More... | |
| const ProfileDataScanner & | profile_data () |
| Returns reference to profile data. More... | |
Private Attributes | |
| int | m_error {} |
| Vector | m_vec |
| Vector::iterator | m_iter |
| EventPtr | m_event |
| Lib::RangeServer::Response::Parameters::CreateScanner | m_response |
Encapsulates a block of scan results.
The CREATE_SCANNER and FETCH_SCANBLOCK RangeServer methods return a block of scan results and this class parses and provides easy access to the key/value pairs in that result.
Definition at line 50 of file ScanBlock.h.
| typedef std::vector< std::pair<SerializedKey, ByteString> > Hypertable::ScanBlock::Vector |
Definition at line 53 of file ScanBlock.h.
| ScanBlock::ScanBlock | ( | ) |
Definition at line 41 of file ScanBlock.cc.
|
inline |
Returns true if this is the final scanblock returned by the scanner.
Definition at line 85 of file ScanBlock.h.
|
inline |
Returns scanner ID associated with this scanblock.
Definition at line 109 of file ScanBlock.h.
|
inline |
Returns number of skipped rows because of a CELL_OFFSET predicate.
Definition at line 115 of file ScanBlock.h.
|
inline |
Returns number of skipped rows because of an OFFSET predicate.
Definition at line 112 of file ScanBlock.h.
| int ScanBlock::load | ( | EventPtr & | event | ) |
Loads scanblock data returned from RangeServer.
Both the CREATE_SCANNER and FETCH_SCANBLOCK methods return a block of key/value pairs.
| event | smart pointer to response MESSAGE event |
Definition at line 46 of file ScanBlock.cc.
|
inline |
Approximate estimate of memory used by scanblock (returns the size of the event payload) which contains most of the data.
Definition at line 100 of file ScanBlock.h.
|
inline |
Indicates whether or not there are more key/value pairs in block.
Definition at line 90 of file ScanBlock.h.
| bool ScanBlock::next | ( | SerializedKey & | key, |
| ByteString & | value | ||
| ) |
Returns the next key/value pair in the scanblock.
NOTE: invoking the load method invalidates all pointers previously returned from this method.
| key | reference to return key pointer |
| value | reference to return value pointer |
Definition at line 84 of file ScanBlock.cc.
|
inline |
Returns reference to profile data.
Definition at line 119 of file ScanBlock.h.
|
inline |
Resets iterator to first key/value pair in the scanblock.
Definition at line 71 of file ScanBlock.h.
|
inline |
Returns the number of key/value pairs in the scanblock.
Definition at line 68 of file ScanBlock.h.
|
private |
Definition at line 122 of file ScanBlock.h.
|
private |
Definition at line 125 of file ScanBlock.h.
|
private |
Definition at line 124 of file ScanBlock.h.
|
private |
Definition at line 126 of file ScanBlock.h.
|
private |
Definition at line 123 of file ScanBlock.h.
1.8.8