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

Method serialize

bolt/common/base/SpillConfig.cpp:230–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230folly::dynamic SpillConfig::serialize() const {
231 folly::dynamic obj = folly::dynamic::object;
232 obj["name"] = "SpillConfig";
233 obj["fileNamePrefix"] = fileNamePrefix;
234 obj["maxFileSize"] = static_cast<int64_t>(maxFileSize);
235 obj["spillUringEnabled"] = spillUringEnabled;
236 obj["writeBufferSize"] = static_cast<int64_t>(writeBufferSize);
237 obj["minSpillableReservationPct"] = minSpillableReservationPct;
238 obj["spillableReservationGrowthPct"] = spillableReservationGrowthPct;
239 obj["startPartitionBit"] = static_cast<int64_t>(startPartitionBit);
240 obj["joinPartitionBits"] = static_cast<int64_t>(joinPartitionBits);
241 obj["joinRepartitionBits"] = static_cast<int64_t>(joinRepartitionBits);
242 obj["maxSpillLevel"] = maxSpillLevel;
243 obj["maxSpillRunRows"] = static_cast<int64_t>(maxSpillRunRows);
244 obj["writerFlushThresholdSize"] =
245 static_cast<int64_t>(writerFlushThresholdSize);
246 obj["testSpillPct"] = testSpillPct;
247 obj["compressionKind"] = static_cast<int>(compressionKind);
248 obj["fileCreateConfig"] = fileCreateConfig;
249 obj["rowBasedSpillMode"] = static_cast<int>(rowBasedSpillMode);
250 obj["singlePartitionSerdeKind"] = singlePartitionSerdeKind;
251 obj["spillPartitionsAdaptiveThreshold"] =
252 static_cast<int64_t>(spillPartitionsAdaptiveThreshold);
253 obj["jitEnabled"] = jitEnabled;
254 obj["needSetNextEqual"] = needSetNextEqual;
255 obj["aggBypassHTEqualNum"] = static_cast<int64_t>(aggBypassHTEqualNum);
256 // getSpillDirPathCb, updateAndCheckSpillLimitCb, and executor are omitted;
257 // they must be re-injected by the host after deserialization.
258 return obj;
259}
260
261std::shared_ptr<SpillConfig> SpillConfig::deserialize(
262 const folly::dynamic& obj) {

Callers 2

TESTFunction · 0.45
TEST_FFunction · 0.45

Calls

no outgoing calls

Tested by 2

TESTFunction · 0.36
TEST_FFunction · 0.36