HDFS-10820. Reuse closeResponder to reset the response variable in DataStreamer#run. Contributed by Yiqun Lin.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/0690f096 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/0690f096 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/0690f096 Branch: refs/heads/HADOOP-13345 Commit: 0690f0969efef201b074a8b26400b2e5ba9b97ad Parents: 74f4bae Author: Xiao Chen <x...@apache.org> Authored: Thu Sep 1 15:34:47 2016 -0700 Committer: Xiao Chen <x...@apache.org> Committed: Thu Sep 1 15:35:25 2016 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/hadoop/hdfs/DataStreamer.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/0690f096/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java index ee673ed..062a416 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java @@ -536,14 +536,8 @@ class DataStreamer extends Daemon { TraceScope scope = null; while (!streamerClosed && dfsClient.clientRunning) { // if the Responder encountered an error, shutdown Responder - if (errorState.hasError() && response != null) { - try { - response.close(); - response.join(); - response = null; - } catch (InterruptedException e) { - LOG.warn("Caught exception", e); - } + if (errorState.hasError()) { + closeResponder(); } DFSPacket one; --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org