Method Concat
- Namespace
- AvroSharp.Containers
- Assembly
- AvroSharp.dll
Concat(Stream, IEnumerable<Stream>, AvroFileReaderOptions?)
Concatenates container files of one schema into one file, block by block, without decoding their objects, as
Apache Avro Java's avro-tools concat does. The output has the first input's codec and metadata; blocks of
that codec are copied byte for byte, and blocks of any other codec are recompressed. The streams are left open.
When an input fails, the output holds the header and the blocks copied before it: write to a temporary file and
keep it only on success.
public static void Concat(Stream output, IEnumerable<Stream> inputs, AvroFileReaderOptions? options = null)
Parameters
outputStreamThe destination.
inputsIEnumerable<Stream>The files, at least one.
optionsAvroFileReaderOptionsHow to read the inputs, or null for the defaults: Codecs must have the codecs of the inputs beyond null and deflate.
Exceptions
- ArgumentException
There are no inputs.
- AvroException
An input's schema is not the first input's (by canonical form), or its codec is not available.
- AvroDataException
An input is malformed.