29 uint32_t *cell_count, int64_t buffer_size) {
34 size_t limit = buffer_size;
35 size_t remaining = buffer_size;
37 ScanContext *scan_context = scanner->scan_context();
44 assert(dbuf.
base == 0);
46 while ((more = scanner->get(key, value))) {
54 counter_value.
clear();
62 const uint8_t *decode;
67 HT_FATAL_OUT <<
"Expected counter to be encoded 64 bit int but remain=" << remain
68 <<
" ,key=" << key <<
" ,value="<< value.
str() <<
HT_END;
73 sprintf(numbuf,
"%lld", (
Lld) count);
74 value_len = strlen(numbuf);
75 counter_value.
clear();
77 value_len = counter_value.
fill();
80 value_len = value.
length();
84 value.
ptr = (
const uint8_t *)empty_value.c_str();
89 if (key.
length + value_len > limit) {
90 limit = key.
length + value_len;
97 if (key.
length + value_len <= remaining) {
106 remaining -= (key.
length + value_len);
113 if (dbuf.
base == 0) {
std::string String
A String is simply a typedef to std::string.
static const uint32_t FLAG_INSERT
Scan context information.
uint8_t * ptr
Pointer to the end of the used part of the buffer.
A dynamic, resizable and reference counted memory buffer.
void append_as_byte_string(DynamicBuffer &dst_buf, const void *value, uint32_t value_len)
Serializes and appends a byte array to a DynamicBuffer object.
A class managing one or more serializable ByteStrings.
const char * str() const
Returns a pointer to the String's deserialized data.
uint64_t decode_i64(const uint8_t **bufp, size_t *remainp)
Decode a 64-bit integer in little-endian order.
std::shared_ptr< MergeScannerRange > MergeScannerRangePtr
Smart pointer to MergeScannerRange.
vector< CellPredicate > cell_predicates
void encode_i32(uint8_t **bufp, uint32_t val)
Encode a 32-bit integer in little-endian order.
Compatibility Macros for C/C++.
size_t length() const
Retrieves the length of the serialized string.
const uint8_t * ptr
The pointer to the serialized data.
long long int Lld
Shortcut for printf formats.
void clear()
Clears the buffer.
size_t decode_length(const uint8_t **dptr) const
Retrieves the decoded length and returns a pointer to the string.
Provides access to internal components of opaque key.
uint8_t * base
Pointer to the allocated memory buffer.
size_t fill() const
Returns the size of the used portion.
bool FillScanBlock(MergeScannerRangePtr &scanner, DynamicBuffer &dbuf, uint32_t *cell_count, int64_t buffer_size)
Fills a block of scan results to be sent back to client.
uint8_t column_family_code
uint8_t * add_unchecked(const void *data, size_t len)
Adds additional data without boundary checks.
Declaration for FillScanBlock.
void reserve(size_t len, bool nocopy=false)
Reserve space for additional data Will grow the space to exactly what's needed.