Search in sources :

Example 11 with AvroRetryableException

use of com.hortonworks.registries.schemaregistry.serdes.avro.exceptions.AvroRetryableException in project registry by hortonworks.

the class AbstractAvroSerDesProtocolHandler method handleSchemaVersionSerialization.

@Override
public void handleSchemaVersionSerialization(OutputStream outputStream, SchemaIdVersion schemaIdVersion) {
    try {
        outputStream.write(new byte[] { protocolId });
        doHandleSchemaVersionSerialization(outputStream, schemaIdVersion);
    } catch (IOException e) {
        throw new AvroRetryableException(e);
    }
}
Also used : AvroRetryableException(com.hortonworks.registries.schemaregistry.serdes.avro.exceptions.AvroRetryableException) IOException(java.io.IOException)

Aggregations

AvroRetryableException (com.hortonworks.registries.schemaregistry.serdes.avro.exceptions.AvroRetryableException)11 IOException (java.io.IOException)11 AvroException (com.hortonworks.registries.schemaregistry.serdes.avro.exceptions.AvroException)5 SchemaIdVersion (com.hortonworks.registries.schemaregistry.SchemaIdVersion)3 ByteBuffer (java.nio.ByteBuffer)3 Schema (org.apache.avro.Schema)3 GenericDatumReader (org.apache.avro.generic.GenericDatumReader)2 BinaryEncoder (org.apache.avro.io.BinaryEncoder)2 DatumReader (org.apache.avro.io.DatumReader)2 SpecificDatumReader (org.apache.avro.specific.SpecificDatumReader)2 SpecificRecord (org.apache.avro.specific.SpecificRecord)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 GenericDatumWriter (org.apache.avro.generic.GenericDatumWriter)1 DatumWriter (org.apache.avro.io.DatumWriter)1 SpecificDatumWriter (org.apache.avro.specific.SpecificDatumWriter)1