| 150 | } |
| 151 | |
| 152 | folly::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 | |
| 170 | RowTypePtr getDataType( |
| 171 | const core::PlanNodePtr& tracedPlan, |
no test coverage detected