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