You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2017/02/22 01:22:35 UTC
incubator-atlas git commit: ATLAS-1583: fix incorrect metrics by
import API
Repository: incubator-atlas
Updated Branches:
refs/heads/master 2904f4c42 -> e7eaa9966
ATLAS-1583: fix incorrect metrics by import API
Signed-off-by: Madhan Neethiraj <ma...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/e7eaa996
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/e7eaa996
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/e7eaa996
Branch: refs/heads/master
Commit: e7eaa9966ccb330d5aa50aafc08cd1107ae30ce6
Parents: 2904f4c
Author: ashutoshm <am...@hortonworks.com>
Authored: Tue Feb 21 11:30:43 2017 -0800
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Tue Feb 21 17:05:56 2017 -0800
----------------------------------------------------------------------
.../atlas/repository/store/graph/v1/AtlasEntityStoreV1.java | 4 ++++
.../main/java/org/apache/atlas/web/resources/ImportService.java | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e7eaa996/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java
index 45b7c03..bbfc3e5 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java
@@ -186,6 +186,10 @@ public class AtlasEntityStoreV1 implements AtlasEntityStore {
}
for (AtlasEntityHeader h : list) {
+ if(processedGuids.contains(h.getGuid())) {
+ continue;
+ }
+
processedGuids.add(h.getGuid());
importResult.incrementMeticsCounter(String.format(prefix, h.getTypeName()));
}
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e7eaa996/webapp/src/main/java/org/apache/atlas/web/resources/ImportService.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/ImportService.java b/webapp/src/main/java/org/apache/atlas/web/resources/ImportService.java
index 7b0c887..1bd705d 100644
--- a/webapp/src/main/java/org/apache/atlas/web/resources/ImportService.java
+++ b/webapp/src/main/java/org/apache/atlas/web/resources/ImportService.java
@@ -139,6 +139,6 @@ public class ImportService {
this.entityStore.bulkImport(importSource, result);
endTimestamp = System.currentTimeMillis();
- result.incrementMeticsCounter("Duration", (int) (this.endTimestamp - this.startTimestamp));
+ result.incrementMeticsCounter("duration", (int) (this.endTimestamp - this.startTimestamp));
}
}