|
@@ -21,6 +21,7 @@ import java.io.IOException;
|
|
|
import java.net.ServerSocket;
|
|
|
import java.net.Socket;
|
|
|
import java.net.SocketTimeoutException;
|
|
|
+import java.nio.channels.AsynchronousCloseException;
|
|
|
import java.util.Collections;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Iterator;
|
|
@@ -138,6 +139,13 @@ class DataXceiverServer implements Runnable, FSConstants {
|
|
|
new DataXceiver(s, datanode, this)).start();
|
|
|
} catch (SocketTimeoutException ignored) {
|
|
|
// wake up to see if should continue to run
|
|
|
+ } catch (AsynchronousCloseException ace) {
|
|
|
+ // another thread closed our listener socket - that's expected during
|
|
|
+ // shutdown,
|
|
|
+ // but not in other circumstances
|
|
|
+ if (datanode.shouldRun) {
|
|
|
+ LOG.warn(datanode.dnRegistration + ":DataXceiverServer: ", ace);
|
|
|
+ }
|
|
|
} catch (IOException ie) {
|
|
|
LOG.warn(datanode.dnRegistration + ":DataXceiveServer: "
|
|
|
+ StringUtils.stringifyException(ie));
|