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
7828bdf5
Commit
7828bdf5
authored
Jan 27, 2015
by
TJBChris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added JSON reponse output as debug for easier debugging of response and
viewing of the output format.
parent
dec14a89
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
MetadataDiscoveryResource.java
...oop/metadata/web/resources/MetadataDiscoveryResource.java
+3
-3
MetadataDiscoveryResourceIT.java
...p/metadata/web/resources/MetadataDiscoveryResourceIT.java
+3
-4
No files found.
webapp/src/main/java/org/apache/hadoop/metadata/web/resources/MetadataDiscoveryResource.java
View file @
7828bdf5
...
...
@@ -26,7 +26,6 @@ import com.tinkerpop.blueprints.Edge;
import
com.tinkerpop.blueprints.Graph
;
import
com.tinkerpop.blueprints.Vertex
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.hadoop.metadata.MetadataException
;
import
org.apache.hadoop.metadata.discovery.DiscoveryService
;
import
org.apache.hadoop.metadata.repository.graph.GraphHelper
;
...
...
@@ -178,7 +177,7 @@ public class MetadataDiscoveryResource {
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
"Search: Error building JSON result set."
,
Response
.
Status
.
INTERNAL_SERVER_ERROR
));
}
LOG
.
debug
(
"JSON result:"
+
response
.
toString
());
return
Response
.
ok
(
response
).
build
();
}
...
...
@@ -239,7 +238,8 @@ public class MetadataDiscoveryResource {
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
"Search: Error building JSON result set."
,
Response
.
Status
.
INTERNAL_SERVER_ERROR
));
}
LOG
.
debug
(
"JSON result:"
+
response
.
toString
());
return
Response
.
ok
(
response
).
build
();
}
...
...
webapp/src/test/java/org/apache/hadoop/metadata/web/resources/MetadataDiscoveryResourceIT.java
View file @
7828bdf5
...
...
@@ -59,19 +59,18 @@ public class MetadataDiscoveryResourceIT extends BaseResourceIT {
}
@Test
(
dependsOnMethods
=
"testFullTextUriExists"
,
enabled
=
false
)
@Test
(
dependsOnMethods
=
"testFullTextUriExists"
)
public
void
testSearchForText
()
throws
Exception
{
WebResource
resource
=
service
.
path
(
"api/metadata/discovery/search/fulltext"
)
.
queryParam
(
"depth"
,
"3"
).
queryParam
(
"text"
,
"
serde1"
).
queryParam
(
"property"
,
"
name"
);
.
queryParam
(
"depth"
,
"3"
).
queryParam
(
"text"
,
"
bar"
).
queryParam
(
"property"
,
"hive_table.
name"
);
ClientResponse
clientResponse
=
resource
.
accept
(
MediaType
.
APPLICATION_JSON
)
.
type
(
MediaType
.
APPLICATION_JSON
)
.
method
(
HttpMethod
.
GET
,
ClientResponse
.
class
);
System
.
out
.
println
(
clientResponse
.
toString
());
//TODO - Assure zero vertices and edges.
//TODO - Assure zero vertices and edges.
Assert
.
assertNotEquals
(
clientResponse
.
getStatus
(),
Response
.
Status
.
NOT_FOUND
.
getStatusCode
());
}
...
...
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