MCPcopy Create free account
hub / github.com/apache/arrow / RunMain

Function RunMain

cpp/src/arrow/flight/sql/example/acero_main.cc:38–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36DEFINE_string(location, "grpc://localhost:12345", "Location to listen on");
37
38arrow::Status RunMain(const std::string& location_str) {
39 ARROW_ASSIGN_OR_RAISE(flight::Location location, flight::Location::Parse(location_str));
40 flight::FlightServerOptions options(location);
41
42 std::unique_ptr<flight::FlightServerBase> server;
43 ARROW_ASSIGN_OR_RAISE(server, sql::acero_example::MakeAceroServer());
44 ARROW_RETURN_NOT_OK(server->Init(options));
45
46 ARROW_RETURN_NOT_OK(server->SetShutdownOnSignals({SIGTERM}));
47
48 ARROW_LOG(INFO) << "Listening on " << location.ToString();
49
50 ARROW_RETURN_NOT_OK(server->Serve());
51 return arrow::Status::OK();
52}
53
54int main(int argc, char** argv) {
55 gflags::ParseCommandLineFlags(&argc, &argv, true);

Callers 1

mainFunction · 0.70

Calls 7

MakeAceroServerFunction · 0.85
SetShutdownOnSignalsMethod · 0.80
ServeMethod · 0.80
ARROW_ASSIGN_OR_RAISEFunction · 0.50
OKFunction · 0.50
InitMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected