MCPcopy Create free account
hub / github.com/apache/impala / AttachBufferToBatch

Method AttachBufferToBatch

be/src/runtime/buffered-tuple-stream.cc:200–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void BufferedTupleStream::Page::AttachBufferToBatch(
201 BufferedTupleStream* parent, RowBatch* batch, FlushMode flush) {
202 DCHECK(is_pinned());
203 DCHECK(retrieved_buffer.Load());
204 parent->bytes_pinned_ -= len();
205 // ExtractBuffer() cannot fail because the buffer is already in memory.
206 BufferPool::BufferHandle buffer;
207 Status status =
208 parent->buffer_pool_->ExtractBuffer(parent->buffer_pool_client_, &handle, &buffer);
209 DCHECK(status.ok());
210 batch->AddBuffer(parent->buffer_pool_client_, move(buffer), flush);
211 attached_to_output_batch = true;
212}
213
214string BufferedTupleStream::Page::DebugString() const {
215 return Substitute("$0 num_rows=$1 retrieved_buffer=$2 attached_to_output_batch=$3",

Callers 2

CloseMethod · 0.80

Calls 5

moveFunction · 0.85
AddBufferMethod · 0.80
LoadMethod · 0.45
ExtractBufferMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected