diff options
author | leo <leo@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
commit | 99609724f661f7e21d1cb08e8d80e87c3632fdb3 (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/on_disk/chunks | |
parent | 980edcd3304699edf9d4e4d6a656e585028e2a72 (diff) | |
download | ydb-99609724f661f7e21d1cb08e8d80e87c3632fdb3.tar.gz |
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/on_disk/chunks')
-rw-r--r-- | library/cpp/on_disk/chunks/chunked_helpers.h | 6 | ||||
-rw-r--r-- | library/cpp/on_disk/chunks/chunks_ut.cpp | 26 |
2 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/on_disk/chunks/chunked_helpers.h b/library/cpp/on_disk/chunks/chunked_helpers.h index 5395f8c9b4..5fa96afdca 100644 --- a/library/cpp/on_disk/chunks/chunked_helpers.h +++ b/library/cpp/on_disk/chunks/chunked_helpers.h @@ -269,7 +269,7 @@ public: bits = 0; } WriteBin<ui16>(&out, bits); - WriteBin<ui32>(&out, (ui32)Data.size()); + WriteBin<ui32>(&out, (ui32)Data.size()); const ui32 nBuckets = ui32(1) << bits; TData2 data2(nBuckets); @@ -281,8 +281,8 @@ public: ui32 offset = 0; for (ui32 i = 0; i < nBuckets; ++i) { intervals[i].Offset = offset; - intervals[i].Length = (ui32)data2[i].size(); - offset += (ui32)data2[i].size(); + intervals[i].Length = (ui32)data2[i].size(); + offset += (ui32)data2[i].size(); } #ifndef NDEBUG for (ui32 i = 0; i < nBuckets; ++i) { diff --git a/library/cpp/on_disk/chunks/chunks_ut.cpp b/library/cpp/on_disk/chunks/chunks_ut.cpp index bcd6801cb3..f727647f7f 100644 --- a/library/cpp/on_disk/chunks/chunks_ut.cpp +++ b/library/cpp/on_disk/chunks/chunks_ut.cpp @@ -90,8 +90,8 @@ public: writer.Save(stream); } { - TBlob temp = TBlob::FromStreamSingleThreaded(stream); - TGeneralVector<ui32> reader(temp); + TBlob temp = TBlob::FromStreamSingleThreaded(stream); + TGeneralVector<ui32> reader(temp); UNIT_ASSERT_EQUAL(reader.GetSize(), N); for (size_t i = 0; i < N; ++i) { ui32 value; @@ -112,7 +112,7 @@ public: writer.Save(stream); } { - TBlob temp = TBlob::FromStreamSingleThreaded(stream); + TBlob temp = TBlob::FromStreamSingleThreaded(stream); TGeneralVector<TString> reader(temp); UNIT_ASSERT_EQUAL(reader.GetSize(), N); for (size_t i = 0; i < N; ++i) { @@ -135,8 +135,8 @@ public: writer.Save(stream); } { - TBlob temp = TBlob::FromStreamSingleThreaded(stream); - TGeneralVector<TItem> reader(temp); + TBlob temp = TBlob::FromStreamSingleThreaded(stream); + TGeneralVector<TItem> reader(temp); UNIT_ASSERT_EQUAL(reader.GetSize(), N); TItem value; @@ -163,8 +163,8 @@ public: writer.Save(stream); } { - TBlob temp = TBlob::FromStreamSingleThreaded(stream); - TGeneralVector<int*> reader(temp); + TBlob temp = TBlob::FromStreamSingleThreaded(stream); + TGeneralVector<int*> reader(temp); UNIT_ASSERT_EQUAL(reader.GetSize(), N); for (size_t i = 0; i < N; ++i) { int* value; @@ -186,8 +186,8 @@ public: writer.Save(stream); } { - TBlob temp = TBlob::FromStreamSingleThreaded(stream); - TGeneralVector<TItem> reader(temp); + TBlob temp = TBlob::FromStreamSingleThreaded(stream); + TGeneralVector<TItem> reader(temp); UNIT_ASSERT_EQUAL(reader.GetSize(), N); for (size_t i = 0; i < N; ++i) { TItem value; @@ -214,7 +214,7 @@ public: } { - TBlob fIn = TBlob::FromFileSingleThreaded(FILENAME); + TBlob fIn = TBlob::FromFileSingleThreaded(FILENAME); TStringsVector vct(GetBlock(fIn, 0)); UNIT_ASSERT_EQUAL(vct.Get(0), ""); UNIT_ASSERT_EQUAL(vct.Get(1), "test"); @@ -250,7 +250,7 @@ public: } { - TBlob mf = TBlob::FromFileSingleThreaded(filename); + TBlob mf = TBlob::FromFileSingleThreaded(filename); TNamedChunkedDataReader reader(mf); UNIT_ASSERT(reader.GetBlocksCount() == 3); @@ -297,7 +297,7 @@ private: writer.WriteFooter(); } { - TBlob blob = TBlob::FromBufferSingleThreaded(buffer); + TBlob blob = TBlob::FromBufferSingleThreaded(buffer); TChunkedDataReader data(blob); // printf("%d\n", (int)data.GetBlockLen(3)); UNIT_ASSERT_EQUAL(4, data.GetBlockLen(0)); @@ -317,7 +317,7 @@ private: writer.WriteFooter(); } { - TBlob blob = TBlob::FromBufferSingleThreaded(buffer); + TBlob blob = TBlob::FromBufferSingleThreaded(buffer); TChunkedDataReader data(blob); // printf("%d\n", (int)data.GetBlockLen(1)); UNIT_ASSERT_EQUAL(0, data.GetBlockLen(0)); |