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
96f2c299
Commit
96f2c299
authored
Aug 30, 2018
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2844: added eventTime field in EntityNotificationV2
parent
56eefb2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
EntityNotification.java
...g/apache/atlas/model/notification/EntityNotification.java
+16
-1
EntityNotificationListenerV2.java
...ache/atlas/notification/EntityNotificationListenerV2.java
+1
-1
No files found.
intg/src/main/java/org/apache/atlas/model/notification/EntityNotification.java
View file @
96f2c299
...
...
@@ -105,16 +105,22 @@ public class EntityNotification implements Serializable {
private
AtlasEntityHeader
entity
;
private
OperationType
operationType
;
private
long
eventTime
;
public
EntityNotificationV2
()
{
super
(
ENTITY_NOTIFICATION_V2
);
this
(
null
,
null
,
System
.
currentTimeMillis
()
);
}
public
EntityNotificationV2
(
AtlasEntityHeader
entity
,
OperationType
operationType
)
{
this
(
entity
,
operationType
,
System
.
currentTimeMillis
());
}
public
EntityNotificationV2
(
AtlasEntityHeader
entity
,
OperationType
operationType
,
long
eventTime
)
{
super
(
ENTITY_NOTIFICATION_V2
);
setEntity
(
entity
);
setOperationType
(
operationType
);
setEventTime
(
eventTime
);
}
public
AtlasEntityHeader
getEntity
()
{
...
...
@@ -133,6 +139,14 @@ public class EntityNotification implements Serializable {
this
.
operationType
=
operationType
;
}
public
long
getEventTime
()
{
return
eventTime
;
}
public
void
setEventTime
(
long
eventTime
)
{
this
.
eventTime
=
eventTime
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
...
...
@@ -163,6 +177,7 @@ public class EntityNotification implements Serializable {
sb
.
append
(
entity
);
}
sb
.
append
(
", operationType="
).
append
(
operationType
);
sb
.
append
(
", eventTime="
).
append
(
eventTime
);
sb
.
append
(
"}"
);
return
sb
;
...
...
webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java
View file @
96f2c299
...
...
@@ -125,7 +125,7 @@ public class EntityNotificationListenerV2 implements EntityChangeListenerV2 {
continue
;
}
messages
.
add
(
new
EntityNotificationV2
(
toNotificationHeader
(
entity
),
operationType
));
messages
.
add
(
new
EntityNotificationV2
(
toNotificationHeader
(
entity
),
operationType
,
RequestContext
.
get
().
getRequestTime
()
));
}
if
(!
messages
.
isEmpty
())
{
...
...
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