[ 
https://issues.apache.org/jira/browse/HADOOP-19261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17883184#comment-17883184
 ] 

ASF GitHub Bot commented on HADOOP-19261:
-----------------------------------------

ChenSammi commented on code in PR #7057:
URL: https://github.com/apache/hadoop/pull/7057#discussion_r1768147900


##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/unix/TemporarySocketDirectory.java:
##########
@@ -35,8 +35,7 @@ public class TemporarySocketDirectory implements Closeable {
 
   public TemporarySocketDirectory() {
     String tmp = System.getProperty("java.io.tmpdir", "/tmp");
-    dir = new File(tmp, "socks." + (System.currentTimeMillis() +
-        "." + (new Random().nextInt())));
+    dir = new File(tmp, "socks." + System.nanoTime());

Review Comment:
   This change is to fix the failure on local macbook platform. 
   
   ```
   java.net.SocketException: error computing UNIX domain socket path: path too 
long.  The longest UNIX domain socket path possible on this host is 103 bytes.
   ```





> Support force close a DomainSocket for server service
> -----------------------------------------------------
>
>                 Key: HADOOP-19261
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19261
>             Project: Hadoop Common
>          Issue Type: New Feature
>            Reporter: Sammi Chen
>            Assignee: Sammi Chen
>            Priority: Major
>              Labels: pull-request-available
>
> Currently the DomainSocket#close will check the reference count to be 0 
> before it goes on to close the socket. In server service case, server calls 
> DomainSocket#listen will add 1 to the reference count. When trying to close 
> the server socket which is blocked by accept, the close call will doing 
> endless count > 0 check, which prevent the server socket to be closed. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to