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
8ee845be
Commit
8ee845be
authored
May 01, 2015
by
Aaron Dossett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add response body to MetadataServiceException
reformat and remove unused constructor MetadataServiceException should report response body and response status
parent
5fda7b70
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 @
8ee845be
...
@@ -250,7 +250,8 @@ public class MetadataServiceClient {
...
@@ -250,7 +250,8 @@ public class MetadataServiceClient {
throw
new
MetadataServiceException
(
api
,
e
);
throw
new
MetadataServiceException
(
api
,
e
);
}
}
}
}
throw
new
MetadataServiceException
(
api
,
clientResponse
.
getClientResponseStatus
());
throw
new
MetadataServiceException
(
api
,
clientResponse
);
}
}
private
JSONObject
callAPI
(
API
api
,
Object
requestObject
,
private
JSONObject
callAPI
(
API
api
,
Object
requestObject
,
...
...
client/src/main/java/org/apache/hadoop/metadata/MetadataServiceException.java
View file @
8ee845be
...
@@ -27,10 +27,12 @@ public class MetadataServiceException extends Exception {
...
@@ -27,10 +27,12 @@ public class MetadataServiceException extends Exception {
super
(
"Metadata service API "
+
api
+
" failed"
,
e
);
super
(
"Metadata service API "
+
api
+
" failed"
,
e
);
}
}
public
MetadataServiceException
(
MetadataServiceClient
.
API
api
,
ClientResponse
.
Status
status
)
{
public
MetadataServiceException
(
MetadataServiceClient
.
API
api
,
ClientResponse
response
)
{
super
(
"Metadata service API "
+
api
+
" failed with status "
+
status
.
getStatusCode
()
super
(
"Metadata service API "
+
api
+
" failed with status "
+
+
"("
+
status
.
getReasonPhrase
()
+
")"
);
response
.
getClientResponseStatus
().
getStatusCode
()
+
"("
+
this
.
status
=
status
;
response
.
getClientResponseStatus
().
getReasonPhrase
()
+
") Response Body ("
+
response
.
getEntity
(
String
.
class
)
+
")"
);
this
.
status
=
response
.
getClientResponseStatus
();
}
}
public
MetadataServiceException
(
Exception
e
)
{
public
MetadataServiceException
(
Exception
e
)
{
...
...
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