summaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/interface/job_counters.cpp
diff options
context:
space:
mode:
authorhiddenpath <[email protected]>2025-03-11 16:04:38 +0300
committerhiddenpath <[email protected]>2025-03-11 16:54:53 +0300
commit1ff4a6b6b09b97c5238b953716b18ef6d2ba92bc (patch)
tree6b8b75987a693d9b11633ad9446b07fc7d842530 /yt/cpp/mapreduce/interface/job_counters.cpp
parent2fc37acd05605e86ab293883cc1b739aa60da68f (diff)
Do not fail upon negative job counters receiving
commit_hash:668ef57d392be32298dea16386d7d7e78aca248d
Diffstat (limited to 'yt/cpp/mapreduce/interface/job_counters.cpp')
-rw-r--r--yt/cpp/mapreduce/interface/job_counters.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/yt/cpp/mapreduce/interface/job_counters.cpp b/yt/cpp/mapreduce/interface/job_counters.cpp
index 2d0284e2b1b..6468e0e6d02 100644
--- a/yt/cpp/mapreduce/interface/job_counters.cpp
+++ b/yt/cpp/mapreduce/interface/job_counters.cpp
@@ -5,20 +5,20 @@ namespace NYT {
////////////////////////////////////////////////////////////////////////////////
namespace {
- ui64 CountTotal(const TNode& data)
+ i64 CountTotal(const TNode& data)
{
if (data.IsMap()) {
if (auto totalPtr = data.AsMap().FindPtr("total")) {
- return data["total"].IntCast<ui64>();
+ return data["total"].IntCast<i64>();
} else {
- ui64 total = 0;
+ i64 total = 0;
for (const auto& keyVal: data.AsMap()) {
total += CountTotal(keyVal.second);
}
return total;
}
} else {
- return data.IntCast<ui64>();
+ return data.IntCast<i64>();
}
}
@@ -41,16 +41,16 @@ TJobCounter::TJobCounter(TNode data)
}
}
-TJobCounter::TJobCounter(ui64 total)
+TJobCounter::TJobCounter(i64 total)
: Total_(total)
{ }
-ui64 TJobCounter::GetTotal() const
+i64 TJobCounter::GetTotal() const
{
return Total_;
}
-ui64 TJobCounter::GetValue(const TStringBuf key) const
+i64 TJobCounter::GetValue(const TStringBuf key) const
{
if (Data_.HasValue()) {
return CountTotal(Data_[key]);
@@ -154,7 +154,7 @@ const TJobCounter& TJobCounters::GetBlocked() const
return Blocked_;
}
-ui64 TJobCounters::GetTotal() const
+i64 TJobCounters::GetTotal() const
{
return Total_;
}