commonlib/src/main/java/com/streamsets/pipeline/lib/util/AvroSchemaHelper.java
public int registerSchema(Schema schema, String subject) throws SchemaRegistryException {
    try {
      return schemaIdCache.get(subject + schema.hashCode(), () -> registryClient.register(subject, schema));
    } catch (ExecutionException  e) {
      throw new SchemaRegistryException(e);
    }
  }
public int registerSchema(Schema schema, String subject) throws SchemaRegistryException {
    try {
      return schemaIdCache.get(subject + schema.hashCode(), () -> registryClient.register(subject, schema));
    } catch (ExecutionException  e) {
      throw new SchemaRegistryException(e);
    }
  }
public int registerSchema ( Schema schema , String subject ) throws SchemaRegistryException { try { return schemaIdCache . get ( subject + schema . hashCode ( ) , ( ) -> registryClient . register ( subject , schema ) ) ; } catch ( ExecutionException e ) { throw new SchemaRegistryException ( e ) ; } }
Registers a parsed schema with the schema registry under the specified subject.
@param schema parsed avro schema
@param subject subject to register the schema under
@return schemaId if registration was successful
@throws SchemaRegistryException if there is an error with the registry client
Registers a parsed schema with the schema registry under the specified subject .