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

Function WaitForReady

cpp/src/arrow/flight/flight_benchmark.cc:124–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122};
123
124Status WaitForReady(FlightClient* client, const FlightCallOptions& call_options) {
125 Action action{"ping", nullptr};
126 for (int attempt = 0; attempt < 10; attempt++) {
127 auto result_stream_result = client->DoAction(call_options, action);
128 if (result_stream_result.ok() && (*result_stream_result)->Drain().ok()) {
129 return Status::OK();
130 }
131 std::this_thread::sleep_for(std::chrono::milliseconds(1000));
132 }
133 return Status::IOError("Server was not available after 10 attempts");
134}
135
136arrow::Result<PerformanceResult> RunDoGetTest(FlightClient* client,
137 const FlightCallOptions& call_options,

Callers 1

mainFunction · 0.85

Calls 5

IOErrorFunction · 0.85
DrainMethod · 0.80
OKFunction · 0.50
DoActionMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected