atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject atlas git commit: ATLAS-2017: updated import API to make request parameter optional (#2 - fix for unit test failure)
Date Thu, 03 Aug 2017 07:02:40 GMT
Repository: atlas
Updated Branches:
  refs/heads/0.8-incubating a88c7dc24 -> 122b55672


ATLAS-2017: updated import API to make request parameter optional (#2 - fix for unit test
failure)


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/122b5567
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/122b5567
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/122b5567

Branch: refs/heads/0.8-incubating
Commit: 122b55672a3931bfbf39ce92233c84af80c56a03
Parents: a88c7dc
Author: Madhan Neethiraj <madhan@apache.org>
Authored: Wed Aug 2 23:50:51 2017 -0700
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Thu Aug 3 00:02:07 2017 -0700

----------------------------------------------------------------------
 .../org/apache/atlas/repository/impexp/ImportService.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/122b5567/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 efe7687..bbe9ed0 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
@@ -60,15 +60,17 @@ public class ImportService {
         return run(source, null, userName, hostName, requestingIP);
     }
 
+
     public AtlasImportResult run(ZipSource source, AtlasImportRequest request, String userName,
                                  String hostName, String requestingIP) throws AtlasBaseException
{
+        if (request == null) {
+            request = new AtlasImportRequest();
+        }
+
         AtlasImportResult result = new AtlasImportResult(request, userName, requestingIP,
hostName, System.currentTimeMillis());
 
         try {
             LOG.info("==> import(user={}, from={})", userName, requestingIP);
-            if (request == null) {
-                request = new AtlasImportRequest();
-            }
 
             String transforms = MapUtils.isNotEmpty(request.getOptions()) ? request.getOptions().get(AtlasImportRequest.TRANSFORMS_KEY)
: null;
 


Mime
View raw message