merge from 2.0

This commit is contained in:
Jonathan Ellis 2013-09-19 16:54:26 -05:00
commit 681312393b
5 changed files with 24 additions and 23 deletions

View File

@ -6,15 +6,10 @@
* Remove leveled json manifest migration code (CASSANDRA-5996)
2.0.2
2.0.1
* Improve memory use defaults (CASSANDRA-5069)
* Make ThriftServer more easlly extensible (CASSANDRA-6058)
* Remove Hadoop dependency from ITransportFactory (CASSANDRA-6062)
Merged from 1.2:
* Allow cache-keys-to-save to be set at runtime (CASSANDRA-5980)
2.0.1
* add file_cache_size_in_mb setting (CASSANDRA-5661)
* Improve error message when yaml contains invalid properties (CASSANDRA-5958)
* Improve leveled compaction's ability to find non-overlapping L0 compactions
@ -44,6 +39,7 @@ Merged from 1.2:
* Fix validation of IN clauses with 2ndary indexes (CASSANDRA-6050)
* Support named bind variables in CQL (CASSANDRA-6033)
Merged from 1.2:
* Allow cache-keys-to-save to be set at runtime (CASSANDRA-5980)
* Avoid second-guessing out-of-space state (CASSANDRA-5605)
* Tuning knobs for dealing with large blobs and many CFs (CASSANDRA-5982)
* (Hadoop) Fix CQLRW for thrift tables (CASSANDRA-6002)

View File

@ -355,7 +355,7 @@
<dependency groupId="com.googlecode.json-simple" artifactId="json-simple" version="1.1"/>
<dependency groupId="com.github.stephenc.high-scale-lib" artifactId="high-scale-lib" version="1.1.2"/>
<dependency groupId="com.github.stephenc" artifactId="jamm" version="0.2.5"/>
<dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.0">
<dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.2">
<exclusion groupId="org.slf4j" artifactId="slf4j-log4j12"/>
</dependency>
<dependency groupId="org.yaml" artifactId="snakeyaml" version="1.11"/>
@ -456,7 +456,7 @@
<dependency groupId="edu.stanford.ppl" artifactId="snaptree"/>
<dependency groupId="org.mindrot" artifactId="jbcrypt"/>
<dependency groupId="com.yammer.metrics" artifactId="metrics-core"/>
<dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.0"/>
<dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.2"/>
<dependency groupId="ch.qos.logback" artifactId="logback-core"/>
<dependency groupId="ch.qos.logback" artifactId="logback-classic"/>

View File

@ -160,8 +160,17 @@ public class SSTableReader extends SSTable implements Closeable
partitioner,
System.currentTimeMillis(),
sstableMetadata);
// don't save index summary to disk if we needed to build one
sstable.load(false, false);
// special implementation of load to use non-pooled SegmentedFile builders
SegmentedFile.Builder ibuilder = new BufferedSegmentedFile.Builder();
SegmentedFile.Builder dbuilder = sstable.compression
? new CompressedSegmentedFile.Builder()
: new BufferedSegmentedFile.Builder();
if (!loadSummary(sstable, ibuilder, dbuilder, sstable.metadata))
sstable.buildSummary(false, ibuilder, dbuilder, false);
sstable.ifile = ibuilder.complete(sstable.descriptor.filenameFor(Component.PRIMARY_INDEX));
sstable.dfile = dbuilder.complete(sstable.descriptor.filenameFor(Component.DATA));
sstable.bf = FilterFactory.AlwaysPresent;
return sstable;
}
@ -411,7 +420,6 @@ public class SSTableReader extends SSTable implements Closeable
? SegmentedFile.getCompressedBuilder()
: SegmentedFile.getBuilder(DatabaseDescriptor.getDiskAccessMode());
boolean summaryLoaded = loadSummary(this, ibuilder, dbuilder, metadata);
if (recreateBloomFilter || !summaryLoaded)
buildSummary(recreateBloomFilter, ibuilder, dbuilder, summaryLoaded);

View File

@ -19,7 +19,7 @@ package org.apache.cassandra.io.util;
import java.io.File;
public class BufferedSegmentedFile extends PoolingSegmentedFile
public class BufferedSegmentedFile extends SegmentedFile
{
public BufferedSegmentedFile(String path, long length)
{
@ -28,20 +28,11 @@ public class BufferedSegmentedFile extends PoolingSegmentedFile
public static class Builder extends SegmentedFile.Builder
{
/**
* Adds a position that would be a safe place for a segment boundary in the file. For a block/row based file
* format, safe boundaries are block/row edges.
* @param boundary The absolute position of the potential boundary in the file.
*/
public void addPotentialBoundary(long boundary)
{
// only one segment in a standard-io file
}
/**
* Called after all potential boundaries have been added to apply this Builder to a concrete file on disk.
* @param path The file on disk.
*/
public SegmentedFile complete(String path)
{
long length = new File(path).length();
@ -49,8 +40,14 @@ public class BufferedSegmentedFile extends PoolingSegmentedFile
}
}
protected RandomAccessReader createReader(String path)
public FileDataInput getSegment(long position)
{
RandomAccessReader reader = RandomAccessReader.open(new File(path));
reader.seek(position);
return reader;
}
public void cleanup()
{
return RandomAccessReader.open(new File(path), this);
}
}