本文整理汇总了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;
}