use of org.apache.ratis.proto.ExamplesProtos.StreamWriteRequestProto in project incubator-ratis by apache.
the class FileStoreClient method getStreamOutput.
public DataStreamOutput getStreamOutput(String path, long dataSize, RoutingTable routingTable) {
final StreamWriteRequestProto header = StreamWriteRequestProto.newBuilder().setPath(ProtoUtils.toByteString(path)).setLength(dataSize).build();
final FileStoreRequestProto request = FileStoreRequestProto.newBuilder().setStream(header).build();
return client.getDataStreamApi().stream(request.toByteString().asReadOnlyByteBuffer(), routingTable);
}
Aggregations