MCPcopy Create free account
hub / github.com/apache/mesos / append

Method append

src/log/log.cpp:576–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574
575
576Future<Option<Log::Position>> LogWriterProcess::append(const string& bytes)
577{
578 VLOG(1) << "Attempting to append " << bytes.size() << " bytes to the log";
579
580 if (coordinator == nullptr) {
581 return Failure("No election has been performed");
582 }
583
584 if (error.isSome()) {
585 return Failure(error.get());
586 }
587
588 return coordinator->append(bytes)
589 .then(lambda::bind(&Self::position, lambda::_1))
590 .onFailed(defer(self(), &Self::failed, "Failed to append", lambda::_1));
591}
592
593
594Future<Option<Log::Position>> LogWriterProcess::truncate(

Callers 15

TESTFunction · 0.45
decompressMethod · 0.45
compressFunction · 0.45
readFunction · 0.45
stringify_argsFunction · 0.45
mkdtempFunction · 0.45
readFunction · 0.45
readAllMethod · 0.45
foreachFunction · 0.45
on_urlMethod · 0.45
on_header_fieldMethod · 0.45
on_header_valueMethod · 0.45

Calls 8

FailureClass · 0.85
deferFunction · 0.85
bindFunction · 0.50
dispatchFunction · 0.50
sizeMethod · 0.45
isSomeMethod · 0.45
getMethod · 0.45
thenMethod · 0.45

Tested by 13

TESTFunction · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36
TYPED_TESTFunction · 0.36
TEST_FFunction · 0.36
foreachFunction · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36
resourceOffersMethod · 0.36