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 2019/09/14 16:42:28 UTC

[atlas] branch branch-2.0 updated (cffa20f -> 7a472f7)

This is an automated email from the ASF dual-hosted git repository.

madhan pushed a change to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git.


    from cffa20f  ATLAS-3378: Update JanusGraph to 0.4.0
     new 086aff7  ATLAS-3356: fixed incorrect parent version - for branch-2.0
     new 7a472f7  ATLAS-3368: log warning for references without relationship-def

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 dashboardv3/pom.xml                                                | 2 +-
 docs/src/site/twiki/Configuration.twiki                            | 4 ++++
 intg/src/main/java/org/apache/atlas/AtlasConfiguration.java        | 2 ++
 .../apache/atlas/repository/store/graph/v2/EntityGraphMapper.java  | 7 ++++---
 4 files changed, 11 insertions(+), 4 deletions(-)


[atlas] 01/02: ATLAS-3356: fixed incorrect parent version - for branch-2.0

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

madhan pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 086aff79ebb741ff04d6fef697c8f97214370e38
Author: Madhan Neethiraj <ma...@apache.org>
AuthorDate: Sat Sep 14 09:37:10 2019 -0700

    ATLAS-3356: fixed incorrect parent version - for branch-2.0
---
 dashboardv3/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dashboardv3/pom.xml b/dashboardv3/pom.xml
index 6190f70..f5210a7 100644
--- a/dashboardv3/pom.xml
+++ b/dashboardv3/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.atlas</groupId>
         <artifactId>apache-atlas</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>2.1.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>atlas-dashboardv3</artifactId>


[atlas] 02/02: ATLAS-3368: log warning for references without relationship-def

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

madhan pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 7a472f704719f0ab762b556f8b701ab4951d38b1
Author: Bolke de Bruin <bo...@xs4all.nl>
AuthorDate: Tue Aug 13 13:35:28 2019 +0200

    ATLAS-3368: log warning for references without relationship-def
    
    Signed-off-by: Madhan Neethiraj <ma...@apache.org>
    (cherry picked from commit 3eadf7e875f810713b3a11a8e49ab2054128ac93)
---
 docs/src/site/twiki/Configuration.twiki                            | 4 ++++
 intg/src/main/java/org/apache/atlas/AtlasConfiguration.java        | 2 ++
 .../apache/atlas/repository/store/graph/v2/EntityGraphMapper.java  | 7 ++++---
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/docs/src/site/twiki/Configuration.twiki b/docs/src/site/twiki/Configuration.twiki
index 6190a7c..41e5c27 100644
--- a/docs/src/site/twiki/Configuration.twiki
+++ b/docs/src/site/twiki/Configuration.twiki
@@ -186,6 +186,10 @@ atlas.webserver.keepalivetimesecs=60
 
 # Queue size for the requests(when max threads are busy) for the atlas web server
 atlas.webserver.queuesize=100
+
+# Set to the property to true to enable warn on no relationships defined between entities on a particular attribute
+# Not having relationships defined can lead to performance loss while adding new entities
+atlas.relationships.warnOnNoRelationships=false
 </verbatim>
 
 ---+++ Recording performance metrics
diff --git a/intg/src/main/java/org/apache/atlas/AtlasConfiguration.java b/intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
index 7b71e51..38087dc 100644
--- a/intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
+++ b/intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
@@ -53,6 +53,8 @@ public enum AtlasConfiguration {
 
     GRAPHSTORE_INDEXED_STRING_SAFE_LENGTH("atlas.graphstore.indexed.string.safe.length", Short.MAX_VALUE),  // based on org.apache.hadoop.hbase.client.Mutation.checkRow()
 
+    RELATIONSHIP_WARN_NO_RELATIONSHIPS("atlas.relationships.warnOnNoRelationships", false),
+
     //search configuration
     SEARCH_MAX_LIMIT("atlas.search.maxlimit", 10000),
     SEARCH_DEFAULT_LIMIT("atlas.search.defaultlimit", 100);
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
index c02f809..db65863 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
@@ -110,6 +110,7 @@ public class EntityGraphMapper {
 
     private static final String SOFT_REF_FORMAT               = "%s:%s";
     private static final int INDEXED_STR_SAFE_LEN             = AtlasConfiguration.GRAPHSTORE_INDEXED_STRING_SAFE_LENGTH.getInt();
+    private static final boolean WARN_ON_NO_RELATIONSHIP       = AtlasConfiguration.RELATIONSHIP_WARN_NO_RELATIONSHIPS.getBoolean();
     private static final String CLASSIFICATION_NAME_DELIMITER = "|";
 
     private final GraphHelper               graphHelper = GraphHelper.getInstance();
@@ -948,9 +949,9 @@ public class EntityGraphMapper {
                 }
             } else {
                 // use legacy way to create/update edges
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("No RelationshipDef defined between {} and {} on attribute: {}",  getTypeName(entityVertex),
-                               getTypeName(attributeVertex), attributeName);
+                if (WARN_ON_NO_RELATIONSHIP || LOG.isDebugEnabled()) {
+                    LOG.warn("No RelationshipDef defined between {} and {} on attribute: {}. This can lead to severe performance degradation.",
+                             getTypeName(entityVertex), getTypeName(attributeVertex), attributeName);
                 }
 
                 ret = mapObjectIdValue(ctx, context);