Package org.apache.cassandra.streaming.compress

Examples of org.apache.cassandra.streaming.compress.CompressionInfo


            long estimatedKeys = in.readLong();
            int count = in.readInt();
            List<Pair<Long, Long>> sections = new ArrayList<>(count);
            for (int k = 0; k < count; k++)
                sections.add(Pair.create(in.readLong(), in.readLong()));
            CompressionInfo compressionInfo = CompressionInfo.serializer.deserialize(in, MessagingService.current_version);
            return new FileMessageHeader(cfId, sequenceNumber, sstableVersion, estimatedKeys, sections, compressionInfo);
        }
View Full Code Here


    public FileMessage(SSTableReader sstable, int sequenceNumber, long estimatedKeys, List<Pair<Long, Long>> sections)
    {
        super(Type.FILE);
        this.sstable = sstable;

        CompressionInfo compressionInfo = null;
        if (sstable.compression)
        {
            CompressionMetadata meta = sstable.getCompressionMetadata();
            compressionInfo = new CompressionInfo(meta.getChunksForSections(sections), meta.parameters);
        }
        this.header = new FileMessageHeader(sstable.metadata.cfId,
                                            sequenceNumber,
                                            sstable.descriptor.version.toString(),
                                            estimatedKeys,
View Full Code Here

                sections.add(Pair.create(dis.readLong(), dis.readLong()));
            // this controls the way indexes are rebuilt when streaming in.
            OperationType type = OperationType.RESTORE_REPLICA_COUNT;
            type = OperationType.valueOf(dis.readUTF());
            long estimatedKeys = dis.readLong();
            CompressionInfo info = null;
            if (version > MessagingService.VERSION_11)
                info = CompressionInfo.serializer.deserialize(dis, version);
            return new PendingFile(null, desc, component, sections, type, estimatedKeys, info);
        }
View Full Code Here

            {
                // A reference was acquired on the sstable and we won't stream it
                sstable.releaseReference();
                continue;
            }
            CompressionInfo compression = null;
            if (sstable.compression)
            {
                compression = new CompressionInfo(sstable.getCompressionMetadata().getChunksForSections(sections),
                                                  sstable.getCompressionMetadata().parameters);
            }
            pending.add(new PendingFile(sstable, desc, SSTable.COMPONENT_DATA, sections, type, sstable.estimatedKeysForRanges(ranges), compression));
        }
        logger.info("Stream context metadata {}, {} sstables.", pending, Iterables.size(sstables));
View Full Code Here

    public OutgoingFileMessage(SSTableReader sstable, int sequenceNumber, long estimatedKeys, List<Pair<Long, Long>> sections)
    {
        super(Type.FILE);
        this.sstable = sstable;

        CompressionInfo compressionInfo = null;
        if (sstable.compression)
        {
            CompressionMetadata meta = sstable.getCompressionMetadata();
            compressionInfo = new CompressionInfo(meta.getChunksForSections(sections), meta.parameters);
        }
        this.header = new FileMessageHeader(sstable.metadata.cfId,
                sequenceNumber,
                sstable.descriptor.version.toString(),
                estimatedKeys,
View Full Code Here

            long estimatedKeys = in.readLong();
            int count = in.readInt();
            List<Pair<Long, Long>> sections = new ArrayList<>(count);
            for (int k = 0; k < count; k++)
                sections.add(Pair.create(in.readLong(), in.readLong()));
            CompressionInfo compressionInfo = CompressionInfo.serializer.deserialize(in, MessagingService.current_version);
            return new FileMessageHeader(cfId, sequenceNumber, sstableVersion, estimatedKeys, sections, compressionInfo);
        }
View Full Code Here

    public FileMessage(SSTableReader sstable, int sequenceNumber, long estimatedKeys, List<Pair<Long, Long>> sections)
    {
        super(Type.FILE);
        this.sstable = sstable;

        CompressionInfo compressionInfo = null;
        if (sstable.compression)
        {
            CompressionMetadata meta = sstable.getCompressionMetadata();
            compressionInfo = new CompressionInfo(meta.getChunksForSections(sections), meta.parameters);
        }
        this.header = new FileMessageHeader(sstable.metadata.cfId,
                                            sequenceNumber,
                                            sstable.descriptor.version.toString(),
                                            estimatedKeys,
View Full Code Here

TOP

Related Classes of org.apache.cassandra.streaming.compress.CompressionInfo

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.