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

Method InitializeConfigVariables

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

Source from the content-addressed store, hash-verified

2148}
2149
2150void ImpalaServer::InitializeConfigVariables() {
2151 // Set idle_session_timeout here to let the SET command return the value of
2152 // the command line option FLAGS_idle_session_timeout
2153 default_query_options_.__set_idle_session_timeout(FLAGS_idle_session_timeout);
2154 if (FLAGS_use_calcite_planner) {
2155 default_query_options_.__set_planner(TPlannerType::CALCITE);
2156 }
2157 // The next query options used to be set with flags. Setting them in
2158 // default_query_options_ here in order to make default_query_options
2159 // take precedence over the legacy flags.
2160 default_query_options_.__set_use_local_tz_for_unix_timestamp_conversions(
2161 FLAGS_use_local_tz_for_unix_timestamp_conversions);
2162 default_query_options_.__set_convert_legacy_hive_parquet_utc_timestamps(
2163 FLAGS_convert_legacy_hive_parquet_utc_timestamps);
2164 QueryOptionsMask set_query_options; // unused
2165 Status status = ParseQueryOptions(FLAGS_default_query_options,
2166 &default_query_options_, &set_query_options);
2167 status.MergeStatus(ValidateQueryOptions(&default_query_options_));
2168 if (!status.ok()) {
2169 // Log error and exit if the default query options are invalid.
2170 CLEAN_EXIT_WITH_ERROR(Substitute("Invalid default query options. Please check "
2171 "-default_query_options.\n $0", status.GetDetail()));
2172 }
2173 LOG(INFO) << "Default query options:" << ThriftDebugString(default_query_options_);
2174
2175 map<string, string> string_map;
2176 TQueryOptionsToMap(default_query_options_, &string_map);
2177 string_map["SUPPORT_START_OVER"] = "false";
2178 string_map["TIMEZONE"] = TimezoneDatabase::LocalZoneName();
2179 PopulateQueryOptionLevels(&query_option_levels_);
2180 map<string, string>::const_iterator itr = string_map.begin();
2181 for (; itr != string_map.end(); ++itr) {
2182 ConfigVariable option;
2183 option.__set_key(itr->first);
2184 option.__set_value(itr->second);
2185 AddOptionLevelToConfig(&option, itr->first);
2186 default_configs_.push_back(option);
2187 }
2188}
2189
2190void ImpalaServer::SessionState::UpdateTimeout() {
2191 DCHECK(impala_server != nullptr);

Callers

nothing calls this directly

Calls 8

SubstituteFunction · 0.85
ThriftDebugStringFunction · 0.85
MergeStatusMethod · 0.80
GetDetailMethod · 0.80
push_backMethod · 0.80
okMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected