aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/on_disk/chunks
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:23 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:23 +0300
commit706b83ed7de5a473436620367af31fc0ceecde07 (patch)
tree103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/on_disk/chunks
parent918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff)
downloadydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/on_disk/chunks')
-rw-r--r--library/cpp/on_disk/chunks/chunked_helpers.cpp6
-rw-r--r--library/cpp/on_disk/chunks/chunked_helpers.h20
-rw-r--r--library/cpp/on_disk/chunks/chunks_ut.cpp18
-rw-r--r--library/cpp/on_disk/chunks/reader.cpp2
-rw-r--r--library/cpp/on_disk/chunks/writer.cpp4
5 files changed, 25 insertions, 25 deletions
diff --git a/library/cpp/on_disk/chunks/chunked_helpers.cpp b/library/cpp/on_disk/chunks/chunked_helpers.cpp
index b7adba2753..faf9164c80 100644
--- a/library/cpp/on_disk/chunks/chunked_helpers.cpp
+++ b/library/cpp/on_disk/chunks/chunked_helpers.cpp
@@ -29,7 +29,7 @@ TNamedChunkedDataReader::TNamedChunkedDataReader(const TBlob& blob)
Load(&input, Names);
size_t index = 0;
- for (TVector<TString>::const_iterator it = Names.begin(); it != Names.end(); ++it, ++index) {
+ for (TVector<TString>::const_iterator it = Names.begin(); it != Names.end(); ++it, ++index) {
if (!it->empty())
NameToIndex[*it] = index;
}
@@ -42,14 +42,14 @@ TNamedChunkedDataWriter::TNamedChunkedDataWriter(IOutputStream& slave)
{
}
-TNamedChunkedDataWriter::~TNamedChunkedDataWriter() {
+TNamedChunkedDataWriter::~TNamedChunkedDataWriter() {
}
void TNamedChunkedDataWriter::NewBlock() {
NewBlock("");
}
-void TNamedChunkedDataWriter::NewBlock(const TString& name) {
+void TNamedChunkedDataWriter::NewBlock(const TString& name) {
if (!name.empty()) {
if (NameToIndex.count(name) != 0)
throw yexception() << "Block name is not unique";
diff --git a/library/cpp/on_disk/chunks/chunked_helpers.h b/library/cpp/on_disk/chunks/chunked_helpers.h
index 5fa96afdca..207afe7ee1 100644
--- a/library/cpp/on_disk/chunks/chunked_helpers.h
+++ b/library/cpp/on_disk/chunks/chunked_helpers.h
@@ -54,7 +54,7 @@ public:
template <typename T>
class TYVectorWriter {
private:
- TVector<T> Vector;
+ TVector<T> Vector;
public:
TYVectorWriter() = default;
@@ -233,12 +233,12 @@ template <typename TKey, typename TValue>
class TPlainHashWriter : TPlainHashCommon {
private:
typedef TPackedPair<TKey, TValue> TKeyValuePair;
- typedef TVector<TKeyValuePair> TData;
+ typedef TVector<TKeyValuePair> TData;
TData Data;
- typedef TVector<TData> TData2;
+ typedef TVector<TData> TData2;
bool IsPlainEnought(ui16 bits) const {
- TVector<size_t> counts(1LL << bits, 0);
+ TVector<size_t> counts(1LL << bits, 0);
for (size_t i = 0; i < Data.size(); ++i) {
size_t& count = counts[KeyHash<TKey>(TKeyValuePair::GetFirst(&Data[i]), bits)];
++count;
@@ -276,7 +276,7 @@ public:
for (size_t i = 0; i < Data.size(); ++i)
data2[KeyHash<TKey>(TKeyValuePair::GetFirst(&Data[i]), bits)].push_back(Data[i]);
- typedef TVector<TInterval> TIntervals;
+ typedef TVector<TInterval> TIntervals;
TIntervals intervals(nBuckets);
ui32 offset = 0;
for (ui32 i = 0; i < nBuckets; ++i) {
@@ -583,7 +583,7 @@ public:
template <class T, bool isPod>
class TVectorTakingIntoAccountThePodTypeWriter : TNonCopyable {
private:
- typedef TVector<ui64> TOffsets;
+ typedef TVector<ui64> TOffsets;
TOffsets Offsets;
TBuffer Data;
TBufferOutput DataStream;
@@ -655,12 +655,12 @@ struct TGeneralVectorG<TItem, true> {
};
template <>
-struct TSaveLoadVectorNonPodElement<TString> {
+struct TSaveLoadVectorNonPodElement<TString> {
static inline void Save(IOutputStream* out, const TString& s) {
out->Write(s.data(), s.size() + 1);
}
- static inline void Load(TMemoryInput* in, TString& s, size_t elementSize) {
+ static inline void Load(TMemoryInput* in, TString& s, size_t elementSize) {
Y_ASSERT(elementSize > 0 && in->Avail() >= elementSize);
s.assign(in->Buf(), elementSize - 1); /// excluding 0 at the end
}
@@ -670,5 +670,5 @@ template <bool G>
struct TStringsVectorG: public TGeneralVectorG<TString, G> {
};
-using TStringsVector = TGeneralVector<TString>;
-using TStringsVectorWriter = TGeneralVectorWriter<TString>;
+using TStringsVector = TGeneralVector<TString>;
+using TStringsVectorWriter = TGeneralVectorWriter<TString>;
diff --git a/library/cpp/on_disk/chunks/chunks_ut.cpp b/library/cpp/on_disk/chunks/chunks_ut.cpp
index f727647f7f..cba0ecd3ab 100644
--- a/library/cpp/on_disk/chunks/chunks_ut.cpp
+++ b/library/cpp/on_disk/chunks/chunks_ut.cpp
@@ -102,21 +102,21 @@ public:
UNIT_ASSERT_EQUAL(reader.RealSize(), sizeof(ui64) + N * sizeof(ui32));
}
}
- { /// TString
+ { /// TString
const size_t N = 4;
TBufferStream stream;
{
- TGeneralVectorWriter<TString> writer;
+ TGeneralVectorWriter<TString> writer;
for (size_t i = 0; i < N; ++i)
writer.PushBack(ToString(i));
writer.Save(stream);
}
{
TBlob temp = TBlob::FromStreamSingleThreaded(stream);
- TGeneralVector<TString> reader(temp);
+ TGeneralVector<TString> reader(temp);
UNIT_ASSERT_EQUAL(reader.GetSize(), N);
for (size_t i = 0; i < N; ++i) {
- TString value;
+ TString value;
reader.Get(i, value);
UNIT_ASSERT_EQUAL(value, ToString(i));
UNIT_ASSERT_EQUAL(reader.Get(i), ToString(i));
@@ -151,7 +151,7 @@ public:
}
{ /// pointer
const size_t N = 3;
- TVector<int> data_holder(N);
+ TVector<int> data_holder(N);
int* a = &(data_holder[0]);
TBufferStream stream;
{
@@ -200,11 +200,11 @@ public:
}
void TestStrings() {
- const TString FILENAME = "chunked_helpers_test.bin";
+ const TString FILENAME = "chunked_helpers_test.bin";
TTempFileHandle file(FILENAME.c_str());
{
- TFixedBufferFileOutput fOut(FILENAME);
+ TFixedBufferFileOutput fOut(FILENAME);
TStringsVectorWriter stringsWriter;
stringsWriter.PushBack("");
stringsWriter.PushBack("test");
@@ -230,11 +230,11 @@ public:
}
void TestNamedChunkedData() {
- const TString filename = MakeTempName(nullptr, "named_chunked_data_test");
+ const TString filename = MakeTempName(nullptr, "named_chunked_data_test");
TTempFile file(filename);
{
- TFixedBufferFileOutput fOut(filename);
+ TFixedBufferFileOutput fOut(filename);
TNamedChunkedDataWriter writer(fOut);
writer.NewBlock("alpha");
diff --git a/library/cpp/on_disk/chunks/reader.cpp b/library/cpp/on_disk/chunks/reader.cpp
index 6e28cbf367..80235e8084 100644
--- a/library/cpp/on_disk/chunks/reader.cpp
+++ b/library/cpp/on_disk/chunks/reader.cpp
@@ -5,7 +5,7 @@
#include "reader.h"
template <typename T>
-static inline void ReadAux(const char* data, T* aux, T count, TVector<const char*>* result) {
+static inline void ReadAux(const char* data, T* aux, T count, TVector<const char*>* result) {
result->resize(count);
for (size_t i = 0; i < count; ++i) {
(*result)[i] = data + ReadUnaligned<T>(aux + i);
diff --git a/library/cpp/on_disk/chunks/writer.cpp b/library/cpp/on_disk/chunks/writer.cpp
index 6dc7397f09..8344045e14 100644
--- a/library/cpp/on_disk/chunks/writer.cpp
+++ b/library/cpp/on_disk/chunks/writer.cpp
@@ -2,7 +2,7 @@
#include "writer.h"
-static inline void WriteAux(IOutputStream* out, const TVector<ui64>& data) {
+static inline void WriteAux(IOutputStream* out, const TVector<ui64>& data) {
::SavePodArray(out, data.data(), data.size());
}
@@ -14,7 +14,7 @@ TChunkedDataWriter::TChunkedDataWriter(IOutputStream& slave)
{
}
-TChunkedDataWriter::~TChunkedDataWriter() {
+TChunkedDataWriter::~TChunkedDataWriter() {
}
void TChunkedDataWriter::NewBlock() {