aboutsummaryrefslogtreecommitdiffstats
path: root/yt
diff options
context:
space:
mode:
authorbabenko <babenko@yandex-team.com>2024-12-27 17:30:40 +0300
committerbabenko <babenko@yandex-team.com>2024-12-27 17:50:11 +0300
commit9120175d41f59e3831c1f47b595a8ac94c782403 (patch)
tree8f77840d8acc53992b89b5b444f347bd02e5caec /yt
parent1c2baef9dd514a7fb2949841797e3cebd4b4c59d (diff)
downloadydb-9120175d41f59e3831c1f47b595a8ac94c782403.tar.gz
Switch to std::string in server/cell_balancer
commit_hash:f8cbd826a201c65646cdde79586c9b3226ff75dc
Diffstat (limited to 'yt')
-rw-r--r--yt/yt/core/ytree/yson_struct-inl.h9
-rw-r--r--yt/yt/core/ytree/yson_struct.h4
2 files changed, 7 insertions, 6 deletions
diff --git a/yt/yt/core/ytree/yson_struct-inl.h b/yt/yt/core/ytree/yson_struct-inl.h
index aad0bd1fd0..6f56b6bd48 100644
--- a/yt/yt/core/ytree/yson_struct-inl.h
+++ b/yt/yt/core/ytree/yson_struct-inl.h
@@ -331,13 +331,14 @@ std::vector<TIntrusivePtr<T>> CloneYsonStructs(const std::vector<TIntrusivePtr<T
return clonedObjs;
}
-template <class T>
-THashMap<TString, TIntrusivePtr<T>> CloneYsonStructs(const THashMap<TString, TIntrusivePtr<T>>& objs)
+template <class TKey, class TValue>
+THashMap<TKey, TIntrusivePtr<TValue>> CloneYsonStructs(const THashMap<TKey, TIntrusivePtr<TValue>>& objs)
{
- THashMap<TString, TIntrusivePtr<T>> clonedObjs;
+ THashMap<TKey, TIntrusivePtr<TValue>> clonedObjs;
clonedObjs.reserve(objs.size());
for (const auto& [key, obj] : objs) {
- clonedObjs.emplace(key, CloneYsonStruct(obj));
+ // TODO(babenko): switch to std::string
+ clonedObjs.emplace(TString(key), CloneYsonStruct(obj));
}
return clonedObjs;
}
diff --git a/yt/yt/core/ytree/yson_struct.h b/yt/yt/core/ytree/yson_struct.h
index 202dbdbe03..bc42b7073e 100644
--- a/yt/yt/core/ytree/yson_struct.h
+++ b/yt/yt/core/ytree/yson_struct.h
@@ -383,8 +383,8 @@ template <class T>
TIntrusivePtr<T> CloneYsonStruct(const TIntrusivePtr<T>& obj, bool postprocess = true, bool setDefaults = true);
template <class T>
std::vector<TIntrusivePtr<T>> CloneYsonStructs(const std::vector<TIntrusivePtr<T>>& objs);
-template <class T>
-THashMap<TString, TIntrusivePtr<T>> CloneYsonStructs(const THashMap<TString, TIntrusivePtr<T>>& objs);
+template <class TKey, class TValue>
+THashMap<TKey, TIntrusivePtr<TValue>> CloneYsonStructs(const THashMap<TKey, TIntrusivePtr<TValue>>& objs);
void Serialize(const TYsonStructBase& value, NYson::IYsonConsumer* consumer);
void Deserialize(TYsonStructBase& value, INodePtr node);