lichaojacobs commented on a change in pull request #2775:
URL: https://github.com/apache/hadoop/pull/2775#discussion_r603752872
##########
File path:
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/pipes/Application.java
##########
@@ -266,4 +271,39 @@ public static String createDigest(byte[] password, String
data)
return SecureShuffleUtils.hashFromString(data, key);
}
+ private class PingSocketCleaner extends Thread {
+ PingSocketCleaner(String name) {
+ super(name);
+ }
+
+ @Override
+ public void run() {
+ LOG.info("PingSocketCleaner started...");
+ while (true) {
+ Socket clientSocket = null;
+ try {
+ clientSocket = serverSocket.accept();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Got one client socket...");
+ }
+ int readData = clientSocket.getInputStream().read();
Review comment:
this is just for ping socket, since ping client won't send data but just
make sure server can connect. we can do this because we know client behavior.
And yes, if other processes just connect server and send byte on purpose, the
cleaner won't work well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]