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
0a6d098c
Commit
0a6d098c
authored
Aug 14, 2019
by
Saqeeb Shaikh
Committed by
Sarath Subramanian
Aug 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3360: Duplicate audits in atlas when HMS and hive hook is enabled.
Signed-off-by:
Sarath Subramanian
<
sarath@apache.org
>
parent
5ee49fde
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
AtlasEntityStoreV2.java
...e/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
+6
-0
RequestContext.java
...er-api/src/main/java/org/apache/atlas/RequestContext.java
+6
-0
No files found.
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
View file @
0a6d098c
...
@@ -839,7 +839,13 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
...
@@ -839,7 +839,13 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
}
}
if
(
entitiesToSkipUpdate
!=
null
)
{
if
(
entitiesToSkipUpdate
!=
null
)
{
// remove entitiesToSkipUpdate from EntityMutationContext
context
.
getUpdatedEntities
().
removeAll
(
entitiesToSkipUpdate
);
context
.
getUpdatedEntities
().
removeAll
(
entitiesToSkipUpdate
);
// remove entitiesToSkipUpdate from RequestContext
for
(
AtlasEntity
entity
:
entitiesToSkipUpdate
)
{
RequestContext
.
get
().
removeEntityUpdate
(
entity
);
}
}
}
// Check if authorized to update entities
// Check if authorized to update entities
...
...
server-api/src/main/java/org/apache/atlas/RequestContext.java
View file @
0a6d098c
...
@@ -189,6 +189,12 @@ public class RequestContext {
...
@@ -189,6 +189,12 @@ public class RequestContext {
}
}
}
}
public
void
removeEntityUpdate
(
AtlasEntity
entity
)
{
if
(
entity
!=
null
&&
entity
.
getGuid
()
!=
null
)
{
updatedEntities
.
remove
(
entity
.
getGuid
());
}
}
public
void
recordEntityDelete
(
AtlasEntityHeader
entity
)
{
public
void
recordEntityDelete
(
AtlasEntityHeader
entity
)
{
if
(
entity
!=
null
&&
entity
.
getGuid
()
!=
null
)
{
if
(
entity
!=
null
&&
entity
.
getGuid
()
!=
null
)
{
deletedEntities
.
put
(
entity
.
getGuid
(),
entity
);
deletedEntities
.
put
(
entity
.
getGuid
(),
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