Skip to content

Commit

Permalink
Merge pull request #8371 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Fix karma point collection and open lineage publication
  • Loading branch information
mandy-chessell authored Sep 2, 2024
2 parents d8297d8 + 4ae052f commit 5580a37
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 34 deletions.
2 changes: 1 addition & 1 deletion CoreContentPackGUIDMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CoreContentPack.omarchive

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void processEvent(AssetManagerOutTopicEvent event)
try
{
String previousActionStatus = getActionStatus(event.getPreviousElementProperties());
String currentActionStatus = getActionStatus(event.getPreviousElementProperties());
String currentActionStatus = getActionStatus(event.getElementProperties());

/*
* Only output an event if the status has changed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public B getNewComplexBean(Class<B> beanClass,
UserIdentityElement userBean = new UserIdentityElement();
UserIdentityProperties userProperties = new UserIdentityProperties();

bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName));
userBean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName));

InstanceProperties entityProperties = new InstanceProperties(entity.getProperties());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -968,16 +968,16 @@ public B getActorProfileByGUID(String userId,
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
public B getActorProfileForUser(String userId,
String profileUserId,
String profileUserIdParameterName,
String typeName,
boolean forLineage,
boolean forDuplicateProcessing,
Date effectiveTime,
String methodName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
public EntityDetail getActorProfileEntityForUser(String userId,
String profileUserId,
String profileUserIdParameterName,
String typeName,
boolean forLineage,
boolean forDuplicateProcessing,
Date effectiveTime,
String methodName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
{
final String userGUIDParameterName = "userIdentity.getGUID";

Expand All @@ -997,36 +997,79 @@ public B getActorProfileForUser(String userId,

if (userIdentity != null)
{
EntityDetail entity = this.getAttachedEntity(userId,
userIdentity.getGUID(),
userGUIDParameterName,
OpenMetadataType.USER_IDENTITY_TYPE_NAME,
OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP_TYPE_GUID,
OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP_TYPE_NAME,
typeName,
1,
forLineage,
forDuplicateProcessing,
supportedZones,
effectiveTime,
methodName);

if (entity != null)
{
return getFullProfileBean(userId,
entity,
return this.getAttachedEntity(userId,
userIdentity.getGUID(),
userGUIDParameterName,
OpenMetadataType.USER_IDENTITY_TYPE_NAME,
OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP_TYPE_GUID,
OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP_TYPE_NAME,
typeName,
1,
forLineage,
forDuplicateProcessing,
supportedZones,
effectiveTime,
methodName);
}
}

return null;
}


/**
* Retrieve the profile metadata element with the supplied unique identifier.
*
* @param userId calling user
* @param profileUserId unique name of the linked user id
* @param profileUserIdParameterName parameter name of profileUserId
* @param typeName unique name of the type of the profile to retrieve
* @param forLineage the request is to support lineage retrieval this means entities with the Memento classification can be returned
* @param forDuplicateProcessing the request is for duplicate processing and so must not deduplicate
* @param effectiveTime the time that the retrieved elements must be effective for (null for any time, new Date() for now)
* @param methodName calling method
*
* @return matching metadata element
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
public B getActorProfileForUser(String userId,
String profileUserId,
String profileUserIdParameterName,
String typeName,
boolean forLineage,
boolean forDuplicateProcessing,
Date effectiveTime,
String methodName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
{
EntityDetail entity = this.getActorProfileEntityForUser(userId,
profileUserId,
profileUserIdParameterName,
typeName,
forLineage,
forDuplicateProcessing,
effectiveTime,
methodName);

if (entity != null)
{
return getFullProfileBean(userId,
entity,
typeName,
forLineage,
forDuplicateProcessing,
effectiveTime,
methodName);
}

return null;
}



/**
* Retrieve the profile metadata element with the supplied unique identifier.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public enum IntegrationConnectorDefinition
"OpenLineageFilePublisher",
"olfilepubnpa",
null,
null,
"logs/openlineage",
null,
60,
new DeployedImplementationType[]{DeployedImplementationType.FILE_FOLDER, DeployedImplementationType.DATA_FOLDER}),
Expand Down

0 comments on commit 5580a37

Please sign in to comment.