Package org.apache.cassandra.io.sstable.format

Examples of org.apache.cassandra.io.sstable.format.SSTableWriter


    @Test
    public void testAsciiKeyValidator() throws IOException, ParseException
    {
        File tempSS = tempSSTableFile(KEYSPACE1, "AsciiKeys");
        ColumnFamily cfamily = ArrayBackedSortedColumns.factory.create(KEYSPACE1, "AsciiKeys");
        SSTableWriter writer = SSTableWriter.create(tempSS.getPath(), 2, ActiveRepairService.UNREPAIRED_SSTABLE, 0);

        // Add a row
        cfamily.addColumn(column("column", "value", 1L));
        writer.append(Util.dk("key", AsciiType.instance), cfamily);

        SSTableReader reader = writer.closeAndOpenReader();
        // Export to JSON and verify
        File tempJson = File.createTempFile("CFWithAsciiKeys", ".json");
        SSTableExport.export(reader,
                             new PrintStream(tempJson.getPath()),
                             new String[0],
View Full Code Here

TOP

Related Classes of org.apache.cassandra.io.sstable.format.SSTableWriter

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.