You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2013/06/25 03:00:48 UTC
[1/3] git commit: allow sstable2json on 2i CFs patch by Michał Michalski; reviewed by jbellis for CASSANDRA-5694
Updated Branches:
refs/heads/cassandra-1.2 57eb87b57 -> 07c627aae
refs/heads/trunk ab6232aea -> a684ee095
allow sstable2json on 2i CFs
patch by Michał Michalski; reviewed by jbellis for CASSANDRA-5694
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/07c627aa
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/07c627aa
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/07c627aa
Branch: refs/heads/cassandra-1.2
Commit: 07c627aaed6d381aee79e2e7e388fd115e3cd410
Parents: 57eb87b
Author: Jonathan Ellis <jb...@apache.org>
Authored: Mon Jun 24 18:00:27 2013 -0700
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Mon Jun 24 18:00:27 2013 -0700
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/cassandra/tools/SSTableExport.java | 27 ++++++++++++++++++--
2 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07c627aa/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 78c630f..be0c1d0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
1.2.7
* Fix ReadResponseSerializer.serializedSize() for digest reads (CASSANDRA-5476)
+ * allow sstable2json on 2i CFs (CASSANDRA-5694)
1.2.6
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07c627aa/src/java/org/apache/cassandra/tools/SSTableExport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/SSTableExport.java b/src/java/org/apache/cassandra/tools/SSTableExport.java
index 1d898ef..c407ca1 100644
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@ -503,9 +503,32 @@ public class SSTableExport
DatabaseDescriptor.loadSchemas();
Descriptor descriptor = Descriptor.fromFilename(ssTableFileName);
- if (Schema.instance.getCFMetaData(descriptor) == null)
+
+ // Start by validating keyspace name
+ if (Schema.instance.getKSMetaData(descriptor.ksname) == null)
+ {
+ System.err.println(String.format("Filename %s references to nonexistent keyspace: %s!",
+ ssTableFileName, descriptor.ksname));
+ System.exit(1);
+ }
+ Table table = Table.open(descriptor.ksname);
+
+ // Make it work for indexes too - find parent cf if necessary
+ String baseName = descriptor.cfname;
+ if (descriptor.cfname.contains("."))
+ {
+ String[] parts = descriptor.cfname.split("\\.", 2);
+ baseName = parts[0];
+ }
+
+ // IllegalArgumentException will be thrown here if ks/cf pair does not exist
+ try
+ {
+ table.getColumnFamilyStore(baseName);
+ }
+ catch (IllegalArgumentException e)
{
- System.err.println(String.format("The provided column family is not part of this cassandra database: keyspace = %s, column family = %s",
+ System.err.println(String.format("The provided column family is not part of this cassandra keyspace: keyspace = %s, column family = %s",
descriptor.ksname, descriptor.cfname));
System.exit(1);
}
[2/3] git commit: allow sstable2json on 2i CFs patch by Michał Michalski; reviewed by jbellis for CASSANDRA-5694
Posted by jb...@apache.org.
allow sstable2json on 2i CFs
patch by Michał Michalski; reviewed by jbellis for CASSANDRA-5694
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/07c627aa
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/07c627aa
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/07c627aa
Branch: refs/heads/trunk
Commit: 07c627aaed6d381aee79e2e7e388fd115e3cd410
Parents: 57eb87b
Author: Jonathan Ellis <jb...@apache.org>
Authored: Mon Jun 24 18:00:27 2013 -0700
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Mon Jun 24 18:00:27 2013 -0700
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/cassandra/tools/SSTableExport.java | 27 ++++++++++++++++++--
2 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07c627aa/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 78c630f..be0c1d0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
1.2.7
* Fix ReadResponseSerializer.serializedSize() for digest reads (CASSANDRA-5476)
+ * allow sstable2json on 2i CFs (CASSANDRA-5694)
1.2.6
http://git-wip-us.apache.org/repos/asf/cassandra/blob/07c627aa/src/java/org/apache/cassandra/tools/SSTableExport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/SSTableExport.java b/src/java/org/apache/cassandra/tools/SSTableExport.java
index 1d898ef..c407ca1 100644
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@ -503,9 +503,32 @@ public class SSTableExport
DatabaseDescriptor.loadSchemas();
Descriptor descriptor = Descriptor.fromFilename(ssTableFileName);
- if (Schema.instance.getCFMetaData(descriptor) == null)
+
+ // Start by validating keyspace name
+ if (Schema.instance.getKSMetaData(descriptor.ksname) == null)
+ {
+ System.err.println(String.format("Filename %s references to nonexistent keyspace: %s!",
+ ssTableFileName, descriptor.ksname));
+ System.exit(1);
+ }
+ Table table = Table.open(descriptor.ksname);
+
+ // Make it work for indexes too - find parent cf if necessary
+ String baseName = descriptor.cfname;
+ if (descriptor.cfname.contains("."))
+ {
+ String[] parts = descriptor.cfname.split("\\.", 2);
+ baseName = parts[0];
+ }
+
+ // IllegalArgumentException will be thrown here if ks/cf pair does not exist
+ try
+ {
+ table.getColumnFamilyStore(baseName);
+ }
+ catch (IllegalArgumentException e)
{
- System.err.println(String.format("The provided column family is not part of this cassandra database: keyspace = %s, column family = %s",
+ System.err.println(String.format("The provided column family is not part of this cassandra keyspace: keyspace = %s, column family = %s",
descriptor.ksname, descriptor.cfname));
System.exit(1);
}
[3/3] git commit: Merge branch 'cassandra-1.2' into trunk
Posted by jb...@apache.org.
Merge branch 'cassandra-1.2' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a684ee09
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a684ee09
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a684ee09
Branch: refs/heads/trunk
Commit: a684ee095d3f706d5126ec19292227fc909353c9
Parents: ab6232a 07c627a
Author: Jonathan Ellis <jb...@apache.org>
Authored: Mon Jun 24 18:00:34 2013 -0700
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Mon Jun 24 18:00:34 2013 -0700
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/cassandra/tools/SSTableExport.java | 27 ++++++++++++++++++--
2 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a684ee09/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index ebcdd4e,be0c1d0..2c43d57
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,72 -1,6 +1,73 @@@
+2.0
+ * Removed on-heap row cache (CASSANDRA-5348)
+ * use nanotime consistently for node-local timeouts (CASSANDRA-5581)
+ * Avoid unnecessary second pass on name-based queries (CASSANDRA-5577)
+ * Experimental triggers (CASSANDRA-1311)
+ * JEMalloc support for off-heap allocation (CASSANDRA-3997)
+ * Single-pass compaction (CASSANDRA-4180)
+ * Removed token range bisection (CASSANDRA-5518)
+ * Removed compatibility with pre-1.2.5 sstables and network messages
+ (CASSANDRA-5511)
+ * removed PBSPredictor (CASSANDRA-5455)
+ * CAS support (CASSANDRA-5062, 5441, 5442, 5443, 5619)
+ * Leveled compaction performs size-tiered compactions in L0
+ (CASSANDRA-5371, 5439)
+ * Add yaml network topology snitch for mixed ec2/other envs (CASSANDRA-5339)
+ * Log when a node is down longer than the hint window (CASSANDRA-4554)
+ * Optimize tombstone creation for ExpiringColumns (CASSANDRA-4917)
+ * Improve LeveledScanner work estimation (CASSANDRA-5250, 5407)
+ * Replace compaction lock with runWithCompactionsDisabled (CASSANDRA-3430)
+ * Change Message IDs to ints (CASSANDRA-5307)
+ * Move sstable level information into the Stats component, removing the
+ need for a separate Manifest file (CASSANDRA-4872)
+ * avoid serializing to byte[] on commitlog append (CASSANDRA-5199)
+ * make index_interval configurable per columnfamily (CASSANDRA-3961, CASSANDRA-5650)
+ * add default_time_to_live (CASSANDRA-3974)
+ * add memtable_flush_period_in_ms (CASSANDRA-4237)
+ * replace supercolumns internally by composites (CASSANDRA-3237, 5123)
+ * upgrade thrift to 0.9.0 (CASSANDRA-3719)
+ * drop unnecessary keyspace parameter from user-defined compaction API
+ (CASSANDRA-5139)
+ * more robust solution to incomplete compactions + counters (CASSANDRA-5151)
+ * Change order of directory searching for c*.in.sh (CASSANDRA-3983)
+ * Add tool to reset SSTable compaction level for LCS (CASSANDRA-5271)
+ * Allow custom configuration loader (CASSANDRA-5045)
+ * Remove memory emergency pressure valve logic (CASSANDRA-3534)
+ * Reduce request latency with eager retry (CASSANDRA-4705)
+ * cqlsh: Remove ASSUME command (CASSANDRA-5331)
+ * Rebuild BF when loading sstables if bloom_filter_fp_chance
+ has changed since compaction (CASSANDRA-5015)
+ * remove row-level bloom filters (CASSANDRA-4885)
+ * Change Kernel Page Cache skipping into row preheating (disabled by default)
+ (CASSANDRA-4937)
+ * Improve repair by deciding on a gcBefore before sending
+ out TreeRequests (CASSANDRA-4932)
+ * Add an official way to disable compactions (CASSANDRA-5074)
+ * Reenable ALTER TABLE DROP with new semantics (CASSANDRA-3919)
+ * Add binary protocol versioning (CASSANDRA-5436)
+ * Swap THshaServer for TThreadedSelectorServer (CASSANDRA-5530)
+ * Add alias support to SELECT statement (CASSANDRA-5075)
+ * Don't create empty RowMutations in CommitLogReplayer (CASSANDRA-5541)
+ * Use range tombstones when dropping cfs/columns from schema (CASSANDRA-5579)
+ * cqlsh: drop CQL2/CQL3-beta support (CASSANDRA-5585)
+ * Track max/min column names in sstables to be able to optimize slice
+ queries (CASSANDRA-5514, CASSANDRA-5595, CASSANDRA-5600)
+ * Binary protocol: allow batching already prepared statements (CASSANDRA-4693)
+ * Allow preparing timestamp, ttl and limit in CQL3 queries (CASSANDRA-4450)
+ * Support native link w/o JNA in Java7 (CASSANDRA-3734)
+ * Use SASL authentication in binary protocol v2 (CASSANDRA-5545)
+ * Replace Thrift HsHa with LMAX Disruptor based implementation (CASSANDRA-5582)
+ * cqlsh: Add row count to SELECT output (CASSANDRA-5636)
+ * Include a timestamp with all read commands to determine column expiration
+ (CASSANDRA-5149)
+ * Streaming 2.0 (CASSANDRA-5286)
+ * Conditional create/drop ks/table/index statements in CQL3 (CASSANDRA-2737)
+ * more pre-table creation property validation (CASSANDRA-5693)
+
+
1.2.7
* Fix ReadResponseSerializer.serializedSize() for digest reads (CASSANDRA-5476)
+ * allow sstable2json on 2i CFs (CASSANDRA-5694)
1.2.6
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a684ee09/src/java/org/apache/cassandra/tools/SSTableExport.java
----------------------------------------------------------------------