APISonar


org.apache.hadoop.hdfs.server.namenode.NNStorage.NameNodeFile.TIME

> org > apache > hadoop > hdfs > server > namenode > NNStorage > NameNodeFile > TIME
org APIs apache APIs hadoop APIs hdfs APIs server APIs namenode APIs NNStorage APIs NameNodeFile APIs TIME APIs

Example 1
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();
        in.close();
        in = null;
      } finally {
        IOUtils.cleanup(LOG, in);
      }
    }
    return timeStamp;
  }