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 Set<String> |
getActiveWals(TInfo tinfo)
Fetch the set of WALs in use by tabletservers
|
protected List<String> |
getActiveWalsForServer(TInfo tinfo,
com.google.common.net.HostAndPort server) |
protected HashSet<String> |
getReferencedWals(Connector conn)
Construct the set of referenced WALs from the metadata table
|
void |
run() |
protected long |
updateReplicationEntries(Connector conn,
Set<String> referencedWals)
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> getReferencedWals(Connector conn)
conn - Connectorprotected long updateReplicationEntries(Connector conn, Set<String> referencedWals)
conn - ConnectorreferencedWals - Set of paths to WALs that are referenced in the tablets section of the metadata tableprotected void closeWal(BatchWriter bw, Key k) throws MutationsRejectedException
bw - BatchWriterk - Key to create close mutation fromMutationsRejectedExceptionprotected Set<String> getActiveWals(TInfo tinfo)
protected List<String> getActiveTservers(TInfo tinfo)
Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.