cxzl25 opened a new pull request, #5565:
URL: https://github.com/apache/hadoop/pull/5565

   ### Description of PR
   When RM starts, because the file corresponding to the 
`yarn.resourcemanager.nodes.include-path` or 
`yarn.resourcemanager.nodes.exclude-path` configuration item does not exist, it 
will disable this function.
   
   
https://github.com/apache/hadoop/blob/405ed1dde6bcccca1e07e45a356a89c1b583e236/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java#L552-L570
   
   
   But in RM failover scenario, because the file does not exist, it will fail.
   
   ```java
   Caused by: org.apache.hadoop.ha.ServiceFailedException: RefreshAll operation 
failed
        at 
org.apache.hadoop.yarn.server.resourcemanager.AdminService.refreshAll(AdminService.java:788)
        at 
org.apache.hadoop.yarn.server.resourcemanager.AdminService.transitionToActive(AdminService.java:315)
        ... 29 more
   Caused by: java.nio.file.NoSuchFileException: 
/tmp/non-existent-path-788aa744-1395-40ca-bdb5-f93bffc92cfb
        at 
sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at 
sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
        at java.nio.file.Files.newByteChannel(Files.java:361)
        at java.nio.file.Files.newByteChannel(Files.java:407)
        at 
java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
        at java.nio.file.Files.newInputStream(Files.java:152)
        at 
org.apache.hadoop.util.HostsFileReader.readFileToMap(HostsFileReader.java:126)
        at 
org.apache.hadoop.util.HostsFileReader.refreshInternal(HostsFileReader.java:214)
        at 
org.apache.hadoop.util.HostsFileReader.refresh(HostsFileReader.java:192)
        at 
org.apache.hadoop.yarn.server.resourcemanager.NodesListManager.refreshHostsReader(NodesListManager.java:258)
        at 
org.apache.hadoop.yarn.server.resourcemanager.NodesListManager.refreshNodes(NodesListManager.java:232)
        at 
org.apache.hadoop.yarn.server.resourcemanager.NodesListManager.refreshNodes(NodesListManager.java:224)
        at 
org.apache.hadoop.yarn.server.resourcemanager.AdminService.refreshNodes(AdminService.java:490)
        at 
org.apache.hadoop.yarn.server.resourcemanager.AdminService.refreshAll(AdminService.java:778)
   ```
   
   ### How was this patch tested?
   add UT
   
   ### For code changes:
   
   - [ ] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   


-- 
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.

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to