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

Function ParseSchemaVersionFlag

be/src/workload_mgmt/workload-management.cc:208–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206} // function _isVersionKnown
207
208Status ParseSchemaVersionFlag(kudu::Version* target_schema_version) {
209 // Target schema version defaults to the latest version.
210 *target_schema_version = *KNOWN_VERSIONS.rbegin();
211
212 // Ensure a valid schema version was specified on the command line flag and, if
213 // specified, parses the flag value into the function parameter `target_schema_version`.
214 if (!FLAGS_workload_mgmt_schema_version.empty()
215 && !ParseVersion(
216 FLAGS_workload_mgmt_schema_version, target_schema_version).ok()) {
217 return Status(StrCat("Invalid workload management schema version '",
218 FLAGS_workload_mgmt_schema_version, "'"));
219 }
220
221 return Status::OK();
222}
223
224Status StartupChecks(const kudu::Version& target_schema_version) {
225 RETURN_IF_ERROR(_isVersionKnown(target_schema_version));

Callers 3

StartMethod · 0.85
TESTFunction · 0.85

Calls 7

ParseVersionFunction · 0.85
OKFunction · 0.85
rbeginMethod · 0.80
StatusClass · 0.50
StrCatFunction · 0.50
emptyMethod · 0.45
okMethod · 0.45

Tested by 1

TESTFunction · 0.68