/** * This call is not cached because we never want to miss out on the latest schema. * {@inheritDoc} */ @Override public S getLatestSchema(String name) throws IOException, SchemaRegistryException { return _kafkaSchemaRegistry.getLatestSchema(name); }
@Override public Schema convertSchema(S schemaIn, WorkUnitState workUnit) throws SchemaConversionException { Preconditions.checkArgument(workUnit.contains(KafkaSource.TOPIC_NAME), "Must specify topic name."); String topic = workUnit.getProp(KafkaSource.TOPIC_NAME); try { return (Schema) this.schemaRegistry.getLatestSchema(topic); } catch (IOException | SchemaRegistryException e) { throw new SchemaConversionException(e); } }
/** * This call is not cached because we never want to miss out on the latest schema. * {@inheritDoc} */ @Override public S getLatestSchema(String name) throws IOException, SchemaRegistryException { return _kafkaSchemaRegistry.getLatestSchema(name); }
@Override public Schema convertSchema(S schemaIn, WorkUnitState workUnit) throws SchemaConversionException { Preconditions.checkArgument(workUnit.contains(KafkaSource.TOPIC_NAME), "Must specify topic name."); String topic = workUnit.getProp(KafkaSource.TOPIC_NAME); try { return (Schema) this.schemaRegistry.getLatestSchema(topic); } catch (IOException | SchemaRegistryException e) { throw new SchemaConversionException(e); } }