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
9c9eed27
Commit
9c9eed27
authored
Apr 14, 2019
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3139: updated basic search to include relationship attributes as well in the result
parent
a910609d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
AtlasStructType.java
.../src/main/java/org/apache/atlas/type/AtlasStructType.java
+3
-3
EntityDiscoveryService.java
...va/org/apache/atlas/discovery/EntityDiscoveryService.java
+8
-0
EntityGraphRetriever.java
...atlas/repository/store/graph/v2/EntityGraphRetriever.java
+7
-1
No files found.
intg/src/main/java/org/apache/atlas/type/AtlasStructType.java
View file @
9c9eed27
...
...
@@ -744,19 +744,19 @@ public class AtlasStructType extends AtlasType {
this
.
inverseRefAttributeName
=
inverseRefAttribute
;
this
.
relationshipEdgeDirection
=
AtlasRelationshipEdgeDirection
.
OUT
;
switch
(
attributeType
.
getTypeCategory
())
{
switch
(
this
.
attributeType
.
getTypeCategory
())
{
case
OBJECT_ID_TYPE:
isObjectRef
=
true
;
break
;
case
MAP:
AtlasMapType
mapType
=
(
AtlasMapType
)
attributeType
;
AtlasMapType
mapType
=
(
AtlasMapType
)
this
.
attributeType
;
isObjectRef
=
mapType
.
getValueType
().
getTypeCategory
()
==
OBJECT_ID_TYPE
;
break
;
case
ARRAY:
AtlasArrayType
arrayType
=
(
AtlasArrayType
)
attributeType
;
AtlasArrayType
arrayType
=
(
AtlasArrayType
)
this
.
attributeType
;
isObjectRef
=
arrayType
.
getElementType
().
getTypeCategory
()
==
OBJECT_ID_TYPE
;
break
;
...
...
repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
View file @
9c9eed27
...
...
@@ -451,6 +451,10 @@ public class EntityDiscoveryService implements AtlasDiscoveryService {
for
(
String
resultAttribute
:
resultAttributes
)
{
AtlasAttribute
attribute
=
entityType
.
getAttribute
(
resultAttribute
);
if
(
attribute
==
null
)
{
attribute
=
entityType
.
getRelationshipAttribute
(
resultAttribute
,
null
);
}
if
(
attribute
!=
null
)
{
AtlasType
attributeType
=
attribute
.
getAttributeType
();
...
...
@@ -536,6 +540,10 @@ public class EntityDiscoveryService implements AtlasDiscoveryService {
AtlasAttribute
attribute
=
entityType
.
getAttribute
(
relation
);
if
(
attribute
==
null
)
{
attribute
=
entityType
.
getRelationshipAttribute
(
relation
,
null
);
}
if
(
attribute
!=
null
)
{
if
(
attribute
.
isObjectRef
())
{
relation
=
attribute
.
getRelationshipEdgeLabel
();
...
...
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
View file @
9c9eed27
...
...
@@ -533,7 +533,13 @@ public class EntityGraphRetriever {
continue
;
}
Object
attrValue
=
getVertexAttribute
(
entityVertex
,
entityType
.
getAttribute
(
nonQualifiedAttrName
));
AtlasAttribute
attribute
=
entityType
.
getAttribute
(
nonQualifiedAttrName
);
if
(
attribute
==
null
)
{
attribute
=
entityType
.
getRelationshipAttribute
(
nonQualifiedAttrName
,
null
);
}
Object
attrValue
=
getVertexAttribute
(
entityVertex
,
attribute
);
if
(
attrValue
!=
null
)
{
ret
.
setAttribute
(
nonQualifiedAttrName
,
attrValue
);
...
...
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