Package org.apache.accumulo.core.fate
Class AdminUtil<T>
- java.lang.Object
-
- org.apache.accumulo.core.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.
-
Constructor Summary
Constructors Constructor Description AdminUtil(boolean exitOnError)
Constructor
-
Method Summary
-
-
-
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, ServiceLockPath, 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, ServiceLock.ServiceLockPath 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.
-
printAll
public void printAll(ReadOnlyTStore<T> zs, ZooReader zk, ServiceLock.ServiceLockPath tableLocksPath) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
print
public void print(ReadOnlyTStore<T> zs, ZooReader zk, ServiceLock.ServiceLockPath tableLocksPath, 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, ZooReaderWriter zk, ServiceLock.ServiceLockPath path, String txidStr)
-
prepFail
public boolean prepFail(TStore<T> zs, ZooReaderWriter zk, ServiceLock.ServiceLockPath zLockManagerPath, String txidStr)
-
deleteLocks
public void deleteLocks(ZooReaderWriter zk, ServiceLock.ServiceLockPath path, String txidStr) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
checkGlobalLock
public boolean checkGlobalLock(ZooReaderWriter zk, ServiceLock.ServiceLockPath zLockManagerPath)
-
-