-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sample deduplication connector #6847
Conversation
Signed-off-by: Raluca Popa <[email protected]>
Is this the first step? I didn't see build/packaging related content? |
It's more a basic connector implementation for deduplication that we used in our tests so far. I don't think we're ready to have it scenario based yet, just wanted to have it somewhere in github. It is placed in governce-action-connectors along with the other basic connector implementations for governance. Maybe we can discuss about moving them to a more proper place at a later time? |
@popa-raluca Thanks for clarifying - makes sense, I agree with you. It does bring up a question of how we want to handle meantime, but that's a longer term question |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with minor remark about the name, since this is remediation action perhaps name describing exactly the action (?) i.e. "QualifiedNamePeerDuplicateGovernanceActionConnector"
I see that you explain the purpose in the javadoc, I think this is more explicit.
Signed-off-by: Raluca Popa <[email protected]>
SearchProperties searchProperties = getSearchProperties(qualifiedName); | ||
List<OpenMetadataElement> elements = store.findMetadataElements(targetElement.getType().getTypeId(), | ||
null, searchProperties, null, null, null, | ||
null, false, true, new Date(), 0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JavaUtilDate: Date has a bad API that leads to bugs; prefer java.time.Instant or LocalDate.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
* @throws ConnectorCheckedException there is a problem within the governance action service. | ||
*/ | ||
@Override | ||
public void start() throws ConnectorCheckedException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnsynchronizedOverridesSynchronized: Unsynchronized method start overrides synchronized method in ConnectorBase
public void start() throws ConnectorCheckedException { | |
public synchronized void start() throws ConnectorCheckedException { |
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
PropertyCondition condition = new PropertyCondition(); | ||
PrimitiveTypePropertyValue primitivePropertyValue = new PrimitiveTypePropertyValue(); | ||
|
||
primitivePropertyValue.setPrimitiveTypeCategory(PrimitiveTypeCategory.OM_PRIMITIVE_TYPE_STRING); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 2 similar findings have been found in this PR
NULL_DEREFERENCE: object primitivePropertyValue.primitiveValue
last assigned on line 98 could be null and is dereferenced by call to setPrimitiveTypeCategory(...)
at line 100.
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/QualifiedNamePeerDuplicateGovernanceActionConnector.java | 60 |
open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/QualifiedNamePeerDuplicateGovernanceActionConnector.java | 62 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
SearchProperties searchProperties = getSearchProperties(qualifiedName); | ||
List<OpenMetadataElement> elements = store.findMetadataElements(targetElement.getType().getTypeId(), | ||
null, searchProperties, null, null, null, | ||
null, false, true, new Date(), 0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JavaUtilDate: Date has a bad API that leads to bugs; prefer java.time.Instant or LocalDate.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
* @throws ConnectorCheckedException there is a problem within the governance action service. | ||
*/ | ||
@Override | ||
public void start() throws ConnectorCheckedException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnsynchronizedOverridesSynchronized: Unsynchronized method start overrides synchronized method in ConnectorBase
public void start() throws ConnectorCheckedException { | |
public synchronized void start() throws ConnectorCheckedException { |
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
|
||
String qualifiedName = targetElement.getElementProperties().getPropertyValueMap().get(QUALIFIED_NAME_PROPERTY).valueAsString(); | ||
SearchProperties searchProperties = getSearchProperties(qualifiedName); | ||
List<OpenMetadataElement> elements = store.findMetadataElements(targetElement.getType().getTypeId(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 2 similar findings have been found in this PR
NULL_DEREFERENCE: object returned by targetElement.getType()
could be null and is dereferenced at line 62.
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/QualifiedNamePeerDuplicateGovernanceActionConnector.java | 60 |
open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/QualifiedNamePeerDuplicateGovernanceActionConnector.java | 100 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
Signed-off-by: Raluca Popa [email protected]
Add sample deduplication connector. Provides basic implementation for handling duplicate entities. The matching of the duplicates is made based on the qualified names of the entities.
Description
Related Issue(s)
Testing
Tested locally with GAF and DE OMAS
Release Notes & Documentation
Additional notes