本文整理匯總了Java中io.airlift.stats.TimeStat類的典型用法代碼示例。如果您正苦於以下問題:Java TimeStat類的具體用法?Java TimeStat怎麽用?Java TimeStat使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TimeStat類屬於io.airlift.stats包,在下文中一共展示了TimeStat類的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getLocatedFileStatusRemoteIterator
import io.airlift.stats.TimeStat; //導入依賴的package包/類
private RemoteIterator<LocatedFileStatus> getLocatedFileStatusRemoteIterator(Path path)
throws IOException
{
try (TimeStat.BlockTimer ignored = namenodeStats.getListLocatedStatus().time()) {
return directoryLister.list(fileSystem, path);
}
catch (IOException | RuntimeException e) {
namenodeStats.getListLocatedStatus().recordException(e);
throw e;
}
}
示例2: getLocatedFileStatus
import io.airlift.stats.TimeStat; //導入依賴的package包/類
private LocatedFileStatus getLocatedFileStatus(RemoteIterator<LocatedFileStatus> iterator)
throws IOException
{
try (TimeStat.BlockTimer ignored = namenodeStats.getRemoteIteratorNext().time()) {
return iterator.next();
}
catch (IOException | RuntimeException e) {
namenodeStats.getRemoteIteratorNext().recordException(e);
throw e;
}
}
示例3: wrap
import io.airlift.stats.TimeStat; //導入依賴的package包/類
public <V> Callable<V> wrap(Callable<V> callable)
{
return () -> {
try (TimeStat.BlockTimer ignored = time.time()) {
return callable.call();
}
catch (Exception e) {
if (e instanceof MetaException) {
metastoreExceptions.update(1);
// Need to throw here instead of falling through due to JDK-8059299
totalFailures.update(1);
throw e;
}
if (e instanceof TException) {
if (e instanceof TBase) {
// This exception is an API response and not a server error
throw e;
}
thriftExceptions.update(1);
// Need to throw here instead of falling through due to JDK-8059299
totalFailures.update(1);
throw e;
}
totalFailures.update(1);
throw e;
}
};
}
示例4: getTime
import io.airlift.stats.TimeStat; //導入依賴的package包/類
@Managed
@Nested
public TimeStat getTime()
{
return time;
}
示例5: getQueuedTime
import io.airlift.stats.TimeStat; //導入依賴的package包/類
@Managed
@Nested
public TimeStat getQueuedTime()
{
return queuedTime;
}
示例6: getWallTime
import io.airlift.stats.TimeStat; //導入依賴的package包/類
@Managed
@Nested
public TimeStat getWallTime()
{
return wallTime;
}
示例7: getExecutionTime
import io.airlift.stats.TimeStat; //導入依賴的package包/類
@Managed
@Nested
public TimeStat getExecutionTime()
{
return executionTime;
}
示例8: getTimeToFirstByte
import io.airlift.stats.TimeStat; //導入依賴的package包/類
@Managed
@Nested
public TimeStat getTimeToFirstByte()
{
return timeToFirstByte;
}
示例9: getSplitQueuedTime
import io.airlift.stats.TimeStat; //導入依賴的package包/類
@Managed
@Nested
public TimeStat getSplitQueuedTime()
{
return splitQueuedTime;
}
示例10: getTimeToLastByte
import io.airlift.stats.TimeStat; //導入依賴的package包/類
@Managed
@Nested
public TimeStat getTimeToLastByte()
{
return timeToLastByte;
}
示例11: getAwsRequestTime
import io.airlift.stats.TimeStat; //導入依賴的package包/類
@Managed
@Nested
public TimeStat getAwsRequestTime()
{
return awsRequestTime;
}
示例12: time
import io.airlift.stats.TimeStat; //導入依賴的package包/類
public TimeStat.BlockTimer time()
{
return time.time();
}
示例13: getAwsClientExecuteTime
import io.airlift.stats.TimeStat; //導入依賴的package包/類
@Managed
@Nested
public TimeStat getAwsClientExecuteTime()
{
return awsClientExecuteTime;
}