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

Function ParseTriState

be/src/kudu/util/flags.cc:614–628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612}
613
614Status ParseTriState(const char* flag_name, const std::string& flag_value,
615 TriStateFlag* tri_state) {
616 if (iequals(flag_value, "required")) {
617 *tri_state = TriStateFlag::REQUIRED;
618 } else if (iequals(flag_value, "optional")) {
619 *tri_state = TriStateFlag::OPTIONAL;
620 } else if (iequals(flag_value, "disabled")) {
621 *tri_state = TriStateFlag::DISABLED;
622 } else {
623 return Status::InvalidArgument(strings::Substitute(
624 "$0 flag must be one of 'required', 'optional', or 'disabled'",
625 flag_name));
626 }
627 return Status::OK();
628}
629
630// Get the value of an environment variable that has boolean semantics.
631bool GetBooleanEnvironmentVariable(const char* env_var_name) {

Callers 1

BuildMethod · 0.85

Calls 4

iequalsFunction · 0.85
InvalidArgumentFunction · 0.85
SubstituteFunction · 0.85
OKFunction · 0.85

Tested by

no test coverage detected