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
47f2e77b
Commit
47f2e77b
authored
Jan 16, 2020
by
Sarath Subramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3590: Hive hook should ignore capturing lineage for temporary tables in CTAS queries
parent
0ac95349
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
HiveHook.java
...ge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
+1
-1
BaseHiveEvent.java
...java/org/apache/atlas/hive/hook/events/BaseHiveEvent.java
+7
-3
CreateHiveProcess.java
.../org/apache/atlas/hive/hook/events/CreateHiveProcess.java
+6
-3
No files found.
addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
View file @
47f2e77b
...
...
@@ -201,7 +201,7 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
case
EXPORT:
case
IMPORT:
case
QUERY:
event
=
new
CreateHiveProcess
(
context
);
event
=
new
CreateHiveProcess
(
context
,
true
);
break
;
case
ALTERTABLE_FILEFORMAT:
...
...
addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/BaseHiveEvent.java
View file @
47f2e77b
...
...
@@ -230,14 +230,14 @@ public abstract class BaseHiveEvent {
}
}
protected
AtlasEntity
getInputOutputEntity
(
Entity
entity
,
AtlasEntityExtInfo
entityExtInfo
)
throws
Exception
{
protected
AtlasEntity
getInputOutputEntity
(
Entity
entity
,
AtlasEntityExtInfo
entityExtInfo
,
boolean
skipTempTables
)
throws
Exception
{
AtlasEntity
ret
=
null
;
switch
(
entity
.
getType
())
{
case
TABLE:
case
PARTITION:
case
DFS_DIR:
{
ret
=
toAtlasEntity
(
entity
,
entityExtInfo
);
ret
=
toAtlasEntity
(
entity
,
entityExtInfo
,
skipTempTables
);
}
break
;
}
...
...
@@ -245,7 +245,7 @@ public abstract class BaseHiveEvent {
return
ret
;
}
protected
AtlasEntity
toAtlasEntity
(
Entity
entity
,
AtlasEntityExtInfo
entityExtInfo
)
throws
Exception
{
protected
AtlasEntity
toAtlasEntity
(
Entity
entity
,
AtlasEntityExtInfo
entityExtInfo
,
boolean
skipTempTables
)
throws
Exception
{
AtlasEntity
ret
=
null
;
switch
(
entity
.
getType
())
{
...
...
@@ -271,6 +271,10 @@ public abstract class BaseHiveEvent {
}
if
(!
skipTable
)
{
skipTable
=
skipTempTables
&&
entity
.
getTable
().
isTemporary
();
}
if
(!
skipTable
)
{
Table
table
=
getHive
().
getTable
(
dbName
,
tableName
);
ret
=
toTableEntity
(
table
,
entityExtInfo
);
...
...
addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateHiveProcess.java
View file @
47f2e77b
...
...
@@ -49,9 +49,12 @@ import java.util.Set;
public
class
CreateHiveProcess
extends
BaseHiveEvent
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
CreateHiveProcess
.
class
);
private
final
boolean
skipTempTables
;
public
CreateHiveProcess
(
AtlasHiveHookContext
context
)
{
public
CreateHiveProcess
(
AtlasHiveHookContext
context
,
boolean
skipTempTables
)
{
super
(
context
);
this
.
skipTempTables
=
skipTempTables
;
}
@Override
...
...
@@ -84,7 +87,7 @@ public class CreateHiveProcess extends BaseHiveEvent {
continue
;
}
AtlasEntity
entity
=
getInputOutputEntity
(
input
,
ret
);
AtlasEntity
entity
=
getInputOutputEntity
(
input
,
ret
,
skipTempTables
);
if
(!
input
.
isDirect
())
{
continue
;
...
...
@@ -104,7 +107,7 @@ public class CreateHiveProcess extends BaseHiveEvent {
continue
;
}
AtlasEntity
entity
=
getInputOutputEntity
(
output
,
ret
);
AtlasEntity
entity
=
getInputOutputEntity
(
output
,
ret
,
skipTempTables
);
if
(
entity
!=
null
)
{
outputs
.
add
(
entity
);
...
...
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