MCPcopy Create free account
hub / github.com/BlazingDB/blazingsql / pullCacheData

Method pullCacheData

engine/src/cache_machine/CacheMachine.cpp:528–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526
527
528std::unique_ptr<ral::cache::CacheData> CacheMachine::pullCacheData(std::string message_id) {
529 CodeTimer cacheEventTimer;
530 cacheEventTimer.start();
531
532 std::unique_ptr<message> message_data = waitingCache->get_or_wait(message_id);
533 if (message_data == nullptr) {
534 return nullptr;
535 }
536 size_t num_rows = message_data->get_data().num_rows();
537 size_t num_bytes = message_data->get_data().sizeInBytes();
538 int dataType = static_cast<int>(message_data->get_data().get_type());
539 std::unique_ptr<ral::cache::CacheData> output = message_data->release_data();
540
541 cacheEventTimer.stop();
542 if(cache_events_logger) {
543 cache_events_logger->info("{ral_id}|{query_id}|{message_id}|{cache_id}|{num_rows}|{num_bytes}|{event_type}|{timestamp_begin}|{timestamp_end}|{description}",
544 "ral_id"_a=(ctx ? ctx->getNodeIndex(ral::communication::CommunicationData::getInstance().getSelfNode()) : -1),
545 "query_id"_a=(ctx ? ctx->getContextToken() : -1),
546 "message_id"_a=message_id,
547 "cache_id"_a=cache_id,
548 "num_rows"_a=num_rows,
549 "num_bytes"_a=num_bytes,
550 "event_type"_a="PullCacheData",
551 "timestamp_begin"_a=cacheEventTimer.start_time(),
552 "timestamp_end"_a=cacheEventTimer.end_time(),
553 "description"_a="Pull from CacheMachine CacheData object type {}"_format(dataType));
554 }
555 return output;
556}
557
558std::unique_ptr<ral::frame::BlazingTable> CacheMachine::pullUnorderedFromCache() {
559 if (is_array_access) {

Callers 15

runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
nextMethod · 0.80
runMethod · 0.80
load_left_setMethod · 0.80
load_right_setMethod · 0.80
runMethod · 0.80

Calls 15

release_dataMethod · 0.80
getNodeIndexMethod · 0.80
getContextTokenMethod · 0.80
start_timeMethod · 0.80
end_timeMethod · 0.80
pop_or_waitMethod · 0.80
wait_until_num_bytesMethod · 0.80
sizeMethod · 0.80
startMethod · 0.45
get_or_waitMethod · 0.45
num_rowsMethod · 0.45

Tested by 2

TEST_FFunction · 0.64
ReceiverCallFunction · 0.64