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
8e73ed24
Commit
8e73ed24
authored
9 years ago
by
Shwetha G S
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68 from hortonworks/ISSUE67
Add response body to MetadataServiceException
parents
8ba831bc
8ee845be
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
MetadataServiceClient.java
...ava/org/apache/hadoop/metadata/MetadataServiceClient.java
+2
-1
MetadataServiceException.java
.../org/apache/hadoop/metadata/MetadataServiceException.java
+6
-4
No files found.
client/src/main/java/org/apache/hadoop/metadata/MetadataServiceClient.java
View file @
8e73ed24
...
...
@@ -250,7 +250,8 @@ public class MetadataServiceClient {
throw
new
MetadataServiceException
(
api
,
e
);
}
}
throw
new
MetadataServiceException
(
api
,
clientResponse
.
getClientResponseStatus
());
throw
new
MetadataServiceException
(
api
,
clientResponse
);
}
private
JSONObject
callAPI
(
API
api
,
Object
requestObject
,
...
...
This diff is collapsed.
Click to expand it.
client/src/main/java/org/apache/hadoop/metadata/MetadataServiceException.java
View file @
8e73ed24
...
...
@@ -27,10 +27,12 @@ public class MetadataServiceException extends Exception {
super
(
"Metadata service API "
+
api
+
" failed"
,
e
);
}
public
MetadataServiceException
(
MetadataServiceClient
.
API
api
,
ClientResponse
.
Status
status
)
{
super
(
"Metadata service API "
+
api
+
" failed with status "
+
status
.
getStatusCode
()
+
"("
+
status
.
getReasonPhrase
()
+
")"
);
this
.
status
=
status
;
public
MetadataServiceException
(
MetadataServiceClient
.
API
api
,
ClientResponse
response
)
{
super
(
"Metadata service API "
+
api
+
" failed with status "
+
response
.
getClientResponseStatus
().
getStatusCode
()
+
"("
+
response
.
getClientResponseStatus
().
getReasonPhrase
()
+
") Response Body ("
+
response
.
getEntity
(
String
.
class
)
+
")"
);
this
.
status
=
response
.
getClientResponseStatus
();
}
public
MetadataServiceException
(
Exception
e
)
{
...
...
This diff is collapsed.
Click to expand it.
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