hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject hadoop git commit: YARN-6797. TimelineWriter does not fully consume the POST response. Contributed by Jason Lowe
Date Wed, 12 Jul 2017 20:54:31 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 ea3dba37c -> 401b191a3


YARN-6797. TimelineWriter does not fully consume the POST response. Contributed by Jason Lowe

(cherry picked from commit 655110393bf90a7dac5d85f831ea225071f5f3c2)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/401b191a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/401b191a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/401b191a

Branch: refs/heads/branch-2
Commit: 401b191a3ce6da8a7d6cd4738d138be14f9c3c7a
Parents: ea3dba3
Author: Jason Lowe <jlowe@yahoo-inc.com>
Authored: Wed Jul 12 15:52:56 2017 -0500
Committer: Jason Lowe <jlowe@yahoo-inc.com>
Committed: Wed Jul 12 15:54:17 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/401b191a/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 9590f4a..9d11bce 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
@@ -151,16 +151,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


Mime
View raw message