You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by am...@apache.org on 2018/11/01 23:02:03 UTC

[17/50] [abbrv] atlas git commit: ATLAS-2888: Change marker fix for server name

ATLAS-2888: Change marker fix for server name


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

Branch: refs/heads/branch-1.0
Commit: 4f3e76c4e244daf660561a42afd448f3d410c57a
Parents: 21ab886
Author: Ashutosh Mestry <am...@hortonworks.com>
Authored: Mon Oct 1 16:07:06 2018 -0700
Committer: Ashutosh Mestry <am...@hortonworks.com>
Committed: Thu Nov 1 15:42:56 2018 -0700

----------------------------------------------------------------------
 .../atlas/repository/impexp/AtlasServerService.java   |  4 ++--
 .../apache/atlas/repository/impexp/AuditsWriter.java  | 14 ++++----------
 2 files changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/4f3e76c4/repository/src/main/java/org/apache/atlas/repository/impexp/AtlasServerService.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/impexp/AtlasServerService.java b/repository/src/main/java/org/apache/atlas/repository/impexp/AtlasServerService.java
index 0761441..a3489a8 100644
--- a/repository/src/main/java/org/apache/atlas/repository/impexp/AtlasServerService.java
+++ b/repository/src/main/java/org/apache/atlas/repository/impexp/AtlasServerService.java
@@ -70,8 +70,8 @@ public class AtlasServerService {
         }
     }
 
-    public AtlasServer getCreateAtlasServer(String name, String fullName) throws AtlasBaseException {
-        AtlasServer defaultServer = new AtlasServer(name, fullName);
+    public AtlasServer getCreateAtlasServer(String clusterName, String serverFullName) throws AtlasBaseException {
+        AtlasServer defaultServer = new AtlasServer(clusterName, serverFullName);
         AtlasServer server = getAtlasServer(defaultServer);
         if (server == null) {
             return save(defaultServer);

http://git-wip-us.apache.org/repos/asf/atlas/blob/4f3e76c4/repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java b/repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java
index 7737197..3612c45 100644
--- a/repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java
+++ b/repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java
@@ -93,18 +93,12 @@ public class AuditsWriter {
                 : StringUtils.EMPTY;
     }
 
-    private AtlasServer saveServer(String name, String serverFullName) {
-        AtlasServer cluster = new AtlasServer(name, serverFullName);
-        return atlasServerService.save(cluster);
-    }
-
-    private AtlasServer saveServer(String name, String serverFullName,
+    private AtlasServer saveServer(String clusterName, String serverFullName,
                                    String entityGuid,
-                                   long lastModifiedTimestamp) {
+                                   long lastModifiedTimestamp) throws AtlasBaseException {
 
-        AtlasServer server = new AtlasServer(name, serverFullName);
+        AtlasServer server = atlasServerService.getCreateAtlasServer(clusterName, serverFullName);
         server.setAdditionalInfoRepl(entityGuid, lastModifiedTimestamp);
-
         if (LOG.isDebugEnabled()) {
             LOG.debug("saveServer: {}", server);
         }
@@ -138,7 +132,7 @@ public class AuditsWriter {
     }
 
     private void saveCurrentServer() throws AtlasBaseException {
-        saveServer(getCurrentClusterName(), getCurrentClusterName());
+        atlasServerService.getCreateAtlasServer(getCurrentClusterName(), getCurrentClusterName());
     }
 
     private class ExportAudits {