[1/2] atlas git commit: ATLAS-2811: Skip Lineage Export option.

2018-10-09 Thread amestry
Repository: atlas
Updated Branches:
  refs/heads/master 831ad0142 -> b37154f87


ATLAS-2811: Skip Lineage Export option.


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

Branch: refs/heads/master
Commit: 4ff572815318772be6842ec93331f07c7e006bbd
Parents: 831ad01
Author: Ashutosh Mestry 
Authored: Mon Aug 6 13:57:05 2018 -0700
Committer: Ashutosh Mestry 
Committed: Tue Oct 9 10:48:52 2018 -0700

--
 .../atlas/model/impexp/AtlasExportRequest.java  |   1 +
 .../atlas/repository/impexp/ExportService.java  | 104 +---
 .../repository/impexp/ExportTypeProcessor.java  | 159 +++
 .../atlas/repository/util/UniqueList.java   |  73 +
 .../clusterinfo/ClusterServiceTest.java | 118 --
 .../repository/impexp/ClusterServiceTest.java   | 118 ++
 .../repository/impexp/ExportImportTestBase.java |  26 ++-
 .../impexp/ExportSkipLineageTest.java   | 125 +++
 .../impexp/ReplicationEntityAttributeTest.java  |  17 --
 .../atlas/repository/impexp/UniqueListTest.java |  11 +-
 .../impexp/ZipFileResourceTestUtils.java|  17 ++
 11 files changed, 562 insertions(+), 207 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/atlas/blob/4ff57281/intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java
--
diff --git 
a/intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java 
b/intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java
index 23d474c..93be953 100644
--- a/intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java
+++ b/intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java
@@ -48,6 +48,7 @@ public class AtlasExportRequest implements Serializable {
 
 public static final String OPTION_FETCH_TYPE= "fetchType";
 public static final String OPTION_ATTR_MATCH_TYPE   = "matchType";
+public static final String OPTION_SKIP_LINEAGE  = 
"skipLineage";
 public static final String OPTION_KEY_REPLICATED_TO = 
"replicatedTo";
 public static final String FETCH_TYPE_FULL  = "full";
 public static final String FETCH_TYPE_CONNECTED = "connected";

http://git-wip-us.apache.org/repos/asf/atlas/blob/4ff57281/repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
--
diff --git 
a/repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
 
b/repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
index 3ab7964..f74b3cd 100644
--- 
a/repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
@@ -38,6 +38,7 @@ import 
org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef;
 import org.apache.atlas.model.typedef.AtlasTypesDef;
 import org.apache.atlas.repository.graphdb.AtlasGraph;
 import org.apache.atlas.repository.store.graph.v2.EntityGraphRetriever;
+import org.apache.atlas.repository.util.UniqueList;
 import org.apache.atlas.type.AtlasArrayType;
 import org.apache.atlas.type.AtlasClassificationType;
 import org.apache.atlas.type.AtlasEntityType;
@@ -68,11 +69,17 @@ import static 
org.apache.atlas.model.impexp.AtlasExportRequest.*;
 public class ExportService {
 private static final Logger LOG = 
LoggerFactory.getLogger(ExportService.class);
 
+private static final String PROPERTY_GUID = "__guid";
+private static final String PROPERTY_IS_PROCESS = "isProcess";
+
+
 private final AtlasTypeRegistry typeRegistry;
-private AuditsWriter auditsWriter;
+private final String QUERY_BINDING_START_GUID = "startGuid";
+private   AuditsWriter  auditsWriter;
 private final AtlasGraphatlasGraph;
 private final EntityGraphRetriever  entityGraphRetriever;
 private final AtlasGremlinQueryProvider gremlinQueryProvider;
+private   ExportTypeProcessor   exportTypeProcessor;
 
 @Inject
 public ExportService(final AtlasTypeRegistry typeRegistry, AtlasGraph 
atlasGraph, AuditsWriter auditsWriter) {
@@ -87,7 +94,8 @@ public class ExportService {
  String requestingIP) throws 
AtlasBaseException {
 long  startTime = System.currentTimeMillis();
 AtlasExportResult result= new AtlasExportResult(request, userName, 
requestingIP, hostName, startTime);
-ExportContext context   = 

atlas git commit: ATLAS-2811: Skip Lineage Export option.

2018-08-06 Thread amestry
Repository: atlas
Updated Branches:
  refs/heads/branch-0.8 c3b01a6f1 -> 9dc245b8b


ATLAS-2811: Skip Lineage Export option.


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

Branch: refs/heads/branch-0.8
Commit: 9dc245b8b4a04f834a47a6c2865dfe89e1cfab12
Parents: c3b01a6
Author: Ashutosh Mestry 
Authored: Mon Aug 6 13:57:05 2018 -0700
Committer: Ashutosh Mestry 
Committed: Mon Aug 6 14:26:19 2018 -0700

--
 .../atlas/model/impexp/AtlasExportRequest.java  |   1 +
 .../atlas/repository/impexp/ExportService.java  | 222 ---
 .../repository/impexp/ExportTypeProcessor.java  | 159 +
 .../atlas/repository/util/UniqueList.java   |  73 ++
 .../clusterinfo/ClusterServiceTest.java | 121 --
 .../repository/impexp/ClusterServiceTest.java   | 121 ++
 .../repository/impexp/ExportImportTestBase.java |  25 ++-
 .../impexp/ExportSkipLineageTest.java   | 125 +++
 .../impexp/ReplicationEntityAttributeTest.java  |  17 --
 .../atlas/repository/impexp/UniqueListTest.java |  11 +-
 .../impexp/ZipFileResourceTestUtils.java|  17 ++
 11 files changed, 563 insertions(+), 329 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/atlas/blob/9dc245b8/intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java
--
diff --git 
a/intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java 
b/intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java
index ce8aeb5..035216b 100644
--- a/intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java
+++ b/intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java
@@ -48,6 +48,7 @@ public class AtlasExportRequest implements Serializable {
 
 public static final String OPTION_FETCH_TYPE= "fetchType";
 public static final String OPTION_ATTR_MATCH_TYPE   = "matchType";
+public static final String OPTION_SKIP_LINEAGE  = 
"skipLineage";
 public static final String OPTION_KEY_REPLICATED_TO = 
"replicatedTo";
 public static final String FETCH_TYPE_FULL  = "full";
 public static final String FETCH_TYPE_CONNECTED = "connected";

http://git-wip-us.apache.org/repos/asf/atlas/blob/9dc245b8/repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
--
diff --git 
a/repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
 
b/repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
index 02d17fb..eeb8735 100644
--- 
a/repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
@@ -22,10 +22,8 @@ import org.apache.atlas.AtlasErrorCode;
 import org.apache.atlas.AtlasException;
 import org.apache.atlas.AtlasServiceException;
 import org.apache.atlas.exception.AtlasBaseException;
-import org.apache.atlas.model.TypeCategory;
 import org.apache.atlas.model.impexp.AtlasExportRequest;
 import org.apache.atlas.model.impexp.AtlasExportResult;
-import org.apache.atlas.model.instance.AtlasClassification;
 import org.apache.atlas.model.instance.AtlasEntity;
 import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo;
 import org.apache.atlas.model.instance.AtlasObjectId;
@@ -34,18 +32,12 @@ import 
org.apache.atlas.model.typedef.AtlasClassificationDef;
 import org.apache.atlas.model.typedef.AtlasEntityDef;
 import org.apache.atlas.model.typedef.AtlasEnumDef;
 import org.apache.atlas.model.typedef.AtlasStructDef;
-import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef;
 import org.apache.atlas.model.typedef.AtlasTypesDef;
 import org.apache.atlas.repository.graphdb.AtlasGraph;
 import org.apache.atlas.repository.store.graph.v1.EntityGraphRetriever;
-import org.apache.atlas.type.AtlasArrayType;
-import org.apache.atlas.type.AtlasClassificationType;
+import org.apache.atlas.repository.util.UniqueList;
 import org.apache.atlas.type.AtlasEntityType;
-import org.apache.atlas.type.AtlasEnumType;
-import org.apache.atlas.type.AtlasMapType;
-import org.apache.atlas.type.AtlasStructType;
 import org.apache.atlas.type.AtlasStructType.AtlasAttribute;
-import org.apache.atlas.type.AtlasType;
 import org.apache.atlas.type.AtlasTypeRegistry;
 import org.apache.atlas.type.AtlasTypeUtil;
 import org.apache.atlas.util.AtlasGremlinQueryProvider;
@@ -68,11 +60,17 @@ import static