Package org.voltdb

Examples of org.voltdb.SnapshotDataTarget


                        hashinatorData,
                        timestamp,
                        newPartitionCount);

                for (SnapshotTableTask task : replicatedSnapshotTasks) {
                    SnapshotDataTarget target = getSnapshotDataTarget(numTables, task);
                    task.setTarget(target);
                }

                for (SnapshotTableTask task : partitionedSnapshotTasks) {
                    SnapshotDataTarget target = getSnapshotDataTarget(numTables, task);
                    task.setTarget(target);
                }

                return true;
            }

            private SnapshotDataTarget getSnapshotDataTarget(AtomicInteger numTables, SnapshotTableTask task)
                    throws IOException
            {
                SnapshotDataTarget target = m_createdTargets.get(task.m_table.getRelativeIndex());
                if (target == null) {
                    target = createDataTargetForTable(file_path, file_nonce, task.m_table, txnId,
                            context.getHostId(), context.getCluster().getTypeName(),
                            context.getDatabase().getTypeName(), context.getNumberOfPartitions(),
                            tracker, timestamp, numTables, snapshotRecord);
View Full Code Here


                                                        long timestamp,
                                                        AtomicInteger numTables,
                                                        SnapshotRegistry.Snapshot snapshotRecord)
            throws IOException
    {
        SnapshotDataTarget sdt;

        File saveFilePath = SnapshotUtil.constructFileForTable(
                table,
                file_path,
                file_nonce,
                SnapshotFormat.NATIVE,
                hostId);

        sdt = new DefaultSnapshotDataTarget(saveFilePath,
                hostId,
                clusterName,
                databaseName,
                table.getTypeName(),
                partitionCount,
                table.getIsreplicated(),
                tracker.getPartitionsForHost(hostId),
                CatalogUtil.getVoltTable(table),
                txnId,
                timestamp);

        m_targets.add(sdt);
        final Runnable onClose = new TargetStatsClosure(sdt, table.getTypeName(), numTables, snapshotRecord);
        sdt.setOnCloseHandler(onClose);

        return sdt;
    }
View Full Code Here

                NativeSnapshotWritePlan.createFileBasedCompletionTasks(file_path, file_nonce,
                        txnId, partitionTransactionIds, context, exportSequenceNumbers, null, timestamp,
                        context.getNumberOfPartitions());

                for (SnapshotTableTask task : replicatedSnapshotTasks) {
                    final SnapshotDataTarget target = createDataTargetForTable(file_path, file_nonce,
                            context.getHostId(), numTables, snapshotRecord, task.m_table);
                    task.setTarget(target);
                }

                for (SnapshotTableTask task : partitionedSnapshotTasks) {
                    final SnapshotDataTarget target = createDataTargetForTable(file_path, file_nonce,
                            context.getHostId(), numTables, snapshotRecord, task.m_table);
                    task.setTarget(target);
                }

                return true;
View Full Code Here

                                                        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;
    }
View Full Code Here

                    } catch (Exception e) {
                        SNAP_LOG.error("Failed closing data target after error", e);
                    }
                }

                SnapshotDataTarget target = targets.get(task.m_table.getRelativeIndex());
                if (target == null) {
                    target = new DevNullSnapshotTarget();
                    final Runnable onClose = new TargetStatsClosure(target,
                            task.m_table.getTypeName(),
                            numTargets,
                            m_snapshotRecord);
                    target.setOnCloseHandler(onClose);

                    targets.put(task.m_table.getRelativeIndex(), target);
                    m_targets.add(target);
                    numTargets.incrementAndGet();
                }
View Full Code Here

TOP

Related Classes of org.voltdb.SnapshotDataTarget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.