Package org.apache.cassandra.io.sstable

Examples of org.apache.cassandra.io.sstable.SSTableMetadata$SSTableMetadataSerializer


        }

        for (String fname : args)
        {
            Descriptor descriptor = Descriptor.fromFilename(fname);
            SSTableMetadata metadata = SSTableMetadata.serializer.deserialize(descriptor);

            out.printf("SSTable: %s%n", descriptor);
            out.printf("Partitioner: %s%n", metadata.partitioner);
            out.printf("Maximum timestamp: %s%n", metadata.maxTimestamp);
            out.printf("Compression ratio: %s%n", metadata.compressionRatio);
            out.printf("Estimated droppable tombstones: %s%n", metadata.getEstimatedDroppableTombstoneRatio((int) (System.currentTimeMillis() / 1000)));
            out.println(metadata.replayPosition);
            printHistograms(metadata, out);
        }
    }
View Full Code Here


        }

        for (String fname : args)
        {
            Descriptor descriptor = Descriptor.fromFilename(fname);
            SSTableMetadata metadata = SSTableMetadata.serializer.deserialize(descriptor).left;

            out.printf("SSTable: %s%n", descriptor);
            out.printf("Partitioner: %s%n", metadata.partitioner);
            out.printf("Maximum timestamp: %s%n", metadata.maxTimestamp);
            out.printf("SSTable max local deletion time: %s%n", metadata.maxLocalDeletionTime);
            out.printf("Compression ratio: %s%n", metadata.compressionRatio);
            out.printf("Estimated droppable tombstones: %s%n", metadata.getEstimatedDroppableTombstoneRatio((int) (System.currentTimeMillis() / 1000)));
            out.printf("SSTable Level: %d%n", metadata.sstableLevel);
            out.println(metadata.replayPosition);
            printHistograms(metadata, out);
        }
    }
View Full Code Here

        LegacyLeveledManifest.migrateManifests(KS, CF);

        for (int i = 0; i <= 2; i++)
        {
            Descriptor descriptor = Descriptor.fromFilename(destDir+File.separator+KS+"-"+CF+"-"+LEGACY_VERSION+"-"+i+"-Statistics.db");
            SSTableMetadata metadata = SSTableMetadata.serializer.deserialize(descriptor).left;
            assertEquals(metadata.sstableLevel, i);
        }
    }
View Full Code Here

        LegacyLeveledManifest.migrateManifests(KS, CF);

        for (Map.Entry<Descriptor, Pair<SSTableMetadata, Set<Integer>>> entry : beforeMigration.entrySet())
        {
            Pair<SSTableMetadata, Set<Integer>> newMetaPair = SSTableMetadata.serializer.deserialize(entry.getKey());
            SSTableMetadata newMetadata = newMetaPair.left;
            SSTableMetadata oldMetadata = entry.getValue().left;
            assertEquals(newMetadata.estimatedRowSize, oldMetadata.estimatedRowSize);
            assertEquals(newMetadata.estimatedColumnCount, oldMetadata.estimatedColumnCount);
            assertEquals(newMetadata.replayPosition, oldMetadata.replayPosition);
            assertEquals(newMetadata.minTimestamp, oldMetadata.minTimestamp);
            assertEquals(newMetadata.maxTimestamp, oldMetadata.maxTimestamp);
View Full Code Here

        }

        for (String fname : args)
        {
            Descriptor descriptor = Descriptor.fromFilename(fname);
            SSTableMetadata metadata = SSTableMetadata.serializer.deserialize(descriptor).left;

            out.printf("SSTable: %s%n", descriptor);
            out.printf("Partitioner: %s%n", metadata.partitioner);
            out.printf("Maximum timestamp: %s%n", metadata.maxTimestamp);
            out.printf("Compression ratio: %s%n", metadata.compressionRatio);
            out.printf("Estimated droppable tombstones: %s%n", metadata.getEstimatedDroppableTombstoneRatio((int) (System.currentTimeMillis() / 1000)));
            out.println(metadata.replayPosition);
            printHistograms(metadata, out);
        }
    }
View Full Code Here

        for (String fname : args)
        {
            if (new File(fname).exists())
            {
                Descriptor descriptor = Descriptor.fromFilename(fname);
                SSTableMetadata metadata = SSTableMetadata.serializer.deserialize(descriptor).left;

                out.printf("SSTable: %s%n", descriptor);
                out.printf("Partitioner: %s%n", metadata.partitioner);
                out.printf("Maximum timestamp: %s%n", metadata.maxTimestamp);
                out.printf("SSTable max local deletion time: %s%n", metadata.maxLocalDeletionTime);
                out.printf("Compression ratio: %s%n", metadata.compressionRatio);
                out.printf("Estimated droppable tombstones: %s%n", metadata.getEstimatedDroppableTombstoneRatio((int) (System.currentTimeMillis() / 1000)));
                out.printf("SSTable Level: %d%n", metadata.sstableLevel);
                out.println(metadata.replayPosition);
                printHistograms(metadata, out);
                out.println("Estimated tombstone drop times:");
                for (Map.Entry<Double, Long> entry : metadata.estimatedTombstoneDropTime.getAsMap().entrySet())
View Full Code Here

                assertEquals(3,r.cf.getColumn(ByteBufferUtil.bytes("a")).timestamp());
            }

            for (SSTableReader sstable : cfs.getSSTables())
            {
                SSTableMetadata stats = sstable.getSSTableMetadata();
                assertEquals(ByteBufferUtil.bytes("0"), stats.minColumnNames.get(0));
                assertEquals(ByteBufferUtil.bytes("b"), stats.maxColumnNames.get(0));
            }

            assertEquals(keys, k);
View Full Code Here

        LegacyLeveledManifest.migrateManifests(KS, CF);

        for (int i = 0; i <= 2; i++)
        {
            Descriptor descriptor = Descriptor.fromFilename(destDir+File.separator+KS+"-"+CF+"-"+LEGACY_VERSION+"-"+i+"-Statistics.db");
            SSTableMetadata metadata = SSTableMetadata.serializer.deserialize(descriptor).left;
            assertEquals(metadata.sstableLevel, i);
        }
    }
View Full Code Here

        LegacyLeveledManifest.migrateManifests(KS, CF);

        for (Map.Entry<Descriptor, Pair<SSTableMetadata, Set<Integer>>> entry : beforeMigration.entrySet())
        {
            Pair<SSTableMetadata, Set<Integer>> newMetaPair = SSTableMetadata.serializer.deserialize(entry.getKey());
            SSTableMetadata newMetadata = newMetaPair.left;
            SSTableMetadata oldMetadata = entry.getValue().left;
            assertEquals(newMetadata.estimatedRowSize, oldMetadata.estimatedRowSize);
            assertEquals(newMetadata.estimatedColumnCount, oldMetadata.estimatedColumnCount);
            assertEquals(newMetadata.replayPosition, oldMetadata.replayPosition);
            assertEquals(newMetadata.minTimestamp, oldMetadata.minTimestamp);
            assertEquals(newMetadata.maxTimestamp, oldMetadata.maxTimestamp);
View Full Code Here

        }

        for (String fname : args)
        {
            Descriptor descriptor = Descriptor.fromFilename(fname);
            SSTableMetadata metadata = SSTableMetadata.serializer.deserialize(descriptor);

            out.printf("SSTable: %s\n", descriptor);
            out.printf("Partitioner: %s\n", metadata.partitioner);
            out.printf("Maximum timestamp: %s\n", metadata.maxTimestamp);
            out.printf("Compression ratio: %s\n", metadata.compressionRatio);
View Full Code Here

TOP

Related Classes of org.apache.cassandra.io.sstable.SSTableMetadata$SSTableMetadataSerializer

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.