You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by jl...@apache.org on 2017/07/12 20:53:55 UTC
hadoop git commit: YARN-6797. TimelineWriter does not fully consume
the POST response. Contributed by Jason Lowe
Repository: hadoop
Updated Branches:
refs/heads/trunk b628d0da5 -> 655110393
YARN-6797. TimelineWriter does not fully consume the POST response. Contributed by Jason Lowe
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/65511039
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/65511039
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/65511039
Branch: refs/heads/trunk
Commit: 655110393bf90a7dac5d85f831ea225071f5f3c2
Parents: b628d0d
Author: Jason Lowe <jl...@yahoo-inc.com>
Authored: Wed Jul 12 15:52:56 2017 -0500
Committer: Jason Lowe <jl...@yahoo-inc.com>
Committed: Wed Jul 12 15:52:56 2017 -0500
----------------------------------------------------------------------
.../apache/hadoop/yarn/client/api/impl/TimelineWriter.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/65511039/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineWriter.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineWriter.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineWriter.java
index 8fd0990..b3a886b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineWriter.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineWriter.java
@@ -152,16 +152,20 @@ public abstract class TimelineWriter implements Flushable {
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");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org