org.apache.hadoop.yarn.server.nodemanager.util

## Class ProcessIdFileReader

- java.lang.Object
- - org.apache.hadoop.yarn.server.nodemanager.util.ProcessIdFileReader

-     public class ProcessIdFileReader
      extends Object

  Helper functionality to read the pid from a file.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProcessIdFileReader()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getProcessId(org.apache.hadoop.fs.Path path)` Get the process id from specified file path.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ProcessIdFileReader

          public ProcessIdFileReader()

  - ### Method Detail

    - #### getProcessId

          public static String getProcessId(org.apache.hadoop.fs.Path path)
                                     throws IOException

      Get the process id from specified file path. Parses each line to find a valid number and returns the first one found.
      Returns:
        Process Id if obtained from path specified else null
      Throws:
        `IOException`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.