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

Method Init

be/src/runtime/buffered-tuple-stream-test.cc:140–157  ·  view source on GitHub ↗

Set up all of the test state: the buffer pool, a query state, a client with no reservation and any other descriptors, etc. The buffer pool's capacity is limited to 'buffer_pool_limit'.

Source from the content-addressed store, hash-verified

138 /// reservation and any other descriptors, etc.
139 /// The buffer pool's capacity is limited to 'buffer_pool_limit'.
140 void Init(int64_t buffer_pool_limit) {
141 test_env_.reset(new TestEnv());
142 test_env_->SetBufferPoolArgs(MIN_PAGE_LEN, buffer_pool_limit);
143 ASSERT_OK(test_env_->Init());
144
145 CreateDescriptors();
146 mem_pool_.reset(new MemPool(&tracker_));
147
148 ASSERT_OK(test_env_->CreateQueryState(0, nullptr, &runtime_state_));
149 query_state_ = runtime_state_->query_state();
150
151 RuntimeProfile* client_profile = RuntimeProfile::Create(&pool_, "client");
152 MemTracker* client_tracker =
153 pool_.Add(new MemTracker(-1, "client", runtime_state_->instance_mem_tracker()));
154 ASSERT_OK(test_env_->exec_env()->buffer_pool()->RegisterClient("",
155 query_state_->file_group(), runtime_state_->instance_buffer_reservation(),
156 client_tracker, numeric_limits<int>::max(), client_profile, &client_));
157 }
158
159 /// Generate the ith element of a sequence of int values.
160 int GenIntValue(int i) {

Callers 11

TestValuesMethod · 0.45
TestUnpinPinMethod · 0.45
TestTransferMemoryMethod · 0.45
TestAttachMemoryMethod · 0.45
TEST_FFunction · 0.45
TestShortDebugStringMethod · 0.45

Calls 13

CreateClass · 0.85
maxFunction · 0.85
SetBufferPoolArgsMethod · 0.80
instance_mem_trackerMethod · 0.80
exec_envMethod · 0.80
file_groupMethod · 0.80
resetMethod · 0.65
CreateQueryStateMethod · 0.45
query_stateMethod · 0.45
AddMethod · 0.45
RegisterClientMethod · 0.45

Tested by

no test coverage detected