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

Function SampleNElements

be/src/scheduling/scheduler-test-util.cc:76–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74/// 'out'.
75template <typename T>
76void SampleNElements(int n, const vector<T>& in, vector<T>* out) {
77 vector<int> idxs;
78 SampleN(n, in.size(), &idxs);
79 DCHECK_EQ(n, idxs.size());
80 out->reserve(n);
81 for (int idx : idxs) out->push_back(in[idx]);
82}
83
84/// Define constants from scheduler-test-util.h here.
85const int Cluster::BACKEND_PORT = 1000;

Callers 1

AddMultiBlockTableMethod · 0.85

Calls 4

SampleNFunction · 0.85
reserveMethod · 0.80
push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected