Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
3eadf7e8
Commit
3eadf7e8
authored
5 years ago
by
Bolke de Bruin
Committed by
Madhan Neethiraj
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3368: log warning for references without relationship-def
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
314f4937
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
Configuration.twiki
docs/src/site/twiki/Configuration.twiki
+4
-0
AtlasConfiguration.java
intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
+2
-0
EntityGraphMapper.java
...he/atlas/repository/store/graph/v2/EntityGraphMapper.java
+4
-3
No files found.
docs/src/site/twiki/Configuration.twiki
View file @
3eadf7e8
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
View file @
3eadf7e8
...
...
@@ -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
),
...
...
This diff is collapsed.
Click to expand it.
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
View file @
3eadf7e8
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment