bool HBaseConfigurationLoader::UpdateMapWithValue()

in src/hbase/client/hbase-configuration-loader.cc [189:207]


bool HBaseConfigurationLoader::UpdateMapWithValue(ConfigMap &map, const std::string &key,
                                                  const std::string &value,
                                                  boost::optional<std::string> final_text) {
  auto map_value = map.find(key);
  if (map_value != map.end() && map_value->second.final) {
    return false;
  }

  bool final_value = false;
  if (nullptr != final_text.get_ptr()) {
    if (is_valid_bool(final_text.get())) {
      final_value = str_to_bool(final_text.get());
    }
  }

  map[key].value = value;
  map[key].final = final_value;
  return true;
}