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

Function getTaskMetadata

bolt/exec/TraceUtil.cpp:152–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152folly::dynamic getTaskMetadata(
153 const std::string& taskMetaFilePath,
154 const std::shared_ptr<filesystems::FileSystem>& fs) {
155 try {
156 BOLT_CHECK_NOT_NULL(fs);
157 const auto file = fs->openFileForRead(taskMetaFilePath);
158 BOLT_CHECK_NOT_NULL(file);
159 const auto taskMeta = file->pread(0, file->size());
160 BOLT_USER_CHECK(!taskMeta.empty());
161 return folly::parseJson(taskMeta);
162 } catch (const std::exception& e) {
163 BOLT_FAIL(
164 "Failed to get the query metadata from '{}' with error: {}",
165 taskMetaFilePath,
166 e.what());
167 }
168}
169
170RowTypePtr getDataType(
171 const core::PlanNodePtr& tracedPlan,

Callers 1

Calls 5

openFileForReadMethod · 0.45
preadMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected