public class Deadline extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkTimeout()
Check whether the long running method timeout.
|
static void |
clear()
remove the registered Deadline threadlocal object from current thread.
|
static void |
registerIfNot(long timeout)
register a Deadline threadlocal object to current thread.
|
static void |
resetTimeout(long timeoutMs)
reset the timeout value of this timer.
|
static boolean |
startTimer(String method)
start the timer before a method is invoked.
|
static void |
stopTimer()
end the time after a method is done.
|
public static void registerIfNot(long timeout)
timeout - public static void resetTimeout(long timeoutMs)
throws org.apache.hadoop.hive.metastore.api.MetaException
timeoutMs - org.apache.hadoop.hive.metastore.api.MetaExceptionpublic static boolean startTimer(String method) throws org.apache.hadoop.hive.metastore.api.MetaException
method - method to be invokedorg.apache.hadoop.hive.metastore.api.MetaExceptionpublic static void stopTimer()
throws org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.MetaExceptionpublic static void clear()
public static void checkTimeout()
throws org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.MetaException - when the method timeoutCopyright © 2019 The Apache Software Foundation. All Rights Reserved.