YARN-6797. TimelineWriter does not fully consume the POST response. Contributed by Jason Lowe
(cherry picked from commit 655110393bf90a7dac5d85f831ea225071f5f3c2)
This commit is contained in:
parent
28be69ae6d
commit
4f1dfcc118
@ -151,16 +151,20 @@ public ClientResponse doPostingObject(Object object, String path) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("POST to " + resURI);
|
||||
}
|
||||
return webResource.accept(MediaType.APPLICATION_JSON)
|
||||
ClientResponse r = webResource.accept(MediaType.APPLICATION_JSON)
|
||||
.type(MediaType.APPLICATION_JSON)
|
||||
.post(ClientResponse.class, object);
|
||||
r.bufferEntity();
|
||||
return r;
|
||||
} else if (path.equals("domain")) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("PUT to " + resURI +"/" + path);
|
||||
}
|
||||
return webResource.path(path).accept(MediaType.APPLICATION_JSON)
|
||||
ClientResponse r = webResource.path(path).accept(MediaType.APPLICATION_JSON)
|
||||
.type(MediaType.APPLICATION_JSON)
|
||||
.put(ClientResponse.class, object);
|
||||
r.bufferEntity();
|
||||
return r;
|
||||
} else {
|
||||
throw new YarnRuntimeException("Unknown resource type");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user