commonlib/src/main/java/com/streamsets/pipeline/lib/util/AvroSchemaHelper.java
public Schema loadFromRegistry(String subject) throws SchemaRegistryException {
    try {
      SchemaMetadata metadata = registryClient.getLatestSchemaMetadata(subject);
      return registryClient.getByID(metadata.getId());
    } catch (IOException | RestClientException e) {
      throw new SchemaRegistryException(e);
    }
  }
public Schema loadFromRegistry(String subject) throws SchemaRegistryException {
    try {
      SchemaMetadata metadata = registryClient.getLatestSchemaMetadata(subject);
      return registryClient.getByID(metadata.getId());
    } catch (IOException | RestClientException e) {
      throw new SchemaRegistryException(e);
    }
  }
Loads and parses a schema for the specified subject from the schema registry
@param subject subject for which to fetch the latest version of a schema.
@return parsed avro schema
@throws SchemaRegistryException if there is an error with the registry client