MCPcopy Create free account
hub / github.com/bytedance/bolt / toString

Method toString

bolt/exec/Task.cpp:2499–2550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2497}
2498
2499std::string Task::toString() const {
2500 std::lock_guard<std::timed_mutex> l(mutex_);
2501 std::stringstream out;
2502 out << "{Task " << shortId(taskId_) << " (" << taskId_ << ")" << std::endl;
2503
2504 if (exception_) {
2505 out << "Error: " << errorMessageLocked() << std::endl;
2506 }
2507
2508 if (planFragment_.planNode) {
2509 out << "Plan:\n"
2510 << planFragment_.planNode->toString(true, true) << std::endl;
2511 }
2512
2513 size_t numRemainingDrivers{0};
2514 for (const auto& driver : drivers_) {
2515 if (driver) {
2516 ++numRemainingDrivers;
2517 }
2518 }
2519
2520 if (numRemainingDrivers > 0) {
2521 bool addedCaption{false};
2522 for (auto& driver : drivers_) {
2523 if (driver) {
2524 if (!addedCaption) {
2525 out << "drivers:\n";
2526 addedCaption = true;
2527 }
2528 out << driver->toString() << std::endl;
2529 }
2530 }
2531 }
2532
2533 if (!driversClosedByTask_.empty()) {
2534 bool addedCaption{false};
2535 for (auto& driver : driversClosedByTask_) {
2536 auto zombieDriver = driver.lock();
2537 if (zombieDriver) {
2538 if (!addedCaption) {
2539 out << "zombie drivers:\n";
2540 addedCaption = true;
2541 }
2542 out << zombieDriver->toString()
2543 << ", refcount: " << zombieDriver.use_count() - 1 << std::endl;
2544 }
2545 }
2546 }
2547
2548 out << "}";
2549 return out.str();
2550}
2551
2552folly::dynamic Task::toShortJsonLocked() const {
2553 folly::dynamic obj = folly::dynamic::object;

Callers 15

toJsonMethod · 0.45
nameMethod · 0.45
SpillWriteFileMethod · 0.45
ExpandMethod · 0.45
spillInputMethod · 0.45
spillOutputMethod · 0.45
initializeMethod · 0.45
createHashTableMethod · 0.45
spillMethod · 0.45
getOutputWithSpillMethod · 0.45
createMethod · 0.45

Calls 3

lockMethod · 0.80
strMethod · 0.80
emptyMethod · 0.45

Tested by 4

testRoundTripMethod · 0.36
testRoundTripMethod · 0.36
RowEqualVectorsMethod · 0.36
RowEqualRowMethod · 0.36