public final class FileMetaDataManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
FileMetaDataManager.DeleteCallback
Implement to receive a location before its meta data is removed.
|
| Constructor and Description |
|---|
FileMetaDataManager(LogSaverTableUtil tableUtil,
co.cask.tephra.TransactionExecutorFactory txExecutorFactory,
LocationFactory locationFactory,
CConfiguration cConf) |
| Modifier and Type | Method and Description |
|---|---|
int |
cleanMetaData(long tillTime,
FileMetaDataManager.DeleteCallback callback)
Deletes meta data until a given time, while keeping the latest meta data even if less than tillTime.
|
NavigableMap<Long,Location> |
listFiles(LoggingContext loggingContext)
Returns a list of log files for a logging context.
|
void |
writeMetaData(LoggingContext loggingContext,
long startTimeMs,
Location location)
Persists meta data associated with a log file.
|
@Inject public FileMetaDataManager(LogSaverTableUtil tableUtil, co.cask.tephra.TransactionExecutorFactory txExecutorFactory, LocationFactory locationFactory, CConfiguration cConf)
public void writeMetaData(LoggingContext loggingContext, long startTimeMs, Location location) throws Exception
loggingContext - logging context containing the meta data.startTimeMs - start log time associated with the file.location - log file.Exceptionpublic NavigableMap<Long,Location> listFiles(LoggingContext loggingContext) throws Exception
loggingContext - logging context.Exceptionpublic int cleanMetaData(long tillTime,
FileMetaDataManager.DeleteCallback callback)
throws Exception
tillTime - time till the meta data will be deleted.callback - callback called before deleting a meta data column.ExceptionCopyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.