Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
be9df1c3
Commit
be9df1c3
authored
May 24, 2019
by
Le Ma
Committed by
Sarath Subramanian
May 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3229 DDL should not capture DML queries
Signed-off-by:
Sarath Subramanian
<
sarath@apache.org
>
parent
e21f569f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
9 deletions
+98
-9
CreateHiveProcess.java
.../org/apache/atlas/hive/hook/events/CreateHiveProcess.java
+9
-1
HiveHookIT.java
.../src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
+89
-8
No files found.
addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateHiveProcess.java
View file @
be9df1c3
...
...
@@ -109,7 +109,8 @@ public class CreateHiveProcess extends BaseHiveEvent {
outputs
.
add
(
entity
);
}
if
(
entity
!=
null
&&
!
context
.
isMetastoreHook
())
{
if
(
isDdlOperation
(
entity
))
{
AtlasEntity
ddlEntity
=
createHiveDDLEntity
(
entity
);
if
(
ddlEntity
!=
null
)
{
...
...
@@ -277,4 +278,11 @@ public class CreateHiveProcess extends BaseHiveEvent {
return
ret
;
}
private
boolean
isDdlOperation
(
AtlasEntity
entity
)
{
return
entity
!=
null
&&
!
context
.
isMetastoreHook
()
&&
(
context
.
getHiveOperation
().
equals
(
HiveOperation
.
CREATETABLE_AS_SELECT
)
||
context
.
getHiveOperation
().
equals
(
HiveOperation
.
CREATEVIEW
)
||
context
.
getHiveOperation
().
equals
(
HiveOperation
.
ALTERVIEW_AS
));
}
}
addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
View file @
be9df1c3
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment