Package org.apache.cassandra.io

Examples of org.apache.cassandra.io.SSTableWriter.closeAndOpenReader()


        ColumnFamily.serializer().serializeWithIndexes(cfamily, dob);
        writer.append(partitioner.decorateKey("rowB"), dob);
        dob.reset();
        cfamily.clear();
    
        SSTableReader reader = writer.closeAndOpenReader(0);
       
        // Export to JSON and verify
        File tempJson = File.createTempFile("Standard1", ".json");
        SSTableExport.export(reader, new PrintStream(tempJson.getPath()));
       
View Full Code Here


        ColumnFamily.serializer().serializeWithIndexes(cfamily, dob);
        writer.append(partitioner.decorateKey("rowB"), dob);
        dob.reset();
        cfamily.clear();
    
        SSTableReader reader = writer.closeAndOpenReader(0);
       
        // Export to JSON and verify
        File tempJson = File.createTempFile("Super4", ".json");
        SSTableExport.export(reader, new PrintStream(tempJson.getPath()));
       
View Full Code Here

        ColumnFamily.serializer().serializeWithIndexes(cfamily, dob);
        writer.append(partitioner.decorateKey("rowA"), dob);
        dob.reset();
        cfamily.clear();
       
        SSTableReader reader = writer.closeAndOpenReader(0);
       
        // Export to JSON and verify
        File tempJson = File.createTempFile("Standard1", ".json");
        SSTableExport.export(reader, new PrintStream(tempJson.getPath()));
       
View Full Code Here

            ColumnFamily.serializer().serializeWithIndexes(entry.getValue(), buffer);
            /* Now write the key and value to disk */
            writer.append(entry.getKey(), buffer);
        }

        SSTableReader ssTable = writer.closeAndOpenReader();
        logger.info("Completed flushing " + ssTable.getFilename());
        return ssTable;
    }

    public void flushAndSignal(final Condition condition, ExecutorService sorter, final ExecutorService writer)
View Full Code Here

            ColumnFamily.serializer().serializeWithIndexes(columnFamily, buffer);
            /* Now write the key and value to disk */
            writer.append(key, buffer);
        }

        SSTableReader ssTable = writer.closeAndOpenReader(DatabaseDescriptor.getKeysCachedFraction(table_));
        isFlushed_ = true;
        logger_.info("Completed flushing " + ssTable.getFilename());
        return ssTable;
    }

View Full Code Here

                writer.append(rowKey, dob);
                dob.reset();
                cfamily.clear();
            }
           
            writer.closeAndOpenReader(0);
        }
        catch (ClassCastException cce)
        {
            throw new RuntimeException("Invalid JSON input, or incorrect column family.", cce);
        }
View Full Code Here

        {
            byte[] bytes = columnFamilies_.get(key);
            assert bytes.length > 0;
            writer.append(key, bytes);
        }
        SSTableReader sstable = writer.closeAndOpenReader(DatabaseDescriptor.getKeysCachedFraction(table_));
        logger_.info("Completed flushing " + writer.getFilename());
        return sstable;
    }
}
View Full Code Here

            ColumnFamily.serializer().serializeWithIndexes(columnFamily, buffer);
            /* Now write the key and value to disk */
            writer.append(key, buffer);
        }

        SSTableReader ssTable = writer.closeAndOpenReader(DatabaseDescriptor.getKeysCachedFraction(table_));
        isFlushed_ = true;
        logger_.info("Completed flushing " + ssTable.getFilename());
        return ssTable;
    }

View Full Code Here

        {
            byte[] bytes = columnFamilies_.get(key);
            assert bytes.length > 0;
            writer.append(key, bytes);
        }
        SSTableReader sstable = writer.closeAndOpenReader(DatabaseDescriptor.getKeysCachedFraction(table_));
        logger_.info("Completed flushing " + writer.getFilename());
        return sstable;
    }
}
View Full Code Here

                ColumnFamily.serializer().serializeWithIndexes(columnFamily, buffer);
                /* Now write the key and value to disk */
                writer.append(partitioner.decorateKey(key), buffer);
            }
        }
        SSTableReader ssTable = writer.closeAndOpenReader(DatabaseDescriptor.getKeysCachedFraction(table_));
        cfStore.onMemtableFlush(cLogCtx);
        cfStore.storeLocation(ssTable);
        buffer.close();
        isFlushed_ = true;
        logger_.info("Completed flushing " + this);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.