Skip to content

Commit

Permalink
Add javadoc for actor catalog functions
Browse files Browse the repository at this point in the history
  • Loading branch information
malikdiarra committed Mar 3, 2022
1 parent e9052f2 commit 3e87f4d
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,16 @@ private Map<UUID, AirbyteCatalog> findCatalogByHash(final String catalogHash, fi
return result;
}

/**
* Store an Airbyte catalog in DB if it is not present already
*
* Checks in the config DB if the catalog is present already, if so returns it identifier. It is
* not present, it is inserted in DB with a new identifier and that identifier is returned.
*
* @param airbyteCatalog An Airbyte catalog to cache
* @param context
* @return the db identifier for the cached catalog.
*/
private UUID getOrInsertActorCatalog(final AirbyteCatalog airbyteCatalog,
final DSLContext context) {
final OffsetDateTime timestamp = OffsetDateTime.now();
Expand Down Expand Up @@ -694,6 +704,24 @@ public Optional<AirbyteCatalog> getActorCatalog(final UUID actorId,

}

/**
* Stores source catalog information.
*
* This function is called each time the schema of a source is fetched. This can occur because
* the source is set up for the first time, because the configuration or version of the connector
* changed or because the user explicitly requested a schema refresh.
* Schemas are stored separately and de-duplicated upon insertion.
* Once a schema has been successfully stored, a call to getActorCatalog(sourceId,
* connectionVersion, configurationHash) will return the most recent schema stored for those
* parameters.
*
* @param catalog
* @param sourceId
* @param connectorVersion
* @param configurationHash
* @return The identifier (UUID) of the fetch event inserted in the database
* @throws IOException
*/
public UUID writeActorCatalogFetchEvent(final AirbyteCatalog catalog,
final UUID sourceId,
final String connectorVersion,
Expand Down

0 comments on commit 3e87f4d

Please sign in to comment.