public StreamReceiveTask(StreamSession session, UUID cfId, int totalFiles, long totalSize) { super(session, cfId); this.totalFiles = totalFiles; this.totalSize = totalSize; // this is an "offline" transaction, as we currently manually expose the sstables once done; // this should be revisited at a later date, so that LifecycleTransaction manages all sstable state changes this.txn = LifecycleTransaction.offline(OperationType.STREAM); this.sstables = new ArrayList<>(totalFiles); }
/** * construct a Transaction for use in an offline operation */ public static LifecycleTransaction offline(OperationType operationType, SSTableReader reader) { return offline(operationType, singleton(reader)); }
/** * construct a Transaction for use in an offline operation */ public static LifecycleTransaction offline(OperationType operationType, SSTableReader reader) { return offline(operationType, singleton(reader)); }
/** * construct a Transaction for use in an offline operation */ public static LifecycleTransaction offline(OperationType operationType, SSTableReader reader) { return offline(operationType, singleton(reader)); }
/** * construct a Transaction for use in an offline operation */ public static LifecycleTransaction offline(OperationType operationType, SSTableReader reader) { return offline(operationType, singleton(reader)); }
public StreamReceiveTask(StreamSession session, UUID cfId, int totalFiles, long totalSize) { super(session, cfId); this.totalFiles = totalFiles; this.totalSize = totalSize; // this is an "offline" transaction, as we currently manually expose the sstables once done; // this should be revisited at a later date, so that LifecycleTransaction manages all sstable state changes this.txn = LifecycleTransaction.offline(OperationType.STREAM); this.sstables = new ArrayList<>(totalFiles); }
public StreamReceiveTask(StreamSession session, UUID cfId, int totalFiles, long totalSize) { super(session, cfId); this.totalFiles = totalFiles; this.totalSize = totalSize; // this is an "offline" transaction, as we currently manually expose the sstables once done; // this should be revisited at a later date, so that LifecycleTransaction manages all sstable state changes this.txn = LifecycleTransaction.offline(OperationType.STREAM); this.sstables = new ArrayList<>(totalFiles); }
@SuppressWarnings("resource") // log and writer closed during doPostCleanup public static SSTableTxnWriter create(ColumnFamilyStore cfs, Descriptor descriptor, long keyCount, long repairedAt, int sstableLevel, SerializationHeader header) { LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.WRITE); SSTableMultiWriter writer = cfs.createSSTableMultiWriter(descriptor, keyCount, repairedAt, sstableLevel, header, txn); return new SSTableTxnWriter(txn, writer); }
@SuppressWarnings("resource") // log and writer closed during doPostCleanup public static SSTableTxnWriter create(ColumnFamilyStore cfs, Descriptor descriptor, long keyCount, long repairedAt, int sstableLevel, SerializationHeader header) { LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.WRITE); SSTableMultiWriter writer = cfs.createSSTableMultiWriter(descriptor, keyCount, repairedAt, sstableLevel, header, txn); return new SSTableTxnWriter(txn, writer); }
@SuppressWarnings("resource") // log and writer closed during doPostCleanup public static SSTableTxnWriter create(ColumnFamilyStore cfs, Descriptor descriptor, long keyCount, long repairedAt, int sstableLevel, SerializationHeader header) { LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.WRITE); SSTableMultiWriter writer = cfs.createSSTableMultiWriter(descriptor, keyCount, repairedAt, sstableLevel, header, txn); return new SSTableTxnWriter(txn, writer); }
@SuppressWarnings("resource") // log and writer closed during doPostCleanup public static SSTableTxnWriter createRangeAware(CFMetaData cfm, long keyCount, long repairedAt, SSTableFormat.Type type, int sstableLevel, SerializationHeader header) { ColumnFamilyStore cfs = Keyspace.open(cfm.ksName).getColumnFamilyStore(cfm.cfName); LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.WRITE); SSTableMultiWriter writer; try { writer = new RangeAwareSSTableWriter(cfs, keyCount, repairedAt, type, sstableLevel, 0, txn, header); } catch (IOException e) { //We don't know the total size so this should never happen //as we send in 0 throw new RuntimeException(e); } return new SSTableTxnWriter(txn, writer); }
public static SSTableTxnWriter createWithNoLogging(CFMetaData cfm, Descriptor descriptor, long keyCount, long repairedAt, int sstableLevel, SerializationHeader header) { // if the column family store does not exist, we create a new default SSTableMultiWriter to use: LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.CLEANUP); MetadataCollector collector = new MetadataCollector(cfm.comparator).sstableLevel(sstableLevel); SSTableMultiWriter writer = SimpleSSTableMultiWriter.create(descriptor, keyCount, repairedAt, cfm, collector, header, txn); return new SSTableTxnWriter(writer); }
@SuppressWarnings("resource") // log and writer closed during doPostCleanup public static SSTableTxnWriter createRangeAware(CFMetaData cfm, long keyCount, long repairedAt, SSTableFormat.Type type, int sstableLevel, SerializationHeader header) { ColumnFamilyStore cfs = Keyspace.open(cfm.ksName).getColumnFamilyStore(cfm.cfName); LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.WRITE); SSTableMultiWriter writer; try { writer = new RangeAwareSSTableWriter(cfs, keyCount, repairedAt, type, sstableLevel, 0, txn, header); } catch (IOException e) { //We don't know the total size so this should never happen //as we send in 0 throw new RuntimeException(e); } return new SSTableTxnWriter(txn, writer); }
@SuppressWarnings("resource") // log and writer closed during doPostCleanup public static SSTableTxnWriter create(CFMetaData cfm, Descriptor descriptor, long keyCount, long repairedAt, int sstableLevel, SerializationHeader header) { // if the column family store does not exist, we create a new default SSTableMultiWriter to use: LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.WRITE); MetadataCollector collector = new MetadataCollector(cfm.comparator).sstableLevel(sstableLevel); SSTableMultiWriter writer = SimpleSSTableMultiWriter.create(descriptor, keyCount, repairedAt, cfm, collector, header, txn); return new SSTableTxnWriter(writer); }
@SuppressWarnings("resource") // log and writer closed during doPostCleanup public static SSTableTxnWriter createRangeAware(CFMetaData cfm, long keyCount, long repairedAt, SSTableFormat.Type type, int sstableLevel, SerializationHeader header) { ColumnFamilyStore cfs = Keyspace.open(cfm.ksName).getColumnFamilyStore(cfm.cfName); LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.WRITE); SSTableMultiWriter writer; try { writer = new RangeAwareSSTableWriter(cfs, keyCount, repairedAt, type, sstableLevel, 0, txn, header); } catch (IOException e) { //We don't know the total size so this should never happen //as we send in 0 throw new RuntimeException(e); } return new SSTableTxnWriter(txn, writer); }
try (LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.UPGRADE_SSTABLES, sstable))
try (LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.UPGRADE_SSTABLES, sstable))
try (LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.UPGRADE_SSTABLES, sstable))
long minBytesOnDisk = Long.MAX_VALUE; List<SSTableReader> sstables = new ArrayList<>(); try (LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.FLUSH))
long minBytesOnDisk = Long.MAX_VALUE; List<SSTableReader> sstables = new ArrayList<>(); try (LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.FLUSH))