@Override public SchemaVersionInfo retrieveSchemaVersion(SchemaIdVersion key) throws SchemaNotFoundException { return schemaRegistryClient.getSchemaVersionInfo(key); } };
@Override public SchemaVersionInfo retrieveSchemaVersion(SchemaVersionKey key) throws SchemaNotFoundException { return schemaRegistryClient.getSchemaVersionInfo(key); }
@Override public Object deserialize(MessageAndMetadata context, Integer readerSchemaVersion) throws SerDesException { byte protocolId = retrieveProtocolId(context); SchemaIdVersion schemaIdVersion = retrieveSchemaIdVersion(protocolId, context); SchemaMetadata schemaMetadata; SchemaVersionInfo schemaVersionInfo; try { schemaVersionInfo = schemaRegistryClient.getSchemaVersionInfo(schemaIdVersion); schemaMetadata = schemaRegistryClient.getSchemaMetadataInfo(schemaVersionInfo.getName()).getSchemaMetadata(); } catch (Exception e) { throw new RegistryException(e); } return doDeserialize(context, protocolId, schemaMetadata, schemaVersionInfo.getVersion(), readerSchemaVersion); }
@Override public O deserialize(I input, Integer readerSchemaVersion) throws SerDesException { ensureInitialized(); // it can be enhanced to have respective protocol handlers for different versions byte protocolId = retrieveProtocolId(input); SchemaIdVersion schemaIdVersion = retrieveSchemaIdVersion(protocolId, input); SchemaVersionInfo schemaVersionInfo; SchemaMetadata schemaMetadata; try { schemaVersionInfo = schemaRegistryClient.getSchemaVersionInfo(schemaIdVersion); schemaMetadata = schemaRegistryClient.getSchemaMetadataInfo(schemaVersionInfo.getName()).getSchemaMetadata(); } catch (Exception e) { throw new RegistryException(e); } return doDeserialize(input, protocolId, schemaMetadata, schemaVersionInfo.getVersion(), readerSchemaVersion); }