Package org.apache.accumulo.fate
Class AdminUtil<T>
- java.lang.Object
-
- org.apache.accumulo.fate.AdminUtil<T>
-
public class AdminUtil<T> extends Object
A utility to administer FATE operations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AdminUtil.FateStatus
static class
AdminUtil.TransactionStatus
FATE transaction status, including lock information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkGlobalLock(IZooReaderWriter zk, String path)
void
deleteLocks(IZooReaderWriter zk, String path, String txidStr)
AdminUtil.FateStatus
getStatus(ReadOnlyTStore<T> zs, IZooReader zk, String lockPath, Set<Long> filterTxid, EnumSet<ReadOnlyTStore.TStatus> filterStatus)
Get the FATE transaction status and lock information stored in zookeeper, optionally filtered by transaction id and filter status.List<AdminUtil.TransactionStatus>
getTransactionStatus(ReadOnlyTStore<T> zs, Set<Long> filterTxid, EnumSet<ReadOnlyTStore.TStatus> filterStatus)
Returns a list of the FATE transactions, optionally filtered by transaction id and status.boolean
prepDelete(TStore<T> zs, IZooReaderWriter zk, String path, String txidStr)
boolean
prepFail(TStore<T> zs, IZooReaderWriter zk, String path, String txidStr)
void
print(ReadOnlyTStore<T> zs, IZooReader zk, String lockPath)
void
print(ReadOnlyTStore<T> zs, IZooReader zk, String lockPath, Formatter fmt, Set<Long> filterTxid, EnumSet<ReadOnlyTStore.TStatus> filterStatus)
-
-
-
Method Detail
-
getTransactionStatus
public List<AdminUtil.TransactionStatus> getTransactionStatus(ReadOnlyTStore<T> zs, Set<Long> filterTxid, EnumSet<ReadOnlyTStore.TStatus> filterStatus)
Returns a list of the FATE transactions, optionally filtered by transaction id and status. This method does not process lock information, if lock information is desired, usegetStatus(ReadOnlyTStore, IZooReader, String, Set, EnumSet)
- Parameters:
zs
- read-only zoostorefilterTxid
- filter results to include for provided transaction ids.filterStatus
- filter results to include only provided status types- Returns:
- list of FATE transactions that match filter criteria
-
getStatus
public AdminUtil.FateStatus getStatus(ReadOnlyTStore<T> zs, IZooReader zk, String lockPath, Set<Long> filterTxid, EnumSet<ReadOnlyTStore.TStatus> filterStatus) throws org.apache.zookeeper.KeeperException, InterruptedException
Get the FATE transaction status and lock information stored in zookeeper, optionally filtered by transaction id and filter status.- Parameters:
zs
- read-only zoostorezk
- zookeeper reader.lockPath
- the zookeeper path for locksfilterTxid
- filter results to include for provided transaction ids.filterStatus
- filter results to include only provided status types- Returns:
- a summary container of the fate transactions.
- Throws:
org.apache.zookeeper.KeeperException
- if zookeeper exception occursInterruptedException
- if process is interrupted.
-
print
public void print(ReadOnlyTStore<T> zs, IZooReader zk, String lockPath) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
print
public void print(ReadOnlyTStore<T> zs, IZooReader zk, String lockPath, Formatter fmt, Set<Long> filterTxid, EnumSet<ReadOnlyTStore.TStatus> filterStatus) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
prepDelete
public boolean prepDelete(TStore<T> zs, IZooReaderWriter zk, String path, String txidStr)
-
prepFail
public boolean prepFail(TStore<T> zs, IZooReaderWriter zk, String path, String txidStr)
-
deleteLocks
public void deleteLocks(IZooReaderWriter zk, String path, String txidStr) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
checkGlobalLock
public boolean checkGlobalLock(IZooReaderWriter zk, String path)
-
-