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

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

public class ProcessIdFileReader
extends Object

Helper functionality to read the pid from a file.


Constructor Summary
ProcessIdFileReader()
           
 
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
 

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 © 2013 Apache Software Foundation. All Rights Reserved.