public long get() throws IOException { if (!loaded) { value = readFile(file, defaultVal); loaded = true; } return value; }
/** * Determine the last transaction ID noted in this storage directory. * This txid is stored in a special seen_txid file since it might not * correspond to the latest image or edit log. For example, an image-only * directory will have this txid incremented when edits logs roll, even * though the edits logs are in a different directory. * * @param sd StorageDirectory to check * @return If file exists and can be read, last recorded txid. If not, 0L. * @throws IOException On errors processing file pointed to by sd */ static long readTransactionIdFile(StorageDirectory sd) throws IOException { File txidFile = getStorageFile(sd, NameNodeFile.SEEN_TXID); return PersistentLongFile.readFile(txidFile, 0); }
public long get() throws IOException { if (!loaded) { value = readFile(file, defaultVal); loaded = true; } return value; }
public long get() throws IOException { if (!loaded) { value = readFile(file, defaultVal); loaded = true; } return value; }
/** * Determine the last transaction ID noted in this storage directory. * This txid is stored in a special seen_txid file since it might not * correspond to the latest image or edit log. For example, an image-only * directory will have this txid incremented when edits logs roll, even * though the edits logs are in a different directory. * * @param sd StorageDirectory to check * @return If file exists and can be read, last recorded txid. If not, 0L. * @throws IOException On errors processing file pointed to by sd */ static long readTransactionIdFile(StorageDirectory sd) throws IOException { File txidFile = getStorageFile(sd, NameNodeFile.SEEN_TXID); return PersistentLongFile.readFile(txidFile, 0); }
/** * Determine the last transaction ID noted in this storage directory. * This txid is stored in a special seen_txid file since it might not * correspond to the latest image or edit log. For example, an image-only * directory will have this txid incremented when edits logs roll, even * though the edits logs are in a different directory. * * @param sd StorageDirectory to check * @return If file exists and can be read, last recorded txid. If not, 0L. * @throws IOException On errors processing file pointed to by sd */ static long readTransactionIdFile(StorageDirectory sd) throws IOException { File txidFile = getStorageFile(sd, NameNodeFile.SEEN_TXID); return PersistentLongFile.readFile(txidFile, 0); }