public class CloseWriteAheadLogReferences extends Object implements Runnable
This tool scans the metadata table to collect a set of WALs that are still referenced. Then, each
Replication.Status record from the metadata and replication tables that point to that WAL can be
"closed", by writing a new Status to the same key with the closed member true.
| Constructor and Description |
|---|
CloseWriteAheadLogReferences(AccumuloServerContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeWal(BatchWriter bw,
Key k)
|
protected List<String> |
getActiveTservers(TInfo tinfo)
Get the active tabletservers as seen by the master.
|
protected List<String> |
getActiveWalsForServer(TInfo tinfo,
HostAndPort server) |
protected HashSet<String> |
getClosedLogs(Connector conn)
Construct the set of referenced WALs from zookeeper
|
void |
run() |
protected long |
updateReplicationEntries(Connector conn,
Set<String> closedWals)
Given the set of WALs which have references in the metadata table, close any status messages
with reference that WAL.
|
public CloseWriteAheadLogReferences(AccumuloServerContext context)
protected HashSet<String> getClosedLogs(Connector conn)
conn - Connectorprotected long updateReplicationEntries(Connector conn, Set<String> closedWals)
conn - ConnectorclosedWals - Set of paths to WALs that marked as closed or unreferenced in zookeeperprotected void closeWal(BatchWriter bw, Key k) throws MutationsRejectedException
bw - BatchWriterk - Key to create close mutation fromMutationsRejectedExceptionprotected List<String> getActiveTservers(TInfo tinfo)
protected List<String> getActiveWalsForServer(TInfo tinfo, HostAndPort server)
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.