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
2679dab3
Commit
2679dab3
authored
Jan 28, 2015
by
TJBChris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more commenting to updated Discovery Service methods for search.
parent
0adfeb18
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
DiscoveryService.java
...rg/apache/hadoop/metadata/discovery/DiscoveryService.java
+10
-1
GraphBackedDiscoveryService.java
...adoop/metadata/discovery/GraphBackedDiscoveryService.java
+9
-0
MetadataRepository.java
...apache/hadoop/metadata/repository/MetadataRepository.java
+10
-0
No files found.
repository/src/main/java/org/apache/hadoop/metadata/discovery/DiscoveryService.java
View file @
2679dab3
...
...
@@ -40,8 +40,17 @@ public interface DiscoveryService {
*/
List
<
Map
<
String
,
String
>>
searchByGremlin
(
String
gremlinQuery
)
throws
MetadataException
;
/**
* Simple direct graph search and depth traversal.
* @param searchText is plain text
* @param prop is the Vertex property to search.
*/
Map
<
String
,
HashMap
<
String
,
Map
<
String
,
String
>>>
textSearch
(
String
searchText
,
int
depth
,
String
prop
);
/**
* Simple graph walker for search interface, which allows following of specific edges only.
* @param edgesToFollow is a comma-separated-list of edges to follow.
*/
Map
<
String
,
HashMap
<
String
,
Map
<
String
,
String
>>>
relationshipWalk
(
String
guid
,
int
depth
,
String
edgesToFollow
);
}
repository/src/main/java/org/apache/hadoop/metadata/discovery/GraphBackedDiscoveryService.java
View file @
2679dab3
...
...
@@ -54,6 +54,11 @@ public class GraphBackedDiscoveryService implements DiscoveryService {
return
repository
.
searchByGremlin
(
gremlinQuery
);
}
/**
* Simple direct graph search and depth traversal.
* @param searchText is plain text
* @param prop is the Vertex property to search.
*/
@Override
public
Map
<
String
,
HashMap
<
String
,
Map
<
String
,
String
>>>
textSearch
(
String
searchText
,
int
depth
,
String
prop
)
{
Preconditions
.
checkNotNull
(
searchText
,
"Invalid argument: \"text\" cannot be null."
);
...
...
@@ -62,6 +67,10 @@ public class GraphBackedDiscoveryService implements DiscoveryService {
return
repository
.
textSearch
(
searchText
,
depth
,
prop
);
}
/**
* Simple graph walker for search interface, which allows following of specific edges only.
* @param edgesToFollow is a comma-separated-list of edges to follow.
*/
@Override
public
Map
<
String
,
HashMap
<
String
,
Map
<
String
,
String
>>>
relationshipWalk
(
String
guid
,
int
depth
,
String
edgesToFollow
)
{
Preconditions
.
checkNotNull
(
guid
,
"Invalid argument: \"guid\" cannot be null."
);
...
...
repository/src/main/java/org/apache/hadoop/metadata/repository/MetadataRepository.java
View file @
2679dab3
...
...
@@ -51,6 +51,16 @@ public interface MetadataRepository extends Service {
*/
List
<
Map
<
String
,
String
>>
searchByGremlin
(
String
gremlinQuery
)
throws
MetadataException
;
/**
* Simple direct graph search and depth traversal.
* @param searchText is plain text
* @param prop is the Vertex property to search.
*/
Map
<
String
,
HashMap
<
String
,
Map
<
String
,
String
>>>
textSearch
(
String
searchText
,
int
depth
,
String
prop
);
/**
* Simple graph walker for search interface, which allows following of specific edges only.
* @param edgesToFollow is a comma-separated-list of edges to follow.
*/
Map
<
String
,
HashMap
<
String
,
Map
<
String
,
String
>>>
relationshipWalk
(
String
guid
,
int
depth
,
String
edgesToFollow
);
}
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