MCPcopy Create free account
hub / github.com/apache/cloudberry / main

Function main

contrib/pax_storage/src/cpp/storage/tools/pax_dump.cpp:257–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257int main(int argc, char **argv) {
258 pax::tools::DumpConfig config;
259 int rc = 0;
260
261 progname = argv[0];
262 InitConfig(&config, argc, argv);
263
264 pax::tools::OrcDumpReader reader(&config);
265 try {
266 bool ok = reader.Open();
267 if (!ok) {
268 std::cout << "Failed to dump current file: " << config.file_name
269 << ", Toast file: " << config.toast_file_name // safe
270 << std::endl;
271 rc = -1;
272 goto finish;
273 }
274
275 std::cout << reader.Dump() << std::endl;
276 } catch (cbdb::CException &e) {
277 std::cout << "error happend while dumping.\n " << e.What() << std::endl;
278 std::cout << "Stack: \n" << e.Stack() << std::endl;
279 rc = -1;
280 goto finish;
281 }
282
283finish:
284 free(config.file_name);
285 free(config.toast_file_name);
286 reader.Close();
287 return rc;
288}

Callers

nothing calls this directly

Calls 6

WhatMethod · 0.80
StackMethod · 0.80
InitConfigFunction · 0.70
OpenMethod · 0.45
DumpMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected