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
0cccec93
Commit
0cccec93
authored
May 18, 2017
by
Sarath Subramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1815: Basic search API might return fewer entities when excludeDeletedEntities=true
parent
bbf93327
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
EntityDiscoveryService.java
...va/org/apache/atlas/discovery/EntityDiscoveryService.java
+6
-3
AtlasGremlin2QueryProvider.java
...ava/org/apache/atlas/util/AtlasGremlin2QueryProvider.java
+2
-0
AtlasGremlinQueryProvider.java
...java/org/apache/atlas/util/AtlasGremlinQueryProvider.java
+1
-0
No files found.
repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
View file @
0cccec93
...
...
@@ -324,6 +324,12 @@ public class EntityDiscoveryService implements AtlasDiscoveryService {
basicQuery
+=
gremlinQueryProvider
.
getQuery
(
AtlasGremlinQuery
.
BASIC_SEARCH_TYPE_FILTER
);
}
if
(
excludeDeletedEntities
)
{
bindings
.
put
(
"state"
,
Status
.
ACTIVE
.
toString
());
basicQuery
+=
gremlinQueryProvider
.
getQuery
(
AtlasGremlinQuery
.
BASIC_SEARCH_STATE_FILTER
);
}
if
(
isGuidPrefixSearch
)
{
bindings
.
put
(
"guid"
,
attrValuePrefix
+
".*"
);
...
...
@@ -347,9 +353,6 @@ public class EntityDiscoveryService implements AtlasDiscoveryService {
if
(
firstElement
instanceof
AtlasVertex
)
{
for
(
Object
element
:
queryResult
)
{
if
(
element
instanceof
AtlasVertex
)
{
if
(
skipDeletedEntities
(
excludeDeletedEntities
,
(
AtlasVertex
)
element
))
{
continue
;
}
ret
.
addEntity
(
entityRetriever
.
toAtlasEntityHeader
((
AtlasVertex
)
element
));
}
else
{
...
...
repository/src/main/java/org/apache/atlas/util/AtlasGremlin2QueryProvider.java
View file @
0cccec93
...
...
@@ -69,6 +69,8 @@ public class AtlasGremlin2QueryProvider extends AtlasGremlinQueryProvider {
return
".has('__typeName', T.in, typeNames)"
;
case
BASIC_SEARCH_CLASSIFICATION_FILTER:
return
".has('__traitNames', T.in, traitNames)"
;
case
BASIC_SEARCH_STATE_FILTER:
return
".has('__state', state)"
;
case
TO_RANGE_LIST:
return
" [startIdx..<endIdx].toList()"
;
case
GUID_PREFIX_FILTER:
...
...
repository/src/main/java/org/apache/atlas/util/AtlasGremlinQueryProvider.java
View file @
0cccec93
...
...
@@ -58,6 +58,7 @@ public abstract class AtlasGremlinQueryProvider {
// Discovery Queries
BASIC_SEARCH_TYPE_FILTER
,
BASIC_SEARCH_CLASSIFICATION_FILTER
,
BASIC_SEARCH_STATE_FILTER
,
TO_RANGE_LIST
,
GUID_PREFIX_FILTER
}
...
...
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