MCPcopy Create free account
hub / github.com/bytedance/bolt / SetUp

Method SetUp

bolt/exec/tests/utils/OperatorTestBase.cpp:149–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 this->registerVectorSerde();
148 }
149 if (!isRegisteredNamedVectorSerde(VectorSerde::Kind::kPresto)) {
150 serializer::presto::PrestoVectorSerde::registerNamedVectorSerde();
151 }
152 if (!isRegisteredNamedVectorSerde(VectorSerde::Kind::kCompactRow)) {
153 serializer::CompactRowVectorSerde::registerNamedVectorSerde();
154 }
155 if (!isRegisteredNamedVectorSerde(VectorSerde::Kind::kUnsafeRow)) {
156 serializer::spark::UnsafeRowVectorSerde::registerNamedVectorSerde();
157 }
158
159 driverExecutor_ = std::make_unique<folly::CPUThreadPoolExecutor>(3);
160 ioExecutor_ = std::make_unique<folly::IOThreadPoolExecutor>(3);
161}
162
163void OperatorTestBase::TearDown() {
164 waitForAllTasksToBeDeleted();
165 // There might be lingering exchange source on executor even after all tasks
166 // are deleted. This can cause memory leak because exchange source holds
167 // reference to memory pool. We need to make sure they are properly cleaned.
168 testingShutdownLocalExchangeSource();
169 pool_.reset();

Callers

nothing calls this directly

Calls 4

registerVectorSerdeMethod · 0.95
isRegisteredVectorSerdeFunction · 0.85
registerNamedVectorSerdeFunction · 0.85

Tested by

no test coverage detected