[ 
https://issues.apache.org/jira/browse/ATLAS-4105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17271420#comment-17271420
 ] 

Mandar Ambawane commented on ATLAS-4105:
----------------------------------------

Hi [~umesh.padashetty],

This is the behavior as per the code written for the *Legacy Attributes*.

The code flow goes like this:

While retrieving the *DELETED* "*hbase_column_family*" entity, 
Relationship Attributes are set in method 
*EntityGraphRetriever.mapVertexToRelationshipAttribute()*
In the same method there is one check for the Legacy Attribute.

 
{code:java}
if (attributeEndDef.getIsLegacyAttribute() && 
!entity.hasAttribute(attributeName)) { 
              entity.setAttribute(attributeName, toLegacyAttribute(ret));       
 
}{code}
 


If the current Relationship Attribute is Legacy Attribute then it is also set 
as Normal Attribute in the Entity.      

In this case, "*hbase_table*" is the Legacy Attribute.    

While setting this as Normal Attribute,
In method *EntityGraphRetriever.toLegacyAttribute(AtlasRelatedObjectId 
relatedObjId)*   There is one check.
{code:java}
if (relatedObjId.getRelationshipStatus() == DELETED 
&& relatedObjId.getEntityStatus() == AtlasEntity.Status.ACTIVE) {  
          ret = null;        
}{code}
 


While setting the Relationship Attribute for hbase_column_family, when 
"*hbase_table*" comes at this check, both the conditions get satisfied. 
 # The relationship between "*hbase_table*" and "*hbase_column_family*" is 
deleted when we delete the "*hbase_column_family*".
 # The entity "*hbase_table*" is still "*ACTIVE*".



And hence the value is set as *NULL* for the Normal Attribute "*table*" of an 
entity "*hbase_column_family*"    

Therefore, for the DELETED "hbase_column_family" entity, the Normal Attribute 
"table" is set to NULL and we are not able to see it.

CC: [~sarath] [~nixon] [~jayendrap]

> table details are set to null for a dropped hbase_column_family
> ---------------------------------------------------------------
>
>                 Key: ATLAS-4105
>                 URL: https://issues.apache.org/jira/browse/ATLAS-4105
>             Project: Atlas
>          Issue Type: Bug
>          Components:  atlas-core
>            Reporter: Umesh Padashetty
>            Assignee: Mandar Ambawane
>            Priority: Minor
>         Attachments: Screenshot 2021-01-20 at 12.19.22 AM.png, Screenshot 
> 2021-01-20 at 12.21.50 AM.png, Screenshot 2021-01-20 at 12.22.01 AM.png
>
>
> Table hbase_table_endlu has 2 column families, col_fam_kpgfu_2 is ACTIVE 
> whereas col_fam_kpgfu_1 is DELETED.
> On clicking the entities, it can be seen that for col_fam_kpgfu_2 which is 
> ACTIVE, the table info is set to hbase_table_endlu
> whereas for col_fam_kpgfu_1 which is DELETED, it is set to N/A (UI displays 
> null values as N/A)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to