Package org.apache.hadoop.hdfs.util
Class PersistentLongFile
java.lang.Object
org.apache.hadoop.hdfs.util.PersistentLongFile
Class that represents a file on disk which persistently stores
a single
long value. The file is updated atomically
and durably (i.e fsynced).-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PersistentLongFile
-
-
Method Details
-
get
- Throws:
IOException
-
set
- Throws:
IOException
-
writeFile
Atomically write the given value to the given file, including fsyncing.- Parameters:
file- destination fileval- value to write- Throws:
IOException- if the file cannot be written
-
readFile
- Throws:
IOException
-