public final class DFSEvaluatorLogOverwriteReaderWriter extends Object implements DFSEvaluatorLogReaderWriter
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the FileSystem.
|
CloseableIterable<String> |
readFromEvaluatorLog()
Since the
FileSystem does not support appends, this DFSEvaluatorLogReaderWriter
uses a two-file approach, where when we read, we always read from the newer file. |
void |
writeToEvaluatorLog(String formattedEntry)
Writes a formatted entry (addition or removal) for an Evaluator ID into the DFS evaluator log.
|
public void writeToEvaluatorLog(String formattedEntry) throws IOException
FileSystem does not support appends, this DFSEvaluatorLogReaderWriter
uses a two-file approach, where when we write, we always overwrite the older file.writeToEvaluatorLog in interface DFSEvaluatorLogReaderWriterformattedEntry - The formatted entry (entry with evaluator ID and addition/removal information).IOException - when file cannot be written.public CloseableIterable<String> readFromEvaluatorLog() throws IOException
FileSystem does not support appends, this DFSEvaluatorLogReaderWriter
uses a two-file approach, where when we read, we always read from the newer file.readFromEvaluatorLog in interface DFSEvaluatorLogReaderWriterIOExceptionpublic void close() throws Exception
close in interface AutoCloseableExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.