HDFS-10820. Reuse closeResponder to reset the response variable in DataStreamer#run. Contributed by Yiqun Lin.

This commit is contained in:
Xiao Chen 2016-09-01 15:34:47 -07:00
parent 74f4bae455
commit 0690f0969e
1 changed files with 2 additions and 8 deletions

View File

@ -536,14 +536,8 @@ public void run() {
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;