當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。