Commit 9a555373 by Madhan Neethiraj

ATLAS-2982: import fails to create classification-def - #2

parent 18a4984a
...@@ -80,8 +80,6 @@ public class ImportService { ...@@ -80,8 +80,6 @@ public class ImportService {
public AtlasImportResult run(ZipSource source, AtlasImportRequest request, String userName, public AtlasImportResult run(ZipSource source, AtlasImportRequest request, String userName,
String hostName, String requestingIP) throws AtlasBaseException { String hostName, String requestingIP) throws AtlasBaseException {
RequestContext.get().setImportInProgress(true);
if (request == null) { if (request == null) {
request = new AtlasImportRequest(); request = new AtlasImportRequest();
} }
...@@ -91,6 +89,8 @@ public class ImportService { ...@@ -91,6 +89,8 @@ public class ImportService {
try { try {
LOG.info("==> import(user={}, from={}, request={})", userName, requestingIP, request); 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; String transforms = MapUtils.isNotEmpty(request.getOptions()) ? request.getOptions().get(TRANSFORMS_KEY) : null;
setImportTransform(source, transforms); setImportTransform(source, transforms);
...@@ -110,6 +110,8 @@ public class ImportService { ...@@ -110,6 +110,8 @@ public class ImportService {
throw new AtlasBaseException(excp); throw new AtlasBaseException(excp);
} finally { } finally {
RequestContext.get().setImportInProgress(false);
source.close(); source.close();
LOG.info("<== import(user={}, from={}): status={}", userName, requestingIP, result.getOperationStatus()); LOG.info("<== import(user={}, from={}): status={}", userName, requestingIP, result.getOperationStatus());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment