public class EditLog extends Object
Constructor and Description |
---|
EditLog(String path,
boolean inactive,
long transactionId) |
Modifier and Type | Method and Description |
---|---|
void |
addBlock(int fileId,
int blockIndex,
long blockLength) |
void |
addCheckpoint(int fileId,
long length,
String checkpointPath) |
void |
close()
Close the log.
|
void |
completeFile(int fileId) |
void |
createDependency(List<Integer> parents,
List<Integer> children,
String commandPrefix,
List<ByteBuffer> data,
String comment,
String framework,
String frameworkVersion,
DependencyType dependencyType,
int depId,
long creationTimeMs) |
void |
createFile(boolean recursive,
String path,
boolean directory,
int columns,
ByteBuffer metadata,
long blockSizeByte,
long creationTimeMs) |
void |
delete(int fileId,
boolean recursive) |
static void |
deleteCompletedLogs(String path,
int upTo) |
void |
flush()
Flush the log onto the storage.
|
Pair<Long,Long> |
getTransactionIds()
Get the current TransactionId and FlushedTransactionId
|
static long |
load(MasterInfo info,
String path,
int currentLogFileNum)
Load edit log.
|
static void |
loadSingleLog(MasterInfo info,
String path) |
static void |
markUpToDate(String path) |
void |
rename(int fileId,
String dstPath) |
void |
rotateEditLog(String path) |
void |
setMaxLogSize(int size)
Changes the max log size for testing purposes.
|
void |
unpinFile(int fileId) |
void |
updateRawTableMetadata(int tableId,
ByteBuffer metadata) |
public EditLog(String path, boolean inactive, long transactionId) throws IOException
IOException
public static long load(MasterInfo info, String path, int currentLogFileNum) throws IOException
info
- The Master Info.path
- The path of the edit logs.currentLogFileNum
- The smallest completed log number that this master has not loadedIOException
public static void loadSingleLog(MasterInfo info, String path) throws IOException
IOException
public static void deleteCompletedLogs(String path, int upTo)
public static void markUpToDate(String path)
public void rotateEditLog(String path)
public void addCheckpoint(int fileId, long length, String checkpointPath)
public void addBlock(int fileId, int blockIndex, long blockLength)
public void createFile(boolean recursive, String path, boolean directory, int columns, ByteBuffer metadata, long blockSizeByte, long creationTimeMs)
public void createDependency(List<Integer> parents, List<Integer> children, String commandPrefix, List<ByteBuffer> data, String comment, String framework, String frameworkVersion, DependencyType dependencyType, int depId, long creationTimeMs)
public void delete(int fileId, boolean recursive)
public void rename(int fileId, String dstPath)
public void unpinFile(int fileId)
public void updateRawTableMetadata(int tableId, ByteBuffer metadata)
public void completeFile(int fileId)
public Pair<Long,Long> getTransactionIds()
public void flush()
public void close()
public void setMaxLogSize(int size)
size
- Copyright © 2014. All rights reserved.