Repository: atlas
Updated Branches:
  refs/heads/branch-0.8 1500c73b3 -> 373744ced


ATLAS-2652: Export in HA mode.


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

Branch: refs/heads/branch-0.8
Commit: 373744ced4c01f51590e0c96ca200cd4cc5fad45
Parents: 1500c73
Author: Ashutosh Mestry <[email protected]>
Authored: Mon May 7 14:02:26 2018 -0700
Committer: Ashutosh Mestry <[email protected]>
Committed: Mon May 7 14:03:13 2018 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/atlas/migration/Exporter.java  | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/373744ce/tools/atlas-migration-exporter/src/main/java/org/apache/atlas/migration/Exporter.java
----------------------------------------------------------------------
diff --git 
a/tools/atlas-migration-exporter/src/main/java/org/apache/atlas/migration/Exporter.java
 
b/tools/atlas-migration-exporter/src/main/java/org/apache/atlas/migration/Exporter.java
index a5f4bdf..1bda19f 100644
--- 
a/tools/atlas-migration-exporter/src/main/java/org/apache/atlas/migration/Exporter.java
+++ 
b/tools/atlas-migration-exporter/src/main/java/org/apache/atlas/migration/Exporter.java
@@ -21,6 +21,9 @@ package org.apache.atlas.migration;
 import com.thinkaurelius.titan.core.TitanGraph;
 import com.tinkerpop.blueprints.Graph;
 import com.tinkerpop.blueprints.util.io.graphson.GraphSONMode;
+import org.apache.atlas.ApplicationProperties;
+import org.apache.atlas.AtlasException;
+import org.apache.atlas.ha.HAConfiguration;
 import org.apache.atlas.model.typedef.AtlasTypesDef;
 import org.apache.atlas.repository.graphdb.titan0.Titan0GraphDatabase;
 import org.apache.atlas.type.AtlasType;
@@ -97,6 +100,7 @@ public class Exporter {
 
         displayMessage("initializing");
 
+        resetHAMode();
         ApplicationContext applicationContext = new 
ClassPathXmlApplicationContext(contextXml);
 
         this.typesDefFileName = typesDefFileName;
@@ -106,6 +110,11 @@ public class Exporter {
         displayMessage("initialized");
     }
 
+    private void resetHAMode() throws AtlasException {
+        ApplicationProperties applicationProperties = (ApplicationProperties) 
ApplicationProperties.get();
+        
applicationProperties.setProperty(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY, 
false);
+    }
+
     public void perform() throws Exception {
         exportTypes();
         exportData();

Reply via email to