77 for (
size_t i = 0; i <
new_files_.size(); i++) {
112 const char* msg = NULL;
129 msg =
"comparator name";
145 msg =
"previous log number";
153 msg =
"next file number";
161 msg =
"last sequence number";
170 msg =
"compaction pointer";
179 msg =
"deleted file";
189 new_files_.push_back(std::make_pair(level, f));
191 msg =
"new-file entry";
201 if (msg == NULL && !input.
empty()) {
214 r.append(
"VersionEdit {");
216 r.append(
"\n Comparator: ");
220 r.append(
"\n LogNumber: ");
224 r.append(
"\n PrevLogNumber: ");
228 r.append(
"\n NextFile: ");
232 r.append(
"\n LastSeq: ");
236 r.append(
"\n CompactPointer: ");
241 for (DeletedFileSet::const_iterator iter =
deleted_files_.begin();
244 r.append(
"\n DeleteFile: ");
249 for (
size_t i = 0; i <
new_files_.size(); i++) {
251 r.append(
"\n AddFile: ");
static bool GetLevel(Slice *input, int *level)
static const int kNumLevels
DeletedFileSet deleted_files_
void PutVarint64(std::string *dst, uint64_t v)
static Slice GetLengthPrefixedSlice(const char *data)
std::string DebugString() const
std::string ToString() const
std::string DebugString() const
static Status Corruption(const Slice &msg, const Slice &msg2=Slice())
uint64_t next_file_number_
void PutLengthPrefixedSlice(std::string *dst, const Slice &value)
bool has_next_file_number_
void DecodeFrom(const Slice &s)
uint64_t prev_log_number_
void EncodeTo(std::string *dst) const
bool has_prev_log_number_
SequenceNumber last_sequence_
Status DecodeFrom(const Slice &src)
std::vector< std::pair< int, InternalKey > > compact_pointers_
std::vector< std::pair< int, FileMetaData > > new_files_
bool GetVarint64(Slice *input, uint64_t *value)
bool GetVarint32(Slice *input, uint32_t *value)
static bool GetInternalKey(Slice *input, InternalKey *dst)
void PutVarint32(std::string *dst, uint32_t v)
void AppendNumberTo(std::string *str, uint64_t num)