Search in sources :

Example 1 with SimpleFileSnapshotDataTarget

use of org.voltdb.SimpleFileSnapshotDataTarget in project voltdb by VoltDB.

the class CSVSnapshotWritePlan method createDataTargetForTable.

private SnapshotDataTarget createDataTargetForTable(String file_path, String file_nonce, int hostId, AtomicInteger numTables, SnapshotRegistry.Snapshot snapshotRecord, Table table) throws IOException {
    SnapshotDataTarget sdt;
    File saveFilePath = SnapshotUtil.constructFileForTable(table, file_path, file_nonce, SnapshotFormat.CSV, hostId);
    sdt = new SimpleFileSnapshotDataTarget(saveFilePath, !table.getIsreplicated());
    m_targets.add(sdt);
    final Runnable onClose = new TargetStatsClosure(sdt, table.getTypeName(), numTables, snapshotRecord);
    sdt.setOnCloseHandler(onClose);
    return sdt;
}
Also used : SimpleFileSnapshotDataTarget(org.voltdb.SimpleFileSnapshotDataTarget) SnapshotDataTarget(org.voltdb.SnapshotDataTarget) SimpleFileSnapshotDataTarget(org.voltdb.SimpleFileSnapshotDataTarget) File(java.io.File)

Aggregations

File (java.io.File)1 SimpleFileSnapshotDataTarget (org.voltdb.SimpleFileSnapshotDataTarget)1 SnapshotDataTarget (org.voltdb.SnapshotDataTarget)1