static long readCheckpointTime ( StorageDirectory sd ) throws IOException { File timeFile = NNStorage . getStorageFile ( sd , NameNodeFile . TIME ) ; long timeStamp = 0L ; if ( timeFile . exists ( ) && timeFile . canRead ( ) ) { DataInputStream in = new DataInputStream ( new FileInputStream ( timeFile ) ) ; try { timeStamp = in . readLong ( ) ; } finally { IOUtils . cleanup ( LOG , in ) ; } } return timeStamp ; }
Determine the checkpoint time of the specified StorageDirectory