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,
long blockSizeByte,
long creationTimeMs) |
void |
createRawTable(int tableId,
int columns,
ByteBuffer metadata) |
void |
delete(int fileId,
boolean recursive) |
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 |
setPinned(int fileId,
boolean pinned) |
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 markUpToDate(String path)
public void addBlock(int fileId, int blockIndex, long blockLength)
public void addCheckpoint(int fileId, long length, String checkpointPath)
public void close()
public void completeFile(int fileId)
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 createFile(boolean recursive, String path, boolean directory, long blockSizeByte, long creationTimeMs)
public void createRawTable(int tableId, int columns, ByteBuffer metadata)
public void delete(int fileId, boolean recursive)
public void deleteCompletedLogs(String path, int upTo)
public void flush()
public Pair<Long,Long> getTransactionIds()
public void rename(int fileId, String dstPath)
public void rotateEditLog(String path)
public void setMaxLogSize(int size)
size
- public void setPinned(int fileId, boolean pinned)
public void updateRawTableMetadata(int tableId, ByteBuffer metadata)
Copyright © 2014. All rights reserved.