Package org.apache.accumulo.tserver.log
Class TabletServerLogger
- java.lang.Object
-
- org.apache.accumulo.tserver.log.TabletServerLogger
-
public class TabletServerLogger extends Object
Central logging facility for the TServerInfo. Forwards in-memory updates to remote logs, carefully writing the same data to every log, while maintaining the maximum thread parallelism for greater performance. As new logs are used and minor compactions are performed, the metadata table is kept up-to-date.
-
-
Constructor Summary
Constructors Constructor Description TabletServerLogger(TabletServer tserver, long maxSize, AtomicLong syncCounter, AtomicLong flushCounter, Retry.RetryFactory createRetryFactory, Retry.RetryFactory writeRetryFactory, long maxAge)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLogFile()
Get the current WAL filevoid
log(CommitSession commitSession, Mutation m, Durability durability)
Log a single mutation.void
logManyTablets(Map<CommitSession,TabletMutations> loggables)
Log mutations.void
minorCompactionFinished(CommitSession commitSession, long walogSeq, Durability durability)
long
minorCompactionStarted(CommitSession commitSession, long seq, String fullyQualifiedFileName, Durability durability)
void
recover(VolumeManager fs, KeyExtent extent, List<org.apache.hadoop.fs.Path> logs, Set<String> tabletFiles, MutationReceiver mr)
-
-
-
Constructor Detail
-
TabletServerLogger
public TabletServerLogger(TabletServer tserver, long maxSize, AtomicLong syncCounter, AtomicLong flushCounter, Retry.RetryFactory createRetryFactory, Retry.RetryFactory writeRetryFactory, long maxAge)
-
-
Method Detail
-
getLogFile
public String getLogFile()
Get the current WAL file- Returns:
- The name of the current log, or null if there is no current log.
-
log
public void log(CommitSession commitSession, Mutation m, Durability durability) throws IOException
Log a single mutation. This method expects mutations that have a durability other than NONE.- Throws:
IOException
-
logManyTablets
public void logManyTablets(Map<CommitSession,TabletMutations> loggables) throws IOException
Log mutations. This method expects mutations that have a durability other than NONE.- Throws:
IOException
-
minorCompactionFinished
public void minorCompactionFinished(CommitSession commitSession, long walogSeq, Durability durability) throws IOException
- Throws:
IOException
-
minorCompactionStarted
public long minorCompactionStarted(CommitSession commitSession, long seq, String fullyQualifiedFileName, Durability durability) throws IOException
- Throws:
IOException
-
recover
public void recover(VolumeManager fs, KeyExtent extent, List<org.apache.hadoop.fs.Path> logs, Set<String> tabletFiles, MutationReceiver mr) throws IOException
- Throws:
IOException
-
-