Update version and add missing license
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fdf29594 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fdf29594 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fdf29594 Branch: refs/heads/trunk Commit: fdf29594caae2ec0b59a485edc59250a7f49e792 Parents: 52f3912 Author: Sylvain Lebresne <[email protected]> Authored: Mon Nov 5 18:41:01 2012 +0100 Committer: Sylvain Lebresne <[email protected]> Committed: Mon Nov 5 18:41:01 2012 +0100 ---------------------------------------------------------------------- build.xml | 2 +- debian/changelog | 6 + .../db/columniterator/IColumnIteratorFactory.java | 21 +++ .../db/columniterator/LazyColumnIterator.java | 21 +++ .../apache/cassandra/tools/AbstractJmxClient.java | 21 +++ src/java/org/apache/cassandra/tools/Shuffle.java | 21 +++ .../cassandra/utils/AlwaysPresentFilter.java | 21 +++ .../org/apache/cassandra/db/HintedHandOffTest.java | 139 +++++++++------ 8 files changed, 192 insertions(+), 60 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdf29594/build.xml ---------------------------------------------------------------------- diff --git a/build.xml b/build.xml index 097da2a..a9a1b14 100644 --- a/build.xml +++ b/build.xml @@ -25,7 +25,7 @@ <property name="debuglevel" value="source,lines,vars"/> <!-- default version and SCM information --> - <property name="base.version" value="1.2.0-beta1"/> + <property name="base.version" value="1.2.0-beta2"/> <property name="scm.connection" value="scm:git://git.apache.org/cassandra.git"/> <property name="scm.developerConnection" value="scm:git://git.apache.org/cassandra.git"/> <property name="scm.url" value="http://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=tree"/> http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdf29594/debian/changelog ---------------------------------------------------------------------- diff --git a/debian/changelog b/debian/changelog index e5db090..a0caacb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cassandra (1.2.0~beta2) unstable; urgency=low + + * New beta release + + -- Sylvain Lebresne <[email protected]> Mon, 05 Nov 2012 18:17:03 +0100 + cassandra (1.2.0~beta1) unstable; urgency=low * New release http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdf29594/src/java/org/apache/cassandra/db/columniterator/IColumnIteratorFactory.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/db/columniterator/IColumnIteratorFactory.java b/src/java/org/apache/cassandra/db/columniterator/IColumnIteratorFactory.java index 91fcdd8..1d618a5 100644 --- a/src/java/org/apache/cassandra/db/columniterator/IColumnIteratorFactory.java +++ b/src/java/org/apache/cassandra/db/columniterator/IColumnIteratorFactory.java @@ -1,4 +1,25 @@ package org.apache.cassandra.db.columniterator; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + public interface IColumnIteratorFactory { http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdf29594/src/java/org/apache/cassandra/db/columniterator/LazyColumnIterator.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/db/columniterator/LazyColumnIterator.java b/src/java/org/apache/cassandra/db/columniterator/LazyColumnIterator.java index aa2c188..80c7037 100644 --- a/src/java/org/apache/cassandra/db/columniterator/LazyColumnIterator.java +++ b/src/java/org/apache/cassandra/db/columniterator/LazyColumnIterator.java @@ -1,4 +1,25 @@ package org.apache.cassandra.db.columniterator; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + import com.google.common.collect.AbstractIterator; import org.apache.cassandra.db.ColumnFamily; http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdf29594/src/java/org/apache/cassandra/tools/AbstractJmxClient.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/tools/AbstractJmxClient.java b/src/java/org/apache/cassandra/tools/AbstractJmxClient.java index 65b313b..3d5cd3a 100644 --- a/src/java/org/apache/cassandra/tools/AbstractJmxClient.java +++ b/src/java/org/apache/cassandra/tools/AbstractJmxClient.java @@ -1,4 +1,25 @@ package org.apache.cassandra.tools; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + import java.io.Closeable; import java.io.IOException; http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdf29594/src/java/org/apache/cassandra/tools/Shuffle.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/tools/Shuffle.java b/src/java/org/apache/cassandra/tools/Shuffle.java index 70b747d..8cf38b9 100644 --- a/src/java/org/apache/cassandra/tools/Shuffle.java +++ b/src/java/org/apache/cassandra/tools/Shuffle.java @@ -1,4 +1,25 @@ package org.apache.cassandra.tools; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + import java.io.Closeable; import java.io.IOException; http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdf29594/src/java/org/apache/cassandra/utils/AlwaysPresentFilter.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/utils/AlwaysPresentFilter.java b/src/java/org/apache/cassandra/utils/AlwaysPresentFilter.java index 521eff0..67ac111 100644 --- a/src/java/org/apache/cassandra/utils/AlwaysPresentFilter.java +++ b/src/java/org/apache/cassandra/utils/AlwaysPresentFilter.java @@ -1,4 +1,25 @@ package org.apache.cassandra.utils; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + import java.io.IOException; import java.nio.ByteBuffer; http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdf29594/test/unit/org/apache/cassandra/db/HintedHandOffTest.java ---------------------------------------------------------------------- diff --git a/test/unit/org/apache/cassandra/db/HintedHandOffTest.java b/test/unit/org/apache/cassandra/db/HintedHandOffTest.java index b6b0a5f..0b04250 100644 --- a/test/unit/org/apache/cassandra/db/HintedHandOffTest.java +++ b/test/unit/org/apache/cassandra/db/HintedHandOffTest.java @@ -1,59 +1,80 @@ -package org.apache.cassandra.db; - -import java.util.UUID; -import java.util.concurrent.TimeUnit; - -import org.junit.Test; - -import org.apache.cassandra.SchemaLoader; -import org.apache.cassandra.db.compaction.CompactionManager; -import org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy; -import org.apache.cassandra.db.filter.QueryPath; -import org.apache.cassandra.utils.ByteBufferUtil; -import org.apache.cassandra.utils.FBUtilities; - -import static junit.framework.Assert.assertEquals; - -public class HintedHandOffTest extends SchemaLoader -{ - - public static final String TABLE4 = "Keyspace4"; - public static final String STANDARD1_CF = "Standard1"; - public static final String COLUMN1 = "column1"; - - // Test compaction of hints column family. It shouldn't remove all columns on compaction. - @Test - public void testCompactionOfHintsCF() throws Exception - { - // prepare hints column family - Table systemTable = Table.open("system"); - ColumnFamilyStore hintStore = systemTable.getColumnFamilyStore(SystemTable.HINTS_CF); - hintStore.clearUnsafe(); - hintStore.metadata.gcGraceSeconds(36000); // 10 hours - hintStore.setCompactionStrategyClass(SizeTieredCompactionStrategy.class.getCanonicalName()); - hintStore.disableAutoCompaction(); - - // insert 1 hint - RowMutation rm = new RowMutation(TABLE4, ByteBufferUtil.bytes(1)); - rm.add(new QueryPath(STANDARD1_CF, - null, - ByteBufferUtil.bytes(String.valueOf(COLUMN1))), - ByteBufferUtil.EMPTY_BYTE_BUFFER, - System.currentTimeMillis()); - - RowMutation.hintFor(rm, UUID.randomUUID()).apply(); - - // flush data to disk - hintStore.forceBlockingFlush(); - assertEquals(1, hintStore.getSSTables().size()); - - // submit compaction - FBUtilities.waitOnFuture(HintedHandOffManager.instance.compact()); - while (CompactionManager.instance.getPendingTasks() > 0 || CompactionManager.instance.getActiveCompactions() > 0) - TimeUnit.SECONDS.sleep(1); - - // single row should not be removed because of gc_grace_seconds - // is 10 hours and there are no any tombstones in sstable - assertEquals(1, hintStore.getSSTables().size()); - } -} +package org.apache.cassandra.db; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + + +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +import org.junit.Test; + +import org.apache.cassandra.SchemaLoader; +import org.apache.cassandra.db.compaction.CompactionManager; +import org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy; +import org.apache.cassandra.db.filter.QueryPath; +import org.apache.cassandra.utils.ByteBufferUtil; +import org.apache.cassandra.utils.FBUtilities; + +import static junit.framework.Assert.assertEquals; + +public class HintedHandOffTest extends SchemaLoader +{ + + public static final String TABLE4 = "Keyspace4"; + public static final String STANDARD1_CF = "Standard1"; + public static final String COLUMN1 = "column1"; + + // Test compaction of hints column family. It shouldn't remove all columns on compaction. + @Test + public void testCompactionOfHintsCF() throws Exception + { + // prepare hints column family + Table systemTable = Table.open("system"); + ColumnFamilyStore hintStore = systemTable.getColumnFamilyStore(SystemTable.HINTS_CF); + hintStore.clearUnsafe(); + hintStore.metadata.gcGraceSeconds(36000); // 10 hours + hintStore.setCompactionStrategyClass(SizeTieredCompactionStrategy.class.getCanonicalName()); + hintStore.disableAutoCompaction(); + + // insert 1 hint + RowMutation rm = new RowMutation(TABLE4, ByteBufferUtil.bytes(1)); + rm.add(new QueryPath(STANDARD1_CF, + null, + ByteBufferUtil.bytes(String.valueOf(COLUMN1))), + ByteBufferUtil.EMPTY_BYTE_BUFFER, + System.currentTimeMillis()); + + RowMutation.hintFor(rm, UUID.randomUUID()).apply(); + + // flush data to disk + hintStore.forceBlockingFlush(); + assertEquals(1, hintStore.getSSTables().size()); + + // submit compaction + FBUtilities.waitOnFuture(HintedHandOffManager.instance.compact()); + while (CompactionManager.instance.getPendingTasks() > 0 || CompactionManager.instance.getActiveCompactions() > 0) + TimeUnit.SECONDS.sleep(1); + + // single row should not be removed because of gc_grace_seconds + // is 10 hours and there are no any tombstones in sstable + assertEquals(1, hintStore.getSSTables().size()); + } +}
