You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2018/11/30 01:33:01 UTC
atlas git commit: ATLAS-2982: import fails to create
classification-def - #2
Repository: atlas
Updated Branches:
refs/heads/master 18a4984a4 -> 9a5553731
ATLAS-2982: import fails to create classification-def - #2
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/9a555373
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/9a555373
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/9a555373
Branch: refs/heads/master
Commit: 9a5553731b3ace19b2bca05f91676ec61b33f338
Parents: 18a4984
Author: Madhan Neethiraj <ma...@apache.org>
Authored: Thu Nov 29 16:48:58 2018 -0800
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Thu Nov 29 17:32:47 2018 -0800
----------------------------------------------------------------------
.../java/org/apache/atlas/repository/impexp/ImportService.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/atlas/blob/9a555373/repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java b/repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java
index d06fd4a..a52c3f9 100644
--- a/repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java
+++ b/repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java
@@ -80,8 +80,6 @@ public class ImportService {
public AtlasImportResult run(ZipSource source, AtlasImportRequest request, String userName,
String hostName, String requestingIP) throws AtlasBaseException {
- RequestContext.get().setImportInProgress(true);
-
if (request == null) {
request = new AtlasImportRequest();
}
@@ -91,6 +89,8 @@ public class ImportService {
try {
LOG.info("==> import(user={}, from={}, request={})", userName, requestingIP, request);
+ RequestContext.get().setImportInProgress(true);
+
String transforms = MapUtils.isNotEmpty(request.getOptions()) ? request.getOptions().get(TRANSFORMS_KEY) : null;
setImportTransform(source, transforms);
@@ -110,6 +110,8 @@ public class ImportService {
throw new AtlasBaseException(excp);
} finally {
+ RequestContext.get().setImportInProgress(false);
+
source.close();
LOG.info("<== import(user={}, from={}): status={}", userName, requestingIP, result.getOperationStatus());
}