atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashutosh Mestry via Review Board <nore...@reviews.apache.org>
Subject Re: Review Request 71831: ATLAS-3539 :- Difference between hive_db information sent to ATLAS_HOOK created by beeline vs spark-shell
Date Wed, 27 Nov 2019 17:22:48 GMT

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




addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateDatabase.java
Lines 63 (patched)
<https://reviews.apache.org/r/71831/#comment306710>

    Comment: Is _getMetastoreHandler_ guaranteed to be present?
    
    I am not entirely sure if this line can be:
    
    _db = context.getMetastoreHandler() != null ? context.getMetastoreHandler().get_database(db.getName())
: null;
    _


- Ashutosh Mestry


On Nov. 27, 2019, 11:08 a.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71831/
> -----------------------------------------------------------
> 
> (Updated Nov. 27, 2019, 11:08 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nixon Rodrigues, and Sarath
Subramanian.
> 
> 
> Bugs: ATLAS-3539
>     https://issues.apache.org/jira/browse/ATLAS-3539
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Issue:- Difference in information sent to ATLAS_HOOK while database creation from Beeline
and Spark.
> 
> Observation:-
> When we fetch database entity by MetastoreEvent object, we don't get ownerType attribute.
> But when we fetch database entity by MetastoreHandler object, we get ownerType attribute
for the database.
> 
> Fix:-
> At the time of Table creation from the Spark-Client, our code fetches Database object
by using MetastoreHandler, there we can get ownerType in Database.
> Therefore here I have used MetastoreHandler object to fetch Database object.
> 
> Also handled the description attribute null and empty case.
> 
> 
> Diffs
> -----
> 
>   addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/BaseHiveEvent.java
851582c 
>   addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateDatabase.java
7bea779 
> 
> 
> Diff: https://reviews.apache.org/r/71831/diff/1/
> 
> 
> Testing
> -------
> 
> Manual testing done as follwos
> 1. Database created from beeling client.
> 2. Cheked for the json sent to ATLAS-HOOK, here attribute ownerType was present.
> 3. Database create from Spark client.
> 4. Checked for the json sent to ATLAS-HOOK, here attribute ownerType was present.
> 
> PreCommit build is successful.
> https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/1565/console
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message