Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
Upgraded to cassandra 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
edu committed Oct 11, 2016
1 parent b863f05 commit 1a0c8d3
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 62 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
## 3.8.0 (Upcoming)

## 3.7.3 (Upcoming)
* Upgrade to Apache Cassandra 3.8

## 3.7.3 (October 07, 2016)

* Add support for indexing non-frozen UDTs

Expand Down
2 changes: 1 addition & 1 deletion builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>com.stratio.cassandra</groupId>
<artifactId>cassandra-lucene-index-parent</artifactId>
<version>3.7.3-RC1-SNAPSHOT</version>
<version>3.8.0-SNAPSHOT</version>
</parent>

<packaging>jar</packaging>
Expand Down
60 changes: 31 additions & 29 deletions doc/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,35 +244,37 @@ If you have huge amount of data in your cluster this could be an expensive task.
compatibility matrix that states between which versions it is not needed to delete the index:


+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| From\\ To | 3.0.3.0 | 3.0.3.1 | 3.0.4.0 | 3.0.4.1 | 3.0.5.0 | 3.5.0 | 3.5.1 | 3.5.2 | 3.6.0 | 3.7.0 | 3.7.1 | 3.7.2 | 3.7.3 |
+===========+=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+
| 2.x | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.0.3.0 | -- | YES | YES | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.0.3.1 | -- | -- | YES | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.0.4.0 | -- | -- | -- | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.0.4.1 | -- | -- | -- | -- | YES | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.0.5.0 | -- | -- | -- | -- | -- | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.5.0 | -- | -- | -- | -- | -- | -- | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.5.1 | -- | -- | -- | -- | -- | -- | -- | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.5.2 | -- | -- | -- | -- | -- | -- | -- | -- | YES | YES | YES | YES | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.6.0 | -- | -- | -- | -- | -- | -- | -- | -- | -- | YES | YES | YES | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.7.0 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | YES | YES | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.7.1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | (1) | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.7.2 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| From\\ To | 3.0.3.0 | 3.0.3.1 | 3.0.4.0 | 3.0.4.1 | 3.0.5.0 | 3.5.0 | 3.5.1 | 3.5.2 | 3.6.0 | 3.7.0 | 3.7.1 | 3.7.2 | 3.7.3 | 3.8.0 |
+===========+=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+
| 2.x | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.0.3.0 | -- | YES | YES | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.0.3.1 | -- | -- | YES | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.0.4.0 | -- | -- | -- | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.0.4.1 | -- | -- | -- | -- | YES | NO | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.0.5.0 | -- | -- | -- | -- | -- | NO | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.5.0 | -- | -- | -- | -- | -- | -- | NO | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.5.1 | -- | -- | -- | -- | -- | -- | -- | NO | NO | NO | NO | NO | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.5.2 | -- | -- | -- | -- | -- | -- | -- | -- | YES | YES | YES | YES | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.6.0 | -- | -- | -- | -- | -- | -- | -- | -- | -- | YES | YES | YES | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.7.0 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | YES | YES | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.7.1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | (1) | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.7.2 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | NO | NO |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 3.7.3 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | YES |
+-----------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+


**(1):** Compatible only if you are not using geospatial mappers.
Expand Down
10 changes: 8 additions & 2 deletions plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>com.stratio.cassandra</groupId>
<artifactId>cassandra-lucene-index-parent</artifactId>
<version>3.7.3-RC1-SNAPSHOT</version>
<version>3.8.0-SNAPSHOT</version>
</parent>

<packaging>jar</packaging>
Expand All @@ -38,7 +38,7 @@
<scala.version>2.10.4</scala.version>
<scala.binary.version>2.10</scala.binary.version>
<scalatest.version>2.2.5</scalatest.version>
<cassandra.version>3.7</cassandra.version>
<cassandra.version>3.8</cassandra.version>
<lucene.version>5.5.1</lucene.version>
<jts.version>1.14.0</jts.version>
<mockito.version>1.10.19</mockito.version>
Expand Down Expand Up @@ -99,6 +99,12 @@
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ public Callable<?> getBlockingFlushTask() {
return () -> {
logger.info("Flushing Lucene index {}", name);
service.commit();
logger.info("Flushed Lucene index {}", name);
return null;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
package com.stratio.cassandra.lucene;

import com.stratio.cassandra.lucene.column.Columns;
import com.stratio.cassandra.lucene.index.DocumentIterator;
import com.stratio.cassandra.lucene.index.FSIndex;
import com.stratio.cassandra.lucene.index.RAMIndex;
import com.stratio.cassandra.lucene.index.*;
import com.stratio.cassandra.lucene.key.PartitionMapper;
import com.stratio.cassandra.lucene.key.TokenMapper;
import com.stratio.cassandra.lucene.schema.Schema;
Expand Down Expand Up @@ -592,29 +590,28 @@ private Sort sort(Search search) {
* @param key the partition key
* @param clusterings the clustering keys
* @param nowInSec max allowed time in seconds
* @param opGroup operation group spanning the calling operation
* @return a {@link Row} iterator
*/
UnfilteredRowIterator read(DecoratedKey key,
NavigableSet<Clustering> clusterings,
int nowInSec,
OpOrder.Group opGroup) {
int nowInSec) {
ClusteringIndexNamesFilter filter = new ClusteringIndexNamesFilter(clusterings, false);
ColumnFilter columnFilter = ColumnFilter.all(metadata);
return SinglePartitionReadCommand.create(metadata, nowInSec, key, columnFilter, filter)
.queryMemtableAndDisk(table, opGroup);
SinglePartitionReadCommand readCommand= SinglePartitionReadCommand.create(metadata, nowInSec, key, columnFilter, filter);
try(ReadExecutionController controller=readCommand.executionController()) {
return readCommand.queryMemtableAndDisk(table,controller);
}
}

/**
* Retrieves from the local storage all the {@link Row}s in the specified partition.
*
* @param key the partition key
* @param nowInSec max allowed time in seconds
* @param opGroup operation group spanning the calling operation
* @return a {@link Row} iterator
*/
UnfilteredRowIterator read(DecoratedKey key, int nowInSec, OpOrder.Group opGroup) {
return read(key, clusterings(Clustering.EMPTY), nowInSec, opGroup);
UnfilteredRowIterator read(DecoratedKey key, int nowInSec) {
return read(key, clusterings(Clustering.EMPTY), nowInSec);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public IndexWriterSkinny indexWriter(DecoratedKey key,
int nowInSec,
OpOrder.Group opGroup,
IndexTransaction.Type transactionType) {
return new IndexWriterSkinny(this, key, nowInSec, opGroup, transactionType);
return new IndexWriterSkinny(this, key, nowInSec, transactionType);
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public IndexWriterWide indexWriter(DecoratedKey key,
int nowInSec,
OpOrder.Group opGroup,
IndexTransaction.Type transactionType) {
return new IndexWriterWide(this, key, nowInSec, opGroup, transactionType);
return new IndexWriterWide(this, key, nowInSec, transactionType);
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ abstract class IndexWriter implements Index.Indexer {
protected final IndexService service;
protected final DecoratedKey key;
protected final int nowInSec;
protected final OpOrder.Group opGroup;
protected final IndexTransaction.Type transactionType;

/**
Expand All @@ -45,18 +44,15 @@ abstract class IndexWriter implements Index.Indexer {
* @param service the service to perform the indexing operation
* @param key key of the partition being modified
* @param nowInSec current time of the update operation
* @param opGroup operation group spanning the update operation
* @param transactionType what kind of update is being performed on the base data
*/
IndexWriter(IndexService service,
DecoratedKey key,
int nowInSec,
OpOrder.Group opGroup,
IndexTransaction.Type transactionType) {
this.service = service;
this.key = key;
this.nowInSec = nowInSec;
this.opGroup = opGroup;
this.transactionType = transactionType;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@ class IndexWriterSkinny extends IndexWriter {
* @param service the service to perform the indexing operation
* @param key key of the partition being modified
* @param nowInSec current time of the update operation
* @param opGroup operation group spanning the update operation
* @param transactionType what kind of update is being performed on the base data
*/
IndexWriterSkinny(IndexServiceSkinny service,
DecoratedKey key,
int nowInSec,
OpOrder.Group opGroup,
IndexTransaction.Type transactionType) {
super(service, key, nowInSec, opGroup, transactionType);
super(service, key, nowInSec, transactionType);
optionalRow = Optional.empty();
}

Expand All @@ -71,7 +69,7 @@ public void finish() {
optionalRow.ifPresent(row -> {
if (transactionType == IndexTransaction.Type.COMPACTION || service.needsReadBeforeWrite(key, row)) {
Tracer.trace("Lucene index reading before write");
UnfilteredRowIterator iterator = service.read(key, nowInSec, opGroup);
UnfilteredRowIterator iterator = service.read(key, nowInSec);
if (iterator.hasNext()) {
row = (Row) iterator.next();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ class IndexWriterWide extends IndexWriter {
IndexWriterWide(IndexServiceWide service,
DecoratedKey key,
int nowInSec,
OpOrder.Group opGroup,
IndexTransaction.Type transactionType) {
super(service, key, nowInSec, opGroup, transactionType);
super(service, key, nowInSec, transactionType);
rowsToRead = service.clusterings();
rows = new LinkedHashMap<>();
}
Expand Down Expand Up @@ -86,7 +85,7 @@ public void finish() {
if (transactionType != IndexTransaction.Type.CLEANUP) {

// Read required rows from storage engine
service.read(key, rowsToRead, nowInSec, opGroup).forEachRemaining(unfiltered -> {
service.read(key, rowsToRead, nowInSec).forEachRemaining(unfiltered -> {
Row row = (Row) unfiltered;
rows.put(row.clustering(), Optional.of(row));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import com.google.common.collect.Lists
import com.stratio.cassandra.lucene.BaseScalaTest
import com.stratio.cassandra.lucene.column.ColumnsMapper._
import org.apache.cassandra.config.ColumnDefinition
import org.apache.cassandra.cql3.FieldIdentifier
import org.apache.cassandra.db.marshal._
import org.apache.cassandra.db.rows.{BufferCell, Cell}
import org.apache.cassandra.utils.UUIDGen
Expand Down Expand Up @@ -252,7 +253,7 @@ class ColumnsMapperTest extends BaseScalaTest {
new UserType(
"ks",
UTF8Type.instance.decompose("cell"),
Lists.newArrayList(names.map(x => UTF8Type.instance.decompose(x)).asJava),
Lists.newArrayList(names.map(x => new FieldIdentifier(UTF8Type.instance.decompose(x))).asJava),
Lists.newArrayList(types.asJava),false)
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<packaging>pom</packaging>
<groupId>com.stratio.cassandra</groupId>
<artifactId>cassandra-lucene-index-parent</artifactId>
<version>3.7.3-RC1-SNAPSHOT</version>
<version>3.8.0-SNAPSHOT</version>
<name>Cassandra Lucene index</name>
<description>Cassandra Lucene index</description>

Expand Down
6 changes: 3 additions & 3 deletions testsAT/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<groupId>com.stratio.cassandra</groupId>
<artifactId>cassandra-lucene-index-tests</artifactId>
<version>3.7.3-RC1-SNAPSHOT</version>
<version>3.8.0-SNAPSHOT</version>

<packaging>jar</packaging>
<name>Cassandra Lucene Index acceptance tests</name>
Expand All @@ -34,7 +34,7 @@
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<cassandra.driver.version>3.0.2</cassandra.driver.version>
<cassandra.driver.version>3.1.0</cassandra.driver.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<runSuite>**/AllSuite.java</runSuite>
</properties>
Expand Down Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 1a0c8d3

Please sign in to comment.