You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by am...@apache.org on 2017/09/13 03:26:39 UTC
atlas git commit: ATLAS-2129: Addressed Case Where Abrupt Shutdown of
Atlas During Import Retains Entities Imported Before Shutdown
Repository: atlas
Updated Branches:
refs/heads/master 2acf41fd1 -> 636a62137
ATLAS-2129: Addressed Case Where Abrupt Shutdown of Atlas During Import Retains Entities Imported Before Shutdown
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/636a6213
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/636a6213
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/636a6213
Branch: refs/heads/master
Commit: 636a6213745f3abf039253b9ff96d6b5a9461dbf
Parents: 2acf41f
Author: ashutoshm <am...@hortonworks.com>
Authored: Tue Sep 12 20:26:29 2017 -0700
Committer: ashutoshm <am...@hortonworks.com>
Committed: Tue Sep 12 20:26:29 2017 -0700
----------------------------------------------------------------------
.../atlas/repository/store/graph/v1/AtlasEntityStoreV1.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/atlas/blob/636a6213/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java
index 1c168b4..dc6416a 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java
@@ -147,7 +147,6 @@ public class AtlasEntityStoreV1 implements AtlasEntityStore {
}
@Override
- @GraphTransaction
public EntityMutationResponse bulkImport(EntityImportStream entityStream, AtlasImportResult importResult) throws AtlasBaseException {
if (LOG.isDebugEnabled()) {
LOG.debug("==> bulkImport()");
@@ -175,7 +174,7 @@ public class AtlasEntityStoreV1 implements AtlasEntityStore {
AtlasEntityStreamForImport oneEntityStream = new AtlasEntityStreamForImport(entityWithExtInfo, entityStream);
try {
- EntityMutationResponse resp = createOrUpdate(oneEntityStream, false, true);
+ EntityMutationResponse resp = createOrUpdateForImport(oneEntityStream);
if (resp.getGuidAssignments() != null) {
ret.getGuidAssignments().putAll(resp.getGuidAssignments());
@@ -288,6 +287,11 @@ public class AtlasEntityStoreV1 implements AtlasEntityStore {
return createOrUpdate(entityStream, isPartialUpdate, false);
}
+ @GraphTransaction
+ private EntityMutationResponse createOrUpdateForImport(EntityStream entityStream) throws AtlasBaseException {
+ return createOrUpdate(entityStream, false, true);
+ }
+
@Override
@GraphTransaction
public EntityMutationResponse updateByUniqueAttributes(AtlasEntityType entityType, Map<String, Object> uniqAttributes,