You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2013/09/12 19:39:07 UTC
[1/3] git commit: Add SSTableDeletingNotification to DataTracker
Updated Branches:
refs/heads/trunk 816c03218 -> f3430d394
Add SSTableDeletingNotification to DataTracker
patch by Piotr Kołaczkowski; reviewed by Aleksey Yeschenko for
CASSANDRA-6010
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f663a996
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f663a996
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f663a996
Branch: refs/heads/trunk
Commit: f663a996c799bd93963a50b418ed5fcde2e48a40
Parents: 53e48ed
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Thu Sep 12 20:35:31 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Thu Sep 12 20:35:31 2013 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/DataTracker.java | 12 +++++--
.../io/sstable/SSTableDeletingTask.java | 8 +++--
.../SSTableDeletingNotification.java | 33 ++++++++++++++++++++
4 files changed, 49 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f663a996/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1c09589..51be09d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -15,6 +15,7 @@
* Allow empty CQL3 batches (as no-op) (CASSANDRA-5994)
* Support null in CQL3 functions (CASSANDRA-5910)
* Replace the deprecated MapMaker with CacheLoader (CASSANDRA-6007)
+ * Add SSTableDeletingNotification to DataTracker (CASSANDRA-6010)
1.2.9
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f663a996/src/java/org/apache/cassandra/db/DataTracker.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/DataTracker.java b/src/java/org/apache/cassandra/db/DataTracker.java
index 7f6e94c..b2f52a9 100644
--- a/src/java/org/apache/cassandra/db/DataTracker.java
+++ b/src/java/org/apache/cassandra/db/DataTracker.java
@@ -34,6 +34,7 @@ import org.apache.cassandra.metrics.StorageMetrics;
import org.apache.cassandra.notifications.INotification;
import org.apache.cassandra.notifications.INotificationConsumer;
import org.apache.cassandra.notifications.SSTableAddedNotification;
+import org.apache.cassandra.notifications.SSTableDeletingNotification;
import org.apache.cassandra.notifications.SSTableListChangedNotification;
import org.apache.cassandra.utils.Interval;
import org.apache.cassandra.utils.IntervalTree;
@@ -412,11 +413,16 @@ public class DataTracker
public void notifyAdded(SSTableReader added)
{
+ INotification notification = new SSTableAddedNotification(added);
+ for (INotificationConsumer subscriber : subscribers)
+ subscriber.handleNotification(notification, this);
+ }
+
+ public void notifyDeleting(SSTableReader deleting)
+ {
+ INotification notification = new SSTableDeletingNotification(deleting);
for (INotificationConsumer subscriber : subscribers)
- {
- INotification notification = new SSTableAddedNotification(added);
subscriber.handleNotification(notification, this);
- }
}
public void subscribe(INotificationConsumer consumer)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f663a996/src/java/org/apache/cassandra/io/sstable/SSTableDeletingTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableDeletingTask.java b/src/java/org/apache/cassandra/io/sstable/SSTableDeletingTask.java
index 2335b7d..8bdc733 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableDeletingTask.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableDeletingTask.java
@@ -41,13 +41,15 @@ public class SSTableDeletingTask implements Runnable
// will be recognized as GCable.
private static final Set<SSTableDeletingTask> failedTasks = new CopyOnWriteArraySet<SSTableDeletingTask>();
- public final Descriptor desc;
- public final Set<Component> components;
+ private final SSTableReader referent;
+ private final Descriptor desc;
+ private final Set<Component> components;
private DataTracker tracker;
private final long size;
public SSTableDeletingTask(SSTableReader referent)
{
+ this.referent = referent;
this.desc = referent.descriptor;
this.components = referent.components;
this.size = referent.bytesOnDisk();
@@ -65,6 +67,8 @@ public class SSTableDeletingTask implements Runnable
public void run()
{
+ tracker.notifyDeleting(referent);
+
// If we can't successfully delete the DATA component, set the task to be retried later: see above
File datafile = new File(desc.filenameFor(Component.DATA));
if (!datafile.delete())
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f663a996/src/java/org/apache/cassandra/notifications/SSTableDeletingNotification.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/notifications/SSTableDeletingNotification.java b/src/java/org/apache/cassandra/notifications/SSTableDeletingNotification.java
new file mode 100644
index 0000000..8b0f597
--- /dev/null
+++ b/src/java/org/apache/cassandra/notifications/SSTableDeletingNotification.java
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+package org.apache.cassandra.notifications;
+
+import org.apache.cassandra.io.sstable.SSTableReader;
+
+/**
+ * Fired right before removing an SSTable.
+ */
+public class SSTableDeletingNotification implements INotification
+{
+ public final SSTableReader deleting;
+
+ public SSTableDeletingNotification(SSTableReader deleting)
+ {
+ this.deleting = deleting;
+ }
+}
[2/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Posted by al...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3e736633
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3e736633
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3e736633
Branch: refs/heads/trunk
Commit: 3e7366332c3e3d429882db18cc225943658968d5
Parents: 53f19c8 f663a99
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Thu Sep 12 20:38:14 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Thu Sep 12 20:38:14 2013 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/DataTracker.java | 12 +++++--
.../io/sstable/SSTableDeletingTask.java | 8 +++--
.../SSTableDeletingNotification.java | 33 ++++++++++++++++++++
4 files changed, 49 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/3e736633/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index c0f5d57,51be09d..63cc6d7
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -31,54 -15,14 +31,55 @@@ Merged from 1.2
* Allow empty CQL3 batches (as no-op) (CASSANDRA-5994)
* Support null in CQL3 functions (CASSANDRA-5910)
* Replace the deprecated MapMaker with CacheLoader (CASSANDRA-6007)
+ * Add SSTableDeletingNotification to DataTracker (CASSANDRA-6010)
-1.2.9
+2.0.0
+ * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138)
+ * Fix periodic memtable flushing behavior with clean memtables (CASSANDRA-5931)
+ * Fix dateOf() function for pre-2.0 timestamp columns (CASSANDRA-5928)
+ * Fix SSTable unintentionally loads BF when opened for batch (CASSANDRA-5938)
+ * Add stream session progress to JMX (CASSANDRA-4757)
+ * Fix NPE during CAS operation (CASSANDRA-5925)
+Merged from 1.2:
* Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900)
- * migrate 1.1 schema_columnfamilies.key_alias column to key_aliases
- (CASSANDRA-5800)
- * add --migrate option to sstableupgrade and sstablescrub (CASSANDRA-5831)
+ * Don't announce schema version until we've loaded the changes locally
+ (CASSANDRA-5904)
+ * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903)
+ * Properly handle parsing huge map and set literals (CASSANDRA-5893)
+
+
+2.0.0-rc2
+ * enable vnodes by default (CASSANDRA-5869)
+ * fix CAS contention timeout (CASSANDRA-5830)
+ * fix HsHa to respect max frame size (CASSANDRA-4573)
+ * Fix (some) 2i on composite components omissions (CASSANDRA-5851)
+ * cqlsh: add DESCRIBE FULL SCHEMA variant (CASSANDRA-5880)
+Merged from 1.2:
+ * Correctly validate sparse composite cells in scrub (CASSANDRA-5855)
+ * Add KeyCacheHitRate metric to CF metrics (CASSANDRA-5868)
+ * cqlsh: add support for multiline comments (CASSANDRA-5798)
+ * Handle CQL3 SELECT duplicate IN restrictions on clustering columns
+ (CASSANDRA-5856)
+
+
+2.0.0-rc1
+ * improve DecimalSerializer performance (CASSANDRA-5837)
+ * fix potential spurious wakeup in AsyncOneResponse (CASSANDRA-5690)
+ * fix schema-related trigger issues (CASSANDRA-5774)
+ * Better validation when accessing CQL3 table from thrift (CASSANDRA-5138)
+ * Fix assertion error during repair (CASSANDRA-5801)
+ * Fix range tombstone bug (CASSANDRA-5805)
+ * DC-local CAS (CASSANDRA-5797)
+ * Add a native_protocol_version column to the system.local table (CASSANRDA-5819)
+ * Use index_interval from cassandra.yaml when upgraded (CASSANDRA-5822)
+ * Fix buffer underflow on socket close (CASSANDRA-5792)
+Merged from 1.2:
+ * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814)
+ * cqlsh: add collections support to COPY (CASSANDRA-5698)
+ * retry important messages for any IOException (CASSANDRA-5804)
+ * Allow empty IN relations in SELECT/UPDATE/DELETE statements (CASSANDRA-5626)
+ * cqlsh: fix crashing on Windows due to libedit detection (CASSANDRA-5812)
* fix bulk-loading compressed sstables (CASSANDRA-5820)
* (Hadoop) fix quoting in CqlPagingRecordReader and CqlRecordWriter
(CASSANDRA-5824)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/3e736633/src/java/org/apache/cassandra/db/DataTracker.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/3e736633/src/java/org/apache/cassandra/io/sstable/SSTableDeletingTask.java
----------------------------------------------------------------------
[3/3] git commit: Merge branch 'cassandra-2.0' into trunk
Posted by al...@apache.org.
Merge branch 'cassandra-2.0' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f3430d39
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f3430d39
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f3430d39
Branch: refs/heads/trunk
Commit: f3430d3944e89ba3240aef1dd7f499000418d8a7
Parents: 816c032 3e73663
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Thu Sep 12 20:38:53 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Thu Sep 12 20:38:53 2013 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/DataTracker.java | 12 +++++--
.../io/sstable/SSTableDeletingTask.java | 8 +++--
.../SSTableDeletingNotification.java | 33 ++++++++++++++++++++
4 files changed, 49 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3430d39/CHANGES.txt
----------------------------------------------------------------------