Class SingleFileLogReader
- java.lang.Object
-
- org.apache.iotdb.db.utils.writelog.SingleFileLogReader
-
- All Implemented Interfaces:
ILogReader
public class SingleFileLogReader extends java.lang.Object implements ILogReader
SingleFileLogReader reads binarized WAL logs from a file through a DataInputStream by scanning the file from head to tail.
-
-
Field Summary
Fields Modifier and Type Field Description static intLEAST_LOG_SIZE
-
Constructor Summary
Constructors Constructor Description SingleFileLogReader(java.io.File logFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()release resources occupied by this object, like file streams.booleanhasNext()return whether there exists next log to be read.booleanisFileCorrupted()PhysicalPlannext()return the next log read from media like a WAL file and covert it to a PhysicalPlan.voidopen(java.io.File logFile)
-
-
-
Field Detail
-
LEAST_LOG_SIZE
public static final int LEAST_LOG_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
hasNext
public boolean hasNext()
Description copied from interface:ILogReaderreturn whether there exists next log to be read.- Specified by:
hasNextin interfaceILogReader- Returns:
- whether there exists next log to be read.
-
next
public PhysicalPlan next()
Description copied from interface:ILogReaderreturn the next log read from media like a WAL file and covert it to a PhysicalPlan.- Specified by:
nextin interfaceILogReader- Returns:
- the next log as a PhysicalPlan
-
close
public void close()
Description copied from interface:ILogReaderrelease resources occupied by this object, like file streams.- Specified by:
closein interfaceILogReader
-
open
public void open(java.io.File logFile) throws java.io.FileNotFoundException- Throws:
java.io.FileNotFoundException
-
isFileCorrupted
public boolean isFileCorrupted()
-
-