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
96d4d31d
Commit
96d4d31d
authored
Oct 16, 2017
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2213: Remove unused attributes from Hive hook
parent
32fa4be5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
HiveHook.java
...ge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
+8
-15
No files found.
addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
View file @
96d4d31d
...
...
@@ -37,6 +37,7 @@ import org.apache.hadoop.hive.conf.HiveConf;
import
org.apache.hadoop.hive.metastore.TableType
;
import
org.apache.hadoop.hive.metastore.api.Database
;
import
org.apache.hadoop.hive.metastore.api.FieldSchema
;
import
org.apache.hadoop.hive.ql.QueryPlan
;
import
org.apache.hadoop.hive.ql.hooks.Entity
;
import
org.apache.hadoop.hive.ql.hooks.Entity.Type
;
import
org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext
;
...
...
@@ -171,18 +172,20 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
// clone to avoid concurrent access
try
{
final
HiveEventContext
event
=
new
HiveEventContext
();
event
.
setInputs
(
hookContext
.
getInputs
());
event
.
setOutputs
(
hookContext
.
getOutputs
());
event
.
setHookType
(
hookContext
.
getHookType
());
final
UserGroupInformation
ugi
=
hookContext
.
getUgi
()
==
null
?
Utils
.
getUGI
()
:
hookContext
.
getUgi
();
final
UserGroupInformation
ugi
=
hookContext
.
getUgi
()
==
null
?
Utils
.
getUGI
()
:
hookContext
.
getUgi
();
final
QueryPlan
queryPlan
=
hookContext
.
getQueryPlan
();
event
.
setUgi
(
ugi
);
event
.
setUser
(
getUser
(
hookContext
.
getUserName
(),
hookContext
.
getUgi
()));
event
.
setOperation
(
OPERATION_MAP
.
get
(
hookContext
.
getOperationName
()));
event
.
setQueryId
(
hookContext
.
getQueryPlan
().
getQueryId
());
event
.
setQueryStr
(
hookContext
.
getQueryPlan
().
getQueryStr
());
event
.
setQueryStartTime
(
hookContext
.
getQueryPlan
().
getQueryStartTime
());
event
.
setQueryType
(
hookContext
.
getQueryPlan
().
getQueryPlan
().
getQueryType
());
event
.
setQueryId
(
queryPlan
.
getQueryId
());
event
.
setQueryStr
(
queryPlan
.
getQueryStr
());
event
.
setQueryStartTime
(
queryPlan
.
getQueryStartTime
());
event
.
setLineageInfo
(
hookContext
.
getLinfo
());
if
(
executor
==
null
)
{
...
...
@@ -1088,8 +1091,6 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
private
List
<
HookNotification
.
HookNotificationMessage
>
messages
=
new
ArrayList
<>();
private
String
queryType
;
public
void
setInputs
(
Set
<
ReadEntity
>
inputs
)
{
this
.
inputs
=
inputs
;
}
...
...
@@ -1126,10 +1127,6 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
this
.
queryStartTime
=
queryStartTime
;
}
public
void
setQueryType
(
String
queryType
)
{
this
.
queryType
=
queryType
;
}
public
void
setLineageInfo
(
LineageInfo
lineageInfo
){
try
{
this
.
lineageInfo
=
ColumnLineageUtils
.
buildLineageMap
(
lineageInfo
);
...
...
@@ -1175,10 +1172,6 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
return
queryStartTime
;
}
public
String
getQueryType
()
{
return
queryType
;
}
public
void
addMessage
(
HookNotification
.
HookNotificationMessage
message
)
{
messages
.
add
(
message
);
}
...
...
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