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

Function SetExecutorGroups

be/src/service/impala-server.cc:472–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470using namespace impala;
471
472void SetExecutorGroups(const string& flag, BackendDescriptorPB* be_desc) {
473 vector<StringPiece> groups;
474 groups = Split(flag, ",", SkipEmpty());
475 if (groups.empty()) groups.push_back(ImpalaServer::DEFAULT_EXECUTOR_GROUP_NAME);
476 DCHECK_EQ(1, groups.size());
477 // Name and optional minimum group size are separated by ':'.
478 for (const StringPiece& group : groups) {
479 int colon_idx = group.find_first_of(':');
480 ExecutorGroupDescPB* group_desc = be_desc->add_executor_groups();
481 group_desc->set_name(group.substr(0, colon_idx).as_string());
482 if (colon_idx != StringPiece::npos) {
483 StringParser::ParseResult result;
484 group_desc->set_min_size(StringParser::StringToInt<int64_t>(
485 group.data() + colon_idx + 1, group.length() - colon_idx - 1, &result));
486 if (result != StringParser::PARSE_SUCCESS) {
487 LOG(FATAL) << "Failed to parse minimum executor group size from group: "
488 << group.ToString();
489 }
490 } else {
491 group_desc->set_min_size(1);
492 }
493 }
494}
495} // end anonymous namespace
496
497namespace impala {

Calls 12

SplitFunction · 0.85
SkipEmptyClass · 0.85
push_backMethod · 0.80
set_nameMethod · 0.80
as_stringMethod · 0.80
substrMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
find_first_ofMethod · 0.45
dataMethod · 0.45
lengthMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected