cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r929234 - in /cassandra/branches/cassandra-0.6: CHANGES.txt src/java/org/apache/cassandra/tools/SSTableExport.java
Date Tue, 30 Mar 2010 19:43:33 GMT
Author: jbellis
Date: Tue Mar 30 19:43:32 2010
New Revision: 929234

URL: http://svn.apache.org/viewvc?rev=929234&view=rev
Log:
fix NPE in sstable2json when no excluded keys are given (CASSANDRA-934).  patch by Brandon
Williams; reviewed by jbellis for CASSANDRA-934

Modified:
    cassandra/branches/cassandra-0.6/CHANGES.txt
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/tools/SSTableExport.java

Modified: cassandra/branches/cassandra-0.6/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt?rev=929234&r1=929233&r2=929234&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.6/CHANGES.txt Tue Mar 30 19:43:32 2010
@@ -1,3 +1,7 @@
+0.6.1
+ * fix NPE in sstable2json when no excluded keys are given (CASSANDRA-934)
+
+
 0.6.0-RC1
  * JMX drain to flush memtables and run through commit log (CASSANDRA-880)
  * Bootstrapping can skip ranges under the right conditions (CASSANDRA-902)

Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/tools/SSTableExport.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/tools/SSTableExport.java?rev=929234&r1=929233&r2=929234&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/tools/SSTableExport.java
(original)
+++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/tools/SSTableExport.java
Tue Mar 30 19:43:32 2010
@@ -192,8 +192,11 @@ public class SSTableExport
         SSTableReader reader = SSTableReader.open(ssTableFile);
         SSTableScanner scanner = reader.getScanner(INPUT_FILE_BUFFER_SIZE);
         IPartitioner<?> partitioner = DatabaseDescriptor.getPartitioner();    
-        Set<String> excludeSet = new HashSet<String>(Arrays.asList(excludes));
+        Set<String> excludeSet = new HashSet();
         int i = 0;
+
+        if (excludes != null)
+            excludeSet = new HashSet<String>(Arrays.asList(excludes));
         
         outs.println("{");
         
@@ -252,7 +255,10 @@ public class SSTableExport
     static void export(SSTableReader reader, PrintStream outs, String[] excludes) throws
IOException
     {
         SSTableScanner scanner = reader.getScanner(INPUT_FILE_BUFFER_SIZE);
-        Set<String> excludeSet = new HashSet<String>(Arrays.asList(excludes));
+        Set<String> excludeSet = new HashSet();
+
+        if (excludes != null)
+            excludeSet = new HashSet<String>(Arrays.asList(excludes));
 
         outs.println("{");
         



Mime
View raw message