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


Java Table类代码示例

本文整理汇总了Java中org.voltdb.sysprocs.SnapshotRegistry.Snapshot.Table的典型用法代码示例。如果您正苦于以下问题:Java Table类的具体用法?Java Table怎么用?Java Table使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Table类属于org.voltdb.sysprocs.SnapshotRegistry.Snapshot包,在下文中一共展示了Table类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateStatsRow

import org.voltdb.sysprocs.SnapshotRegistry.Snapshot.Table; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
protected void updateStatsRow(Object rowKey, Object[] rowValues) {
    Pair<Snapshot, Table> p = (Pair<Snapshot, Table>) rowKey;
    Snapshot s = p.getFirst();
    Table t = p.getSecond();
    double duration = 0;
    double throughput = 0;
    if (s.timeFinished != 0) {
        duration = (s.timeFinished - s.timeStarted) / 1000.0;
        throughput = (s.bytesWritten / (1024.0 * 1024.0)) / duration;
    }

    rowValues[columnNameToIndex.get("TABLE")] = t.name;
    rowValues[columnNameToIndex.get("PATH")] = s.path;
    rowValues[columnNameToIndex.get("FILENAME")] = t.filename;
    rowValues[columnNameToIndex.get("NONCE")] = s.nonce;
    rowValues[columnNameToIndex.get("START_TIME")] = s.timeStarted;
    rowValues[columnNameToIndex.get("END_TIME")] = s.timeFinished;
    rowValues[columnNameToIndex.get("SIZE")] = t.size;
    rowValues[columnNameToIndex.get("DURATION")] = duration;
    rowValues[columnNameToIndex.get("THROUGHPUT")] = throughput;
    rowValues[columnNameToIndex.get("RESULT")] = t.error == null ? "SUCCESS" : "FAILURE";
    super.updateStatsRow(rowKey, rowValues);
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:26,代码来源:SnapshotStatus.java

示例2: StatusIterator

import org.voltdb.sysprocs.SnapshotRegistry.Snapshot.Table; //导入依赖的package包/类
private StatusIterator(Iterator<Snapshot> i) {
    m_snapshots = new LinkedList<Pair<Snapshot, Table>>();

    while (i.hasNext()) {
        final Snapshot s = i.next();
        s.iterateTables(new Snapshot.TableIterator() {
            @Override
            public void next(Table t) {
                m_snapshots.add(Pair.of(s, t));
            }
        });
    }

    m_iter = m_snapshots.iterator();
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:16,代码来源:SnapshotStatus.java

示例3: updateStatsRow

import org.voltdb.sysprocs.SnapshotRegistry.Snapshot.Table; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
protected void updateStatsRow(Object rowKey, Object[] rowValues) {
    Pair<Snapshot, Table> p = (Pair<Snapshot, Table>) rowKey;
    Snapshot s = p.getFirst();
    Table t = p.getSecond();
    double duration = 0;
    double throughput = 0;
    long timeStarted = s.timeStarted;
    if (s.timeFinished != 0) {
        duration =
            (s.timeFinished - timeStarted) / 1000.0;
        throughput = (s.bytesWritten / (1024.0 * 1024.0)) / duration;
    }

    rowValues[columnNameToIndex.get("TABLE")] = t.name;
    rowValues[columnNameToIndex.get("PATH")] = s.path;
    rowValues[columnNameToIndex.get("FILENAME")] = t.filename;
    rowValues[columnNameToIndex.get("NONCE")] = s.nonce;
    rowValues[columnNameToIndex.get("TXNID")] = s.txnId;
    rowValues[columnNameToIndex.get("START_TIME")] = timeStarted;
    rowValues[columnNameToIndex.get("END_TIME")] = s.timeFinished;
    rowValues[columnNameToIndex.get("SIZE")] = t.size;
    rowValues[columnNameToIndex.get("DURATION")] = duration;
    rowValues[columnNameToIndex.get("THROUGHPUT")] = throughput;
    rowValues[columnNameToIndex.get("RESULT")] = t.error == null ? "SUCCESS" : "FAILURE";
    super.updateStatsRow(rowKey, rowValues);
}
 
开发者ID:anhnv-3991,项目名称:VoltDB,代码行数:29,代码来源:SnapshotStatus.java


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