----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73239/ -----------------------------------------------------------
Review request for atlas, Madhan Neethiraj and Sarath Subramanian. Bugs: ATLAS-4204 https://issues.apache.org/jira/browse/ATLAS-4204 Repository: atlas Description ------- **Background** Please see JIRA. Terms and abbreviations used: - Database objects: Database, table, views, etc. - DDL: Data Definition Langugage. Database parlance. Operations performed on a database server that result in creation of objects that hold data. - DML: Data Manipulation Language. Database parlance. Operations performed on a database server that result in manipulation (add, update, delete) of data. These are performed using database objects that are already created. Hive hook is implemented by: - _HiveHook_ - _HiveMetastoreImpl_ - _BaseHiveEvent_ has 2 methods: - getHiveMetastoreEntities: Called by HMS events. - getHiveEntities: Called by HS2 events. **Approach** - Introduce a flag _skipDDL_ indicating if entities generated as part of DDL operation should be skipped by a hook. This flag is set as a configuration parameters: atlas.hive.hook.ignore.ddl.operations - Skip creation of Atlas's DDL entities when HS2 event is used. - Continue using HMS event processing unchanged. Diffs ----- addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/AtlasHiveHookContext.java 128647147 addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java 79e87c79d addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterDatabase.java d2623b363 addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRename.java 6961fa7c2 addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRenameCol.java 756a6089e addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/BaseHiveEvent.java 7c269ce53 addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateDatabase.java bf5f5620e addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateTable.java 63fc89424 addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/DropDatabase.java 20019d2ef addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/DropTable.java 440c08aff common/src/main/java/org/apache/atlas/utils/PathExtractorContext.java ce688e4e4 Diff: https://reviews.apache.org/r/73239/diff/1/ Testing ------- **Functional tests** - Used specific queries to exercise the affected code paths. - Verified messages going out of the hooks, onces posted on ATLAS_HOOK and the entities created within Atlas. **Volume test** Pending. **Unit test** Pending. Thanks, Ashutosh Mestry