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
fe86177a
Commit
fe86177a
authored
Mar 05, 2017
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1635: fixed v1 lineage API return to return correct value in qualifiedName attribute
parent
42a441aa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
EntityGraphRetriever.java
...atlas/repository/store/graph/v1/EntityGraphRetriever.java
+9
-5
LineageUtils.java
...src/main/java/org/apache/atlas/web/util/LineageUtils.java
+6
-1
No files found.
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java
View file @
fe86177a
...
@@ -197,14 +197,18 @@ public final class EntityGraphRetriever {
...
@@ -197,14 +197,18 @@ public final class EntityGraphRetriever {
AtlasEntityType
entityType
=
typeRegistry
.
getEntityTypeByName
(
typeName
);
AtlasEntityType
entityType
=
typeRegistry
.
getEntityTypeByName
(
typeName
);
if
(
entityType
!=
null
)
{
if
(
entityType
!=
null
)
{
for
(
AtlasAttribute
uniqueAttribute
:
entityType
.
getUniqAttributes
().
values
())
{
Object
attrValue
=
getVertexAttribute
(
entityVertex
,
uniqueAttribute
);
if
(
attrValue
!=
null
)
{
ret
.
setAttribute
(
uniqueAttribute
.
getName
(),
attrValue
);
}
}
Object
name
=
getVertexAttribute
(
entityVertex
,
entityType
.
getAttribute
(
AtlasClient
.
NAME
));
Object
name
=
getVertexAttribute
(
entityVertex
,
entityType
.
getAttribute
(
AtlasClient
.
NAME
));
Object
description
=
getVertexAttribute
(
entityVertex
,
entityType
.
getAttribute
(
AtlasClient
.
DESCRIPTION
));
Object
description
=
getVertexAttribute
(
entityVertex
,
entityType
.
getAttribute
(
AtlasClient
.
DESCRIPTION
));
Object
owner
=
getVertexAttribute
(
entityVertex
,
entityType
.
getAttribute
(
AtlasClient
.
OWNER
));
Object
owner
=
getVertexAttribute
(
entityVertex
,
entityType
.
getAttribute
(
AtlasClient
.
OWNER
));
Object
displayText
=
name
;
Object
displayText
=
name
!=
null
?
name
:
ret
.
getAttribute
(
AtlasClient
.
QUALIFIED_NAME
);
if
(
displayText
==
null
)
{
displayText
=
getVertexAttribute
(
entityVertex
,
entityType
.
getAttribute
(
AtlasClient
.
QUALIFIED_NAME
));
}
ret
.
setAttribute
(
AtlasClient
.
NAME
,
name
);
ret
.
setAttribute
(
AtlasClient
.
NAME
,
name
);
ret
.
setAttribute
(
AtlasClient
.
DESCRIPTION
,
description
);
ret
.
setAttribute
(
AtlasClient
.
DESCRIPTION
,
description
);
...
...
webapp/src/main/java/org/apache/atlas/web/util/LineageUtils.java
View file @
fe86177a
...
@@ -72,8 +72,13 @@ public final class LineageUtils {
...
@@ -72,8 +72,13 @@ public final class LineageUtils {
vertexIdMap
.
put
(
idType
.
stateAttrName
(),
(
entityHeader
.
getStatus
()
==
AtlasEntity
.
Status
.
ACTIVE
)
?
"ACTIVE"
:
"DELETED"
);
vertexIdMap
.
put
(
idType
.
stateAttrName
(),
(
entityHeader
.
getStatus
()
==
AtlasEntity
.
Status
.
ACTIVE
)
?
"ACTIVE"
:
"DELETED"
);
vertexIdMap
.
put
(
idType
.
typeNameAttrName
(),
entityHeader
.
getTypeName
());
vertexIdMap
.
put
(
idType
.
typeNameAttrName
(),
entityHeader
.
getTypeName
());
Object
qualifiedName
=
entityHeader
.
getAttribute
(
AtlasClient
.
REFERENCEABLE_ATTRIBUTE_NAME
);
if
(
qualifiedName
==
null
)
{
qualifiedName
=
entityHeader
.
getDisplayText
();
}
Map
<
String
,
Object
>
values
=
new
HashMap
<>();
Map
<
String
,
Object
>
values
=
new
HashMap
<>();
values
.
put
(
AtlasClient
.
REFERENCEABLE_ATTRIBUTE_NAME
,
entityHeader
.
getDisplayText
()
);
values
.
put
(
AtlasClient
.
REFERENCEABLE_ATTRIBUTE_NAME
,
qualifiedName
);
values
.
put
(
VERTEX_ID_ATTR_NAME
,
constructResultStruct
(
vertexIdMap
,
true
));
values
.
put
(
VERTEX_ID_ATTR_NAME
,
constructResultStruct
(
vertexIdMap
,
true
));
values
.
put
(
AtlasClient
.
NAME
,
entityHeader
.
getDisplayText
());
values
.
put
(
AtlasClient
.
NAME
,
entityHeader
.
getDisplayText
());
verticesMap
.
put
(
guid
,
constructResultStruct
(
values
,
false
));
verticesMap
.
put
(
guid
,
constructResultStruct
(
values
,
false
));
...
...
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