Just echo the number of batches written. The client will try to call this method with different write options set.
| 1063 | // Just echo the number of batches written. The client will try to |
| 1064 | // call this method with different write options set. |
| 1065 | Status DoPut(const ServerCallContext& context, |
| 1066 | std::unique_ptr<FlightMessageReader> reader, |
| 1067 | std::unique_ptr<FlightMetadataWriter> writer) override { |
| 1068 | int counter = 0; |
| 1069 | while (true) { |
| 1070 | ARROW_ASSIGN_OR_RAISE(FlightStreamChunk chunk, reader->Next()); |
| 1071 | if (chunk.data == nullptr) break; |
| 1072 | counter++; |
| 1073 | } |
| 1074 | auto metadata = Buffer::FromString(std::to_string(counter)); |
| 1075 | return writer->WriteMetadata(*metadata); |
| 1076 | } |
| 1077 | |
| 1078 | // Echo client data, but with write options set to limit the nesting |
| 1079 | // level. |
nothing calls this directly
no test coverage detected