code: public static LogEntry getLastEntry(FileSystem fs, Path lockFile)
            throws IOException {
      FSDataInputStream in = fs.open(lockFile);
      BufferedReader reader = new BufferedReader(new InputStreamReader(in));
      String lastLine = null;
      for(String line = reader.readLine(); line!=null; line = reader.readLine() ) {
        lastLine=line;
      }
      return LogEntry.deserialize(lastLine);
    }
docs: returns the last log entry
  @param fs
  @param lockFile
  @return
  @throws IOException