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
e272a28e
Commit
e272a28e
authored
6 years ago
by
Maxim Neaga
Committed by
Madhan Neethiraj
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2958: updated hooks to log exceptions on all notification failures
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
243a4321
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
AtlasHook.java
...cation/src/main/java/org/apache/atlas/hook/AtlasHook.java
+9
-8
No files found.
notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
View file @
e272a28e
...
...
@@ -172,9 +172,8 @@ public abstract class AtlasHook {
return
;
}
final
int
maxAttempts
=
maxRetries
<
1
?
1
:
maxRetries
;
final
String
message
=
messages
.
toString
();
Exception
notificationFailure
=
null
;
final
int
maxAttempts
=
maxRetries
<
1
?
1
:
maxRetries
;
Exception
notificationFailure
=
null
;
for
(
int
numAttempt
=
1
;
numAttempt
<=
maxAttempts
;
numAttempt
++)
{
if
(
numAttempt
>
1
)
{
// retry attempt
...
...
@@ -214,14 +213,16 @@ public abstract class AtlasHook {
}
}
if
(
shouldLogFailedMessages
&&
notificationFailure
instanceof
NotificationException
)
{
final
List
<
String
>
failedMessages
=
((
NotificationException
)
notificationFailure
).
getFailedMessages
();
if
(
notificationFailure
!=
null
)
{
if
(
shouldLogFailedMessages
&&
notificationFailure
instanceof
NotificationException
)
{
final
List
<
String
>
failedMessages
=
((
NotificationException
)
notificationFailure
).
getFailedMessages
();
for
(
String
msg
:
failedMessages
)
{
logger
.
log
(
msg
);
for
(
String
msg
:
failedMessages
)
{
logger
.
log
(
msg
);
}
}
LOG
.
error
(
"Giving up after {} failed attempts to send notification to Atlas: {}"
,
maxAttempts
,
message
,
notificationFailure
);
LOG
.
error
(
"Giving up after {} failed attempts to send notification to Atlas: {}"
,
maxAttempts
,
message
s
.
toString
()
,
notificationFailure
);
}
}
...
...
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