public class MaterializationsRebuildLockHandler extends Object
| Modifier and Type | Method and Description |
|---|---|
long |
cleanupResourceLocks(long timeout)
Method that removes from the handler those locks that have expired.
|
static MaterializationsRebuildLockHandler |
get()
Get instance of MaterializationsRebuildLockHandler.
|
org.apache.hadoop.hive.metastore.api.LockResponse |
lockResource(String dbName,
String tableName,
long txnId)
Lock materialized view (first step for rebuild).
|
boolean |
readyToCommitResource(String dbName,
String tableName,
long txnId)
Moves from ACQUIRED state to COMMIT_READY.
|
boolean |
refreshLockResource(String dbName,
String tableName,
long txnId)
Heartbeats a certain lock and refreshes its timer.
|
boolean |
unlockResource(String dbName,
String tableName,
long txnId)
Releases a certain lock.
|
public static MaterializationsRebuildLockHandler get()
public org.apache.hadoop.hive.metastore.api.LockResponse lockResource(String dbName, String tableName, long txnId)
dbName - the db name of the materializationtableName - the table name of the materializationtxnId - the transaction id for the rebuildpublic boolean readyToCommitResource(String dbName, String tableName, long txnId)
dbName - the db name of the materializationtableName - the table name of the materializationtxnId - the transaction id for the rebuildpublic boolean refreshLockResource(String dbName, String tableName, long txnId)
dbName - the db name of the materializationtableName - the table name of the materializationtxnId - the transaction id for the rebuildorg.apache.hadoop.hive.metastore.api.MetaExceptionpublic boolean unlockResource(String dbName, String tableName, long txnId)
dbName - the db name of the materializationtableName - the table name of the materializationtxnId - the transaction id for the rebuildorg.apache.hadoop.hive.metastore.api.MetaExceptionpublic long cleanupResourceLocks(long timeout)
timeout - time after which we consider the locks to have expiredorg.apache.hadoop.hive.metastore.api.MetaExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.