----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/71831/#review218825 -----------------------------------------------------------
addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/BaseHiveEvent.java Lines 317 (patched) <https://reviews.apache.org/r/71831/#comment306708> Consider using StringUtils.isNotEmpty(db.getDescription()) addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateDatabase.java Line 62 (original), 62 (patched) <https://reviews.apache.org/r/71831/#comment306709> This method, getHiveMetastoreEntities(), is called only when context.isMetastoreHook() is true - see callers in CreateDatabase/AlterDatabase. Hence 'if' at #62 is not necessary. Please review and update. - Madhan Neethiraj 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 > >
