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
67a7367a
Commit
67a7367a
authored
5 years ago
by
Mandar Ambawane
Committed by
Sarath Subramanian
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3562: Hive metadata has the same classification multiple times
Signed-off-by:
Sarath Subramanian
<
sarath@apache.org
>
parent
7423addb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
AtlasEntityStoreV2.java
...e/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
+8
-4
No files found.
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
View file @
67a7367a
...
...
@@ -594,6 +594,8 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
throw
new
AtlasBaseException
(
AtlasErrorCode
.
INVALID_PARAMETERS
,
"classifications(s) not specified"
);
}
GraphTransactionInterceptor
.
lockObjectAndReleasePostCommit
(
guid
);
AtlasVertex
entityVertex
=
AtlasGraphUtilsV2
.
findByGuid
(
guid
);
if
(
entityVertex
==
null
)
{
...
...
@@ -611,7 +613,6 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
context
.
cacheEntity
(
guid
,
entityVertex
,
typeRegistry
.
getEntityTypeByName
(
entityHeader
.
getTypeName
()));
GraphTransactionInterceptor
.
lockObjectAndReleasePostCommit
(
guid
);
for
(
AtlasClassification
classification
:
classifications
)
{
validateAndNormalize
(
classification
);
...
...
@@ -638,6 +639,8 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
throw
new
AtlasBaseException
(
AtlasErrorCode
.
INVALID_PARAMETERS
,
"classifications(s) not specified"
);
}
GraphTransactionInterceptor
.
lockObjectAndReleasePostCommit
(
guid
);
AtlasVertex
entityVertex
=
AtlasGraphUtilsV2
.
findByGuid
(
guid
);
if
(
entityVertex
==
null
)
{
...
...
@@ -654,7 +657,6 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
context
.
cacheEntity
(
guid
,
entityVertex
,
typeRegistry
.
getEntityTypeByName
(
entityHeader
.
getTypeName
()));
GraphTransactionInterceptor
.
lockObjectAndReleasePostCommit
(
guid
);
for
(
AtlasClassification
classification
:
classifications
)
{
validateAndNormalize
(
classification
);
...
...
@@ -679,6 +681,8 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
EntityMutationContext
context
=
new
EntityMutationContext
();
GraphTransactionInterceptor
.
lockObjectAndReleasePostCommit
(
guids
);
for
(
String
guid
:
guids
)
{
AtlasVertex
entityVertex
=
AtlasGraphUtilsV2
.
findByGuid
(
guid
);
...
...
@@ -694,7 +698,6 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
context
.
cacheEntity
(
guid
,
entityVertex
,
typeRegistry
.
getEntityTypeByName
(
entityHeader
.
getTypeName
()));
}
GraphTransactionInterceptor
.
lockObjectAndReleasePostCommit
(
guids
);
validateAndNormalize
(
classification
);
...
...
@@ -723,6 +726,8 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
throw
new
AtlasBaseException
(
AtlasErrorCode
.
INVALID_PARAMETERS
,
"classifications not specified"
);
}
GraphTransactionInterceptor
.
lockObjectAndReleasePostCommit
(
guid
);
AtlasEntityHeader
entityHeader
=
entityRetriever
.
toAtlasEntityHeaderWithClassifications
(
guid
);
// verify authorization only for removal of directly associated classification and not propagated one.
...
...
@@ -736,7 +741,6 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
LOG
.
debug
(
"Deleting classification={} from entity={}"
,
classificationName
,
guid
);
}
GraphTransactionInterceptor
.
lockObjectAndReleasePostCommit
(
guid
);
entityGraphMapper
.
deleteClassification
(
guid
,
classificationName
,
associatedEntityGuid
);
}
...
...
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