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 classAdminUtil.FateStatusstatic classAdminUtil.TransactionStatusFATE transaction status, including lock information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckGlobalLock(ZooReaderWriter zk, String path)voiddeleteLocks(ZooReaderWriter zk, String path, String txidStr)AdminUtil.FateStatusgetStatus(ReadOnlyTStore<T> zs, ZooReader 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.booleanprepDelete(TStore<T> zs, ZooReaderWriter zk, String path, String txidStr)booleanprepFail(TStore<T> zs, ZooReaderWriter zk, String path, String txidStr)voidprint(ReadOnlyTStore<T> zs, ZooReader zk, String lockPath)voidprint(ReadOnlyTStore<T> zs, ZooReader 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, ZooReader, 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, ZooReader 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, ZooReader zk, String lockPath) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperExceptionInterruptedException
-
print
public void print(ReadOnlyTStore<T> zs, ZooReader zk, String lockPath, Formatter fmt, Set<Long> filterTxid, EnumSet<ReadOnlyTStore.TStatus> filterStatus) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperExceptionInterruptedException
-
prepDelete
public boolean prepDelete(TStore<T> zs, ZooReaderWriter zk, String path, String txidStr)
-
prepFail
public boolean prepFail(TStore<T> zs, ZooReaderWriter zk, String path, String txidStr)
-
deleteLocks
public void deleteLocks(ZooReaderWriter zk, String path, String txidStr) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperExceptionInterruptedException
-
checkGlobalLock
public boolean checkGlobalLock(ZooReaderWriter zk, String path)
-
-