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.
|
Method Summary |
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 |
ProcessIdFileReader
public ProcessIdFileReader()
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 © 2013 Apache Software Foundation. All Rights Reserved.