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
65d95ebe
Commit
65d95ebe
authored
May 28, 2016
by
Suma Shivaprasad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-834 Handle exceptions from HiveHook executor.submit() (sumasai)
parent
56c13aa3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
29 deletions
+33
-29
HiveHook.java
...ge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
+32
-29
release-log.txt
release-log.txt
+1
-0
No files found.
addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
View file @
65d95ebe
...
@@ -154,36 +154,39 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
...
@@ -154,36 +154,39 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
@Override
@Override
public
void
run
(
final
HookContext
hookContext
)
throws
Exception
{
public
void
run
(
final
HookContext
hookContext
)
throws
Exception
{
// clone to avoid concurrent access
// clone to avoid concurrent access
try
{
final
HiveConf
conf
=
new
HiveConf
(
hookContext
.
getConf
());
final
HiveConf
conf
=
new
HiveConf
(
hookContext
.
getConf
());
final
HiveEventContext
event
=
new
HiveEventContext
();
final
HiveEventContext
event
=
new
HiveEventContext
();
event
.
setInputs
(
hookContext
.
getInputs
());
event
.
setInputs
(
hookContext
.
getInputs
());
event
.
setOutputs
(
hookContext
.
getOutputs
());
event
.
setOutputs
(
hookContext
.
getOutputs
());
event
.
setJsonPlan
(
getQueryPlan
(
hookContext
.
getConf
(),
hookContext
.
getQueryPlan
()));
event
.
setJsonPlan
(
getQueryPlan
(
hookContext
.
getConf
(),
hookContext
.
getQueryPlan
()));
event
.
setHookType
(
hookContext
.
getHookType
());
event
.
setHookType
(
hookContext
.
getHookType
());
event
.
setUgi
(
hookContext
.
getUgi
());
event
.
setUgi
(
hookContext
.
getUgi
());
event
.
setUser
(
getUser
(
hookContext
.
getUserName
()));
event
.
setUser
(
getUser
(
hookContext
.
getUserName
()));
event
.
setOperation
(
OPERATION_MAP
.
get
(
hookContext
.
getOperationName
()));
event
.
setOperation
(
OPERATION_MAP
.
get
(
hookContext
.
getOperationName
()));
event
.
setQueryId
(
hookContext
.
getQueryPlan
().
getQueryId
());
event
.
setQueryId
(
hookContext
.
getQueryPlan
().
getQueryId
());
event
.
setQueryStr
(
hookContext
.
getQueryPlan
().
getQueryStr
());
event
.
setQueryStr
(
hookContext
.
getQueryPlan
().
getQueryStr
());
event
.
setQueryStartTime
(
hookContext
.
getQueryPlan
().
getQueryStartTime
());
event
.
setQueryStartTime
(
hookContext
.
getQueryPlan
().
getQueryStartTime
());
event
.
setQueryType
(
hookContext
.
getQueryPlan
().
getQueryPlan
().
getQueryType
());
event
.
setQueryType
(
hookContext
.
getQueryPlan
().
getQueryPlan
().
getQueryType
());
boolean
sync
=
conf
.
get
(
CONF_SYNC
,
"false"
).
equals
(
"true"
);
boolean
sync
=
conf
.
get
(
CONF_SYNC
,
"false"
).
equals
(
"true"
);
if
(
sync
)
{
if
(
sync
)
{
fireAndForget
(
event
);
fireAndForget
(
event
);
}
else
{
}
else
{
executor
.
submit
(
new
Runnable
()
{
executor
.
submit
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
try
{
try
{
fireAndForget
(
event
);
fireAndForget
(
event
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
LOG
.
info
(
"Atlas hook failed"
,
e
);
LOG
.
error
(
"Atlas hook failed due to error "
,
e
);
}
}
}
}
});
});
}
}
catch
(
Throwable
t
)
{
LOG
.
error
(
"Submitting to thread pool failed due to error "
,
t
);
}
}
}
}
...
...
release-log.txt
View file @
65d95ebe
...
@@ -22,6 +22,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset
...
@@ -22,6 +22,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset
ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags)
ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags)
ALL CHANGES:
ALL CHANGES:
ATLAS-834 Handle exceptions from HiveHook executor.submit() (sumasai)
ATLAS-635 Process showing old entity name where as actual entity is renamed ( svimal2106 via sumasai )
ATLAS-635 Process showing old entity name where as actual entity is renamed ( svimal2106 via sumasai )
ATLAS-823 Atlas should use external HBase and SOLR (tbeerbower via shwethags)
ATLAS-823 Atlas should use external HBase and SOLR (tbeerbower via shwethags)
ATLAS-752 Column renames should retain traits/tags (svimal2106 via shwethags)
ATLAS-752 Column renames should retain traits/tags (svimal2106 via shwethags)
...
...
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