public class SchemaByDefinitionFetcher extends Object
| Modifier and Type | Field and Description |
|---|---|
protected @NonNull com.google.common.cache.LoadingCache<Schema,UUID> |
schemaDefinitionToVersionCache |
| Constructor and Description |
|---|
SchemaByDefinitionFetcher(AWSSchemaRegistryClient awsSchemaRegistryClient,
GlueSchemaRegistryConfiguration glueSchemaRegistryConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
UUID |
getORRegisterSchemaVersionId(@NonNull String schemaDefinition,
@NonNull String schemaName,
@NonNull String dataFormat,
@NonNull Map<String,String> metadata)
Get Schema Version ID by following below steps :
|
public SchemaByDefinitionFetcher(AWSSchemaRegistryClient awsSchemaRegistryClient, GlueSchemaRegistryConfiguration glueSchemaRegistryConfiguration)
public UUID getORRegisterSchemaVersionId(@NonNull @NonNull String schemaDefinition, @NonNull @NonNull String schemaName, @NonNull @NonNull String dataFormat, @NonNull @NonNull Map<String,String> metadata) throws AWSSchemaRegistryException
1) If schema version id exists in registry then get it from registry 2) If schema version id does not exist in registry then if auto registration is enabled then if schema exists but version doesn't exist then 2.1) Register schema version else if schema does not exist then 2.2) create schema and register schema version
schemaDefinition - Schema DefinitionschemaName - Schema NamedataFormat - Data Formatmetadata - metadata for schema versionAWSSchemaRegistryException - on any error while fetching the schema version IDCopyright © 2024. All rights reserved.