commonlib/src/main/java/com/streamsets/pipeline/lib/util/AvroSchemaHelper.java
public int getSchemaIdFromSubject(String subject) throws SchemaRegistryException {
    try {
      SchemaMetadata metadata = registryClient.getLatestSchemaMetadata(subject);
      return metadata.getId();
    } catch (IOException | RestClientException e) {
      throw new SchemaRegistryException(e);
    }
  }
public int getSchemaIdFromSubject(String subject) throws SchemaRegistryException {
    try {
      SchemaMetadata metadata = registryClient.getLatestSchemaMetadata(subject);
      return metadata.getId();
    } catch (IOException | RestClientException e) {
      throw new SchemaRegistryException(e);
    }
  }
public int getSchemaIdFromSubject ( String subject ) throws SchemaRegistryException { try { SchemaMetadata metadata = registryClient . getLatestSchemaMetadata ( subject ) ; return metadata . getId ( ) ; } catch ( IOException | RestClientException e ) { throw new SchemaRegistryException ( e ) ; } }
Looks up schema id for the specified subject from the schema registry
@param subject subject for which schema Id must be looked up.
@return the schema id
@throws SchemaRegistryException if there is an error with the registry client
Looks up schema id for the specified subject from the schema registry