当前位置: 首页>>代码示例>>Java>>正文


Java TimeStat类代码示例

本文整理汇总了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;
    }
}
 
开发者ID:y-lan,项目名称:presto,代码行数:12,代码来源:HiveFileIterator.java

示例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;
    }
}
 
开发者ID:y-lan,项目名称:presto,代码行数:12,代码来源:HiveFileIterator.java

示例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;
        }
    };
}
 
开发者ID:y-lan,项目名称:presto,代码行数:32,代码来源:HiveMetastoreApiStats.java

示例4: getTime

import io.airlift.stats.TimeStat; //导入依赖的package包/类
@Managed
@Nested
public TimeStat getTime()
{
    return time;
}
 
开发者ID:airlift,项目名称:drift,代码行数:7,代码来源:JmxMethodInvocationStat.java

示例5: getQueuedTime

import io.airlift.stats.TimeStat; //导入依赖的package包/类
@Managed
@Nested
public TimeStat getQueuedTime()
{
    return queuedTime;
}
 
开发者ID:y-lan,项目名称:presto,代码行数:7,代码来源:TaskExecutor.java

示例6: getWallTime

import io.airlift.stats.TimeStat; //导入依赖的package包/类
@Managed
@Nested
public TimeStat getWallTime()
{
    return wallTime;
}
 
开发者ID:y-lan,项目名称:presto,代码行数:7,代码来源:TaskExecutor.java

示例7: getExecutionTime

import io.airlift.stats.TimeStat; //导入依赖的package包/类
@Managed
@Nested
public TimeStat getExecutionTime()
{
    return executionTime;
}
 
开发者ID:y-lan,项目名称:presto,代码行数:7,代码来源:SqlQueryManagerStats.java

示例8: getTimeToFirstByte

import io.airlift.stats.TimeStat; //导入依赖的package包/类
@Managed
@Nested
public TimeStat getTimeToFirstByte()
{
    return timeToFirstByte;
}
 
开发者ID:y-lan,项目名称:presto,代码行数:7,代码来源:SqlTaskManagerStats.java

示例9: getSplitQueuedTime

import io.airlift.stats.TimeStat; //导入依赖的package包/类
@Managed
@Nested
public TimeStat getSplitQueuedTime()
{
    return splitQueuedTime;
}
 
开发者ID:y-lan,项目名称:presto,代码行数:7,代码来源:SqlTaskManagerStats.java

示例10: getTimeToLastByte

import io.airlift.stats.TimeStat; //导入依赖的package包/类
@Managed
@Nested
public TimeStat getTimeToLastByte()
{
    return timeToLastByte;
}
 
开发者ID:y-lan,项目名称:presto,代码行数:7,代码来源:SqlTaskManagerStats.java

示例11: getAwsRequestTime

import io.airlift.stats.TimeStat; //导入依赖的package包/类
@Managed
@Nested
public TimeStat getAwsRequestTime()
{
    return awsRequestTime;
}
 
开发者ID:y-lan,项目名称:presto,代码行数:7,代码来源:PrestoS3FileSystemStats.java

示例12: time

import io.airlift.stats.TimeStat; //导入依赖的package包/类
public TimeStat.BlockTimer time()
{
    return time.time();
}
 
开发者ID:y-lan,项目名称:presto,代码行数:5,代码来源:NamenodeStats.java

示例13: getAwsClientExecuteTime

import io.airlift.stats.TimeStat; //导入依赖的package包/类
@Managed
@Nested
public TimeStat getAwsClientExecuteTime()
{
    return awsClientExecuteTime;
}
 
开发者ID:splicemachine,项目名称:spliceengine,代码行数:7,代码来源:PrestoS3FileSystemStats.java


注:本文中的io.airlift.stats.TimeStat类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。