You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Sarath Subramanian <sa...@apache.org> on 2019/09/07 07:06:28 UTC

Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/
-----------------------------------------------------------

(Updated Sept. 7, 2019, 12:06 a.m.)


Review request for atlas, Sridhar K and Madhan Neethiraj.


Bugs: ATLAS-3405
    https://issues.apache.org/jira/browse/ATLAS-3405


Repository: atlas


Description
-------

Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:

 AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.


Diffs
-----

  common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
  webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 


Diff: https://reviews.apache.org/r/71447/diff/1/


Testing
-------

Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1384/console


Thanks,

Sarath Subramanian


Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/#review217632
-----------------------------------------------------------




intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java
Lines 162 (patched)
<https://reviews.apache.org/r/71447/#comment304922>

    isIncomplete() => getIsIncomplete() - similar to AtlasEntity. Json serializers look for 'getters' having name prefixed with 'get'; in such case, "isInComplete()" would be invisible to serializers and hence this field would not be serialized.



repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
Lines 167 (patched)
<https://reviews.apache.org/r/71447/#comment304923>

    - #167 can go inside the 'if' block at #169
    - normalize the attribute value, to ensure that its datatype is set appropriately
       Object attrValue = attribute.getAttributeType().getNormalizedValue(uniqueAttributes.get(attrName));


- Madhan Neethiraj


On Sept. 7, 2019, 7:06 a.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71447/
> -----------------------------------------------------------
> 
> (Updated Sept. 7, 2019, 7:06 a.m.)
> 
> 
> Review request for atlas, Sridhar K and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-3405
>     https://issues.apache.org/jira/browse/ATLAS-3405
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:
> 
>  AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
> Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
>   webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 
> 
> 
> Diff: https://reviews.apache.org/r/71447/diff/1/
> 
> 
> Testing
> -------
> 
> Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1384/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/#review217629
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
Lines 326 (patched)
<https://reviews.apache.org/r/71447/#comment304921>

    Using Integer, instead of String, can result in better performance. Value '0' be treated as 'false'; and other values as 'true'. Please review.



repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java
Line 41 (original), 45 (patched)
<https://reviews.apache.org/r/71447/#comment304920>

    Instead of referencing configuration directly here (i.e. #91), consider using:
      RequestContext.get().isCreateDummyEntityForNonExistingReference());
      
    And have populate RequestContext from:
    - NotificationHookConsumer.handleMessage()
    - AuditFilter.doFilter(), similar to call RequestContext.get().setDeleteType()


- Madhan Neethiraj


On Sept. 7, 2019, 7:06 a.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71447/
> -----------------------------------------------------------
> 
> (Updated Sept. 7, 2019, 7:06 a.m.)
> 
> 
> Review request for atlas, Sridhar K and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-3405
>     https://issues.apache.org/jira/browse/ATLAS-3405
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:
> 
>  AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
> Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
>   webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 
> 
> 
> Diff: https://reviews.apache.org/r/71447/diff/1/
> 
> 
> Testing
> -------
> 
> Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1384/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/#review217636
-----------------------------------------------------------


Fix it, then Ship it!





intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
Lines 50 (patched)
<https://reviews.apache.org/r/71447/#comment304928>

    - NOTIFICATION_CREATE_DUMMY_ENTITY_REFERENCE => NOTIFICATION_CREATE_SHELL_ENTITY_FOR_NON_EXISTING_REF("atlas.notification.consumer.create.shell.entity.for.non-existing.ref")
    - consider using 'true' as default value for NOTIFICATION_CREATE_SHELL_ENTITY_FOR_NON_EXISTING_REF
    - consider adding a configuration for REST APIs, with default as 'false' - like: REST_API_CREATE_SHELL_ENTITY_FOR_NON_EXISTING_REF("atlas.rest.create.shell.entity.for.non-existing.ref", false)



webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java
Lines 210 (patched)
<https://reviews.apache.org/r/71447/#comment304926>

    - consider using AtlasConfiguration.NOTIFICATION_CREATE_SHELL_ENTITY_FOR_NON_EXISTING_REF.getBoolean() - instead of reading from applicationProperties. So that the defaults are defined in a  single place.



webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java
Lines 68 (patched)
<https://reviews.apache.org/r/71447/#comment304927>

    Consider using  a different configuration for REST API - like: REST_API_CREATE_SHELL_ENTITY_FOR_NON_EXISTING_REF


- Madhan Neethiraj


On Sept. 7, 2019, 8:27 p.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71447/
> -----------------------------------------------------------
> 
> (Updated Sept. 7, 2019, 8:27 p.m.)
> 
> 
> Review request for atlas, Sridhar K and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-3405
>     https://issues.apache.org/jira/browse/ATLAS-3405
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:
> 
>  AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
> Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
>   intg/src/main/java/org/apache/atlas/AtlasConfiguration.java 9da51f516 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
>   server-api/src/main/java/org/apache/atlas/RequestContext.java d518609d3 
>   webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 
>   webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java f7df6b38f 
>   webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 54f7330da 
> 
> 
> Diff: https://reviews.apache.org/r/71447/diff/2/
> 
> 
> Testing
> -------
> 
> Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1385/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

Posted by Sarath Subramanian <sa...@apache.org>.

> On Sept. 8, 2019, 8:24 p.m., Madhan Neethiraj wrote:
> > repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
> > Line 1083 (original), 1063 (patched)
> > <https://reviews.apache.org/r/71447/diff/4-5/?file=2164322#file2164322line1083>
> >
> >     Shouldn't "value == INCOMPLETE_ENTITY_VALUE" be "value.equals(INCOMPLETE_ENTITY_VALUE)"?

yes, but it is safe to use '==' when value of integer is within the range -127 to 128 since Integer caches small integers. Anything out of this range will return false.

I will change it to equals().


- Sarath


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/#review217640
-----------------------------------------------------------


On Sept. 8, 2019, 4:22 p.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71447/
> -----------------------------------------------------------
> 
> (Updated Sept. 8, 2019, 4:22 p.m.)
> 
> 
> Review request for atlas, Sridhar K and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-3405
>     https://issues.apache.org/jira/browse/ATLAS-3405
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:
> 
>  AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
> Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
>   intg/src/main/java/org/apache/atlas/AtlasConfiguration.java 9da51f516 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
>   server-api/src/main/java/org/apache/atlas/RequestContext.java d518609d3 
>   webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 
>   webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java f7df6b38f 
>   webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 54f7330da 
> 
> 
> Diff: https://reviews.apache.org/r/71447/diff/5/
> 
> 
> Testing
> -------
> 
> Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1386/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/#review217640
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
Line 1083 (original), 1063 (patched)
<https://reviews.apache.org/r/71447/#comment304932>

    Shouldn't "value == INCOMPLETE_ENTITY_VALUE" be "value.equals(INCOMPLETE_ENTITY_VALUE)"?


- Madhan Neethiraj


On Sept. 8, 2019, 11:22 p.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71447/
> -----------------------------------------------------------
> 
> (Updated Sept. 8, 2019, 11:22 p.m.)
> 
> 
> Review request for atlas, Sridhar K and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-3405
>     https://issues.apache.org/jira/browse/ATLAS-3405
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:
> 
>  AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
> Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
>   intg/src/main/java/org/apache/atlas/AtlasConfiguration.java 9da51f516 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
>   server-api/src/main/java/org/apache/atlas/RequestContext.java d518609d3 
>   webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 
>   webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java f7df6b38f 
>   webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 54f7330da 
> 
> 
> Diff: https://reviews.apache.org/r/71447/diff/5/
> 
> 
> Testing
> -------
> 
> Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1386/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/
-----------------------------------------------------------

(Updated Sept. 8, 2019, 4:22 p.m.)


Review request for atlas, Sridhar K and Madhan Neethiraj.


Changes
-------

updated '1' to constant value 'INCOMPLETE_ENTITY_VALUE'


Bugs: ATLAS-3405
    https://issues.apache.org/jira/browse/ATLAS-3405


Repository: atlas


Description
-------

Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:

 AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.


Diffs (updated)
-----

  common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
  intg/src/main/java/org/apache/atlas/AtlasConfiguration.java 9da51f516 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
  server-api/src/main/java/org/apache/atlas/RequestContext.java d518609d3 
  webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 
  webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java f7df6b38f 
  webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 54f7330da 


Diff: https://reviews.apache.org/r/71447/diff/5/

Changes: https://reviews.apache.org/r/71447/diff/4-5/


Testing
-------

Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1386/console


Thanks,

Sarath Subramanian


Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/#review217637
-----------------------------------------------------------


Ship it!




Ship It!

- Madhan Neethiraj


On Sept. 8, 2019, 5:05 p.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71447/
> -----------------------------------------------------------
> 
> (Updated Sept. 8, 2019, 5:05 p.m.)
> 
> 
> Review request for atlas, Sridhar K and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-3405
>     https://issues.apache.org/jira/browse/ATLAS-3405
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:
> 
>  AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
> Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
>   intg/src/main/java/org/apache/atlas/AtlasConfiguration.java 9da51f516 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
>   server-api/src/main/java/org/apache/atlas/RequestContext.java d518609d3 
>   webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 
>   webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java f7df6b38f 
>   webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 54f7330da 
> 
> 
> Diff: https://reviews.apache.org/r/71447/diff/4/
> 
> 
> Testing
> -------
> 
> Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1386/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/
-----------------------------------------------------------

(Updated Sept. 8, 2019, 10:05 a.m.)


Review request for atlas, Sridhar K and Madhan Neethiraj.


Bugs: ATLAS-3405
    https://issues.apache.org/jira/browse/ATLAS-3405


Repository: atlas


Description
-------

Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:

 AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.


Diffs (updated)
-----

  common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
  intg/src/main/java/org/apache/atlas/AtlasConfiguration.java 9da51f516 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
  server-api/src/main/java/org/apache/atlas/RequestContext.java d518609d3 
  webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 
  webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java f7df6b38f 
  webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 54f7330da 


Diff: https://reviews.apache.org/r/71447/diff/4/

Changes: https://reviews.apache.org/r/71447/diff/3-4/


Testing
-------

Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1385/console


Thanks,

Sarath Subramanian


Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/
-----------------------------------------------------------

(Updated Sept. 8, 2019, 9:59 a.m.)


Review request for atlas, Sridhar K and Madhan Neethiraj.


Changes
-------

addressed review comments.


Bugs: ATLAS-3405
    https://issues.apache.org/jira/browse/ATLAS-3405


Repository: atlas


Description
-------

Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:

 AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.


Diffs (updated)
-----

  common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
  intg/src/main/java/org/apache/atlas/AtlasConfiguration.java 9da51f516 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
  server-api/src/main/java/org/apache/atlas/RequestContext.java d518609d3 
  webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 
  webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java f7df6b38f 
  webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 54f7330da 


Diff: https://reviews.apache.org/r/71447/diff/3/

Changes: https://reviews.apache.org/r/71447/diff/2-3/


Testing
-------

Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1385/console


Thanks,

Sarath Subramanian


Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/
-----------------------------------------------------------

(Updated Sept. 7, 2019, 1:27 p.m.)


Review request for atlas, Sridhar K and Madhan Neethiraj.


Bugs: ATLAS-3405
    https://issues.apache.org/jira/browse/ATLAS-3405


Repository: atlas


Description
-------

Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:

 AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.


Diffs
-----

  common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
  intg/src/main/java/org/apache/atlas/AtlasConfiguration.java 9da51f516 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
  server-api/src/main/java/org/apache/atlas/RequestContext.java d518609d3 
  webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 
  webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java f7df6b38f 
  webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 54f7330da 


Diff: https://reviews.apache.org/r/71447/diff/2/


Testing (updated)
-------

Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1385/console


Thanks,

Sarath Subramanian


Re: Review Request 71447: ATLAS-3405: Handling of references to non-existing entities in notifications

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71447/
-----------------------------------------------------------

(Updated Sept. 7, 2019, 1:26 p.m.)


Review request for atlas, Sridhar K and Madhan Neethiraj.


Changes
-------

addressed review comments


Bugs: ATLAS-3405
    https://issues.apache.org/jira/browse/ATLAS-3405


Repository: atlas


Description
-------

Hook notifications containing references to non-existing entities are dropped by Atlas server, with the following error:

 AtlasObjectId{guid='null', typeName='hive_db', uniqueAttributes={qualifiedName:db1@prod}} is not found
Instead of dropping such notifications, it will help to create an entity for the reference, and complete processing of the notifications. Such entities will only have its unique-attribute populated, however will capture the lineage and other relationships. When Atlas receives details of the entity in a subsequent notification, Atlas will have rest of the attributes populated as well.


Diffs (updated)
-----

  common/src/main/java/org/apache/atlas/repository/Constants.java 673a85cb9 
  intg/src/main/java/org/apache/atlas/AtlasConfiguration.java 9da51f516 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 659f7d586 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 26687bffc 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java a1776c843 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java a58c67059 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java 44df3512e 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c495dcc7a 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java 8ddbf748c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 02638c3ba 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/IDBasedEntityResolver.java fe76b3a89 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/UniqAttrBasedEntityResolver.java d400a1df9 
  server-api/src/main/java/org/apache/atlas/RequestContext.java d518609d3 
  webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java a844bcdf6 
  webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java f7df6b38f 
  webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 54f7330da 


Diff: https://reviews.apache.org/r/71447/diff/2/

Changes: https://reviews.apache.org/r/71447/diff/1-2/


Testing
-------

Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1384/console


Thanks,

Sarath Subramanian