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
f912aa89
Commit
f912aa89
authored
Aug 05, 2019
by
Ashutosh Mestry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3050: DataAccess Save error handling. Picked from branch-0.8.
parent
fb54a29d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
DataAccess.java
...main/java/org/apache/atlas/repository/ogm/DataAccess.java
+1
-8
No files found.
repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java
View file @
f912aa89
...
@@ -72,10 +72,6 @@ public class DataAccess {
...
@@ -72,10 +72,6 @@ public class DataAccess {
AtlasEntityWithExtInfo
entityWithExtInfo
=
dto
.
toEntityWithExtInfo
(
obj
);
AtlasEntityWithExtInfo
entityWithExtInfo
=
dto
.
toEntityWithExtInfo
(
obj
);
EntityMutationResponse
entityMutationResponse
=
entityStore
.
createOrUpdate
(
new
AtlasEntityStream
(
entityWithExtInfo
),
false
);
EntityMutationResponse
entityMutationResponse
=
entityStore
.
createOrUpdate
(
new
AtlasEntityStream
(
entityWithExtInfo
),
false
);
if
(
noEntityMutation
(
entityMutationResponse
))
{
throw
new
AtlasBaseException
(
AtlasErrorCode
.
DATA_ACCESS_SAVE_FAILED
,
obj
.
toString
());
}
// Update GUID assignment for newly created entity
// Update GUID assignment for newly created entity
if
(
CollectionUtils
.
isNotEmpty
(
entityMutationResponse
.
getCreatedEntities
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
entityMutationResponse
.
getCreatedEntities
()))
{
String
assignedGuid
=
entityMutationResponse
.
getGuidAssignments
().
get
(
obj
.
getGuid
());
String
assignedGuid
=
entityMutationResponse
.
getGuidAssignments
().
get
(
obj
.
getGuid
());
...
@@ -263,8 +259,5 @@ public class DataAccess {
...
@@ -263,8 +259,5 @@ public class DataAccess {
}
}
}
}
// Helper functions
private
boolean
noEntityMutation
(
EntityMutationResponse
er
)
{
return
er
==
null
||
(
CollectionUtils
.
isEmpty
(
er
.
getCreatedEntities
())
&&
CollectionUtils
.
isEmpty
(
er
.
getUpdatedEntities
()));
}
}
}
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