Repository: cassandra
Updated Branches:
  refs/heads/trunk b30cdd9a7 -> c87b6a30f


dead throws clause cleanup


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c87b6a30
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c87b6a30
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c87b6a30

Branch: refs/heads/trunk
Commit: c87b6a30f21a6d7cfcebd2e1399dfb6069f402fa
Parents: b30cdd9
Author: Dave Brosius <dbros...@mebigfatguy.com>
Authored: Sun Jan 25 22:38:49 2015 -0500
Committer: Dave Brosius <dbros...@mebigfatguy.com>
Committed: Sun Jan 25 22:38:49 2015 -0500

----------------------------------------------------------------------
 .../db/compaction/CompactionManager.java        |  2 +-
 .../io/sstable/format/SSTableReader.java        |  2 +-
 .../concurrent/LongSharedExecutorPoolTest.java  |  6 +--
 .../cassandra/db/LongFlushMemtableTest.java     |  2 +-
 .../db/compaction/LongCompactionsTest.java      |  4 +-
 .../cassandra/pig/CqlRecordReaderTest.java      |  3 +-
 .../cassandra/pig/CqlTableDataTypeTest.java     | 11 ++--
 .../org/apache/cassandra/pig/CqlTableTest.java  | 24 ++++-----
 .../pig/ThriftColumnFamilyDataTypeTest.java     |  6 +--
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 34 +++++-------
 .../cassandra/cql3/NonNativeTimestampTest.java  |  2 +-
 .../cassandra/db/ColumnFamilyStoreTest.java     |  2 +-
 .../org/apache/cassandra/db/CommitLogTest.java  |  4 +-
 .../apache/cassandra/db/RangeTombstoneTest.java |  4 +-
 .../db/compaction/AntiCompactionTest.java       | 12 ++---
 .../db/compaction/CompactionsPurgeTest.java     |  4 +-
 .../db/compaction/CompactionsTest.java          |  4 +-
 .../db/compaction/OneCompactionTest.java        |  6 +--
 .../db/index/PerRowSecondaryIndexTest.java      |  2 +-
 .../cassandra/io/sstable/SSTableReaderTest.java | 10 ++--
 .../cassandra/thrift/ThriftValidationTest.java  |  2 +-
 .../cassandra/tools/SSTableExportTest.java      |  2 +-
 .../cassandra/tools/SSTableImportTest.java      |  2 +-
 .../org/apache/cassandra/utils/BitSetTest.java  | 55 +++++++++++---------
 .../utils/JVMStabilityInspectorTest.java        |  2 +-
 25 files changed, 99 insertions(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 7b45dd3..06fabba 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -471,7 +471,7 @@ public class CompactionManager implements 
CompactionManagerMBean
         logger.info(String.format("Completed anticompaction successfully"));
     }
 
-    public void performMaximal(final ColumnFamilyStore cfStore) throws 
InterruptedException, ExecutionException
+    public void performMaximal(final ColumnFamilyStore cfStore)
     {
         FBUtilities.waitOnFutures(submitMaximal(cfStore, 
getDefaultGcBefore(cfStore)));
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java 
b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
index 482d0cc..1546ce8 100644
--- a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
@@ -1017,7 +1017,7 @@ public abstract class SSTableReader extends SSTable
         return indexSummary.getEffectiveIndexInterval();
     }
 
-    public void releaseSummary() throws IOException
+    public void releaseSummary()
     {
         indexSummary.close();
         indexSummary = null;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/long/org/apache/cassandra/concurrent/LongSharedExecutorPoolTest.java
----------------------------------------------------------------------
diff --git 
a/test/long/org/apache/cassandra/concurrent/LongSharedExecutorPoolTest.java 
b/test/long/org/apache/cassandra/concurrent/LongSharedExecutorPoolTest.java
index b44c234..3453261 100644
--- a/test/long/org/apache/cassandra/concurrent/LongSharedExecutorPoolTest.java
+++ b/test/long/org/apache/cassandra/concurrent/LongSharedExecutorPoolTest.java
@@ -97,12 +97,12 @@ public class LongSharedExecutorPoolTest
     }
 
     @Test
-    public void testPromptnessOfExecution() throws InterruptedException, 
ExecutionException, TimeoutException
+    public void testPromptnessOfExecution() throws InterruptedException, 
ExecutionException
     {
         testPromptnessOfExecution(TimeUnit.MINUTES.toNanos(2L), 0.5f);
     }
 
-    private void testPromptnessOfExecution(long intervalNanos, float 
loadIncrement) throws InterruptedException, ExecutionException, TimeoutException
+    private void testPromptnessOfExecution(long intervalNanos, float 
loadIncrement) throws InterruptedException, ExecutionException
     {
         final int executorCount = 4;
         int threadCount = 8;
@@ -217,7 +217,7 @@ public class LongSharedExecutorPoolTest
         }
     }
 
-    public static void main(String[] args) throws InterruptedException, 
ExecutionException, TimeoutException
+    public static void main(String[] args) throws InterruptedException, 
ExecutionException
     {
         // do longer test
         new 
LongSharedExecutorPoolTest().testPromptnessOfExecution(TimeUnit.MINUTES.toNanos(10L),
 0.1f);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/long/org/apache/cassandra/db/LongFlushMemtableTest.java
----------------------------------------------------------------------
diff --git a/test/long/org/apache/cassandra/db/LongFlushMemtableTest.java 
b/test/long/org/apache/cassandra/db/LongFlushMemtableTest.java
index 211f72f..fd23f33 100644
--- a/test/long/org/apache/cassandra/db/LongFlushMemtableTest.java
+++ b/test/long/org/apache/cassandra/db/LongFlushMemtableTest.java
@@ -51,7 +51,7 @@ public class LongFlushMemtableTest
     }
 
     @Test
-    public void testFlushMemtables() throws IOException, ConfigurationException
+    public void testFlushMemtables() throws ConfigurationException
     {
         Keyspace keyspace = Keyspace.open(KEYSPACE1);
         for (int i = 0; i < 100; i++)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/long/org/apache/cassandra/db/compaction/LongCompactionsTest.java
----------------------------------------------------------------------
diff --git 
a/test/long/org/apache/cassandra/db/compaction/LongCompactionsTest.java 
b/test/long/org/apache/cassandra/db/compaction/LongCompactionsTest.java
index 28ec975..f16d094 100644
--- a/test/long/org/apache/cassandra/db/compaction/LongCompactionsTest.java
+++ b/test/long/org/apache/cassandra/db/compaction/LongCompactionsTest.java
@@ -127,7 +127,7 @@ public class LongCompactionsTest
     }
 
     @Test
-    public void testStandardColumnCompactions() throws IOException, 
ExecutionException, InterruptedException
+    public void testStandardColumnCompactions()
     {
         // this test does enough rows to force multiple block indexes to be 
used
         Keyspace keyspace = Keyspace.open(KEYSPACE1);
@@ -168,7 +168,7 @@ public class LongCompactionsTest
         cfs.truncateBlocking();
     }
 
-    private void forceCompactions(ColumnFamilyStore cfs) throws 
ExecutionException, InterruptedException
+    private void forceCompactions(ColumnFamilyStore cfs)
     {
         // re-enable compaction with thresholds low enough to force a few 
rounds
         cfs.setCompactionThresholds(2, 4);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/pig/org/apache/cassandra/pig/CqlRecordReaderTest.java
----------------------------------------------------------------------
diff --git a/test/pig/org/apache/cassandra/pig/CqlRecordReaderTest.java 
b/test/pig/org/apache/cassandra/pig/CqlRecordReaderTest.java
index a51950b..b2a74b6 100644
--- a/test/pig/org/apache/cassandra/pig/CqlRecordReaderTest.java
+++ b/test/pig/org/apache/cassandra/pig/CqlRecordReaderTest.java
@@ -57,8 +57,7 @@ public class CqlRecordReaderTest extends PigTestBase
     };
 
     @BeforeClass
-    public static void setup() throws IOException, InterruptedException, 
ConfigurationException,
-        TException, ClassNotFoundException, NoSuchFieldException, 
IllegalAccessException, InstantiationException
+    public static void setup() throws IOException, ConfigurationException, 
TException
     {
         startCassandra();
         executeCQLStatements(statements);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
----------------------------------------------------------------------
diff --git a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java 
b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
index 98e170b..ca01901 100644
--- a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
+++ b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
@@ -201,8 +201,7 @@ public class CqlTableDataTypeTest extends PigTestBase
     };
 
     @BeforeClass
-    public static void setup() throws IOException, InterruptedException, 
ConfigurationException, TException,
-        ClassNotFoundException, NoSuchFieldException, IllegalAccessException, 
InstantiationException
+    public static void setup() throws IOException, ConfigurationException, 
TException
     {
         startCassandra();
         executeCQLStatements(statements);
@@ -210,7 +209,7 @@ public class CqlTableDataTypeTest extends PigTestBase
     }
 
     @Test
-    public void testCqlNativeStorageRegularType() throws TException, 
IOException
+    public void testCqlNativeStorageRegularType() throws IOException
     {
         //input_cql=select * from cqltable where token(key) > ? and token(key) 
<= ?
         cqlTableTest("rows = LOAD 'cql://cql3ks/cqltable?" + defaultParameters 
+ nativeParameters + 
"&input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
@@ -280,7 +279,7 @@ public class CqlTableDataTypeTest extends PigTestBase
     }
 
     @Test
-    public void testCqlNativeStorageSetType() throws TException, IOException
+    public void testCqlNativeStorageSetType() throws IOException
     {
         //input_cql=select * from settable where token(key) > ? and token(key) 
<= ?
         settableTest("set_rows = LOAD 'cql://cql3ks/settable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20settable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
@@ -346,7 +345,7 @@ public class CqlTableDataTypeTest extends PigTestBase
     }
 
     @Test
-    public void testCqlNativeStorageListType() throws TException, IOException
+    public void testCqlNativeStorageListType() throws IOException
     {
         //input_cql=select * from listtable where token(key) > ? and 
token(key) <= ?
         listtableTest("list_rows = LOAD 'cql://cql3ks/listtable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20listtable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
@@ -412,7 +411,7 @@ public class CqlTableDataTypeTest extends PigTestBase
     }
 
     @Test
-    public void testCqlNativeStorageMapType() throws TException, IOException
+    public void testCqlNativeStorageMapType() throws IOException
     {
         //input_cql=select * from maptable where token(key) > ? and token(key) 
<= ?
         maptableTest("map_rows = LOAD 'cql://cql3ks/maptable?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20maptable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/pig/org/apache/cassandra/pig/CqlTableTest.java
----------------------------------------------------------------------
diff --git a/test/pig/org/apache/cassandra/pig/CqlTableTest.java 
b/test/pig/org/apache/cassandra/pig/CqlTableTest.java
index ecfeb63..26f9f68 100644
--- a/test/pig/org/apache/cassandra/pig/CqlTableTest.java
+++ b/test/pig/org/apache/cassandra/pig/CqlTableTest.java
@@ -73,8 +73,7 @@ public class CqlTableTest extends PigTestBase
     };
 
     @BeforeClass
-    public static void setup() throws IOException, InterruptedException, 
ConfigurationException, TException, ClassNotFoundException,
-        NoSuchFieldException, IllegalAccessException, InstantiationException
+    public static void setup() throws IOException, ConfigurationException, 
TException
     {
         startCassandra();
         executeCQLStatements(statements);
@@ -82,7 +81,7 @@ public class CqlTableTest extends PigTestBase
     }
 
     @Test
-    public void testCqlNativeStorageSchema() throws TException, IOException
+    public void testCqlNativeStorageSchema() throws IOException
     {
         //input_cql=select * from cqltable where token(key1) > ? and 
token(key1) <= ?
         cqlTableSchemaTest("rows = LOAD 'cql://cql3ks/cqltable?" + 
defaultParameters + nativeParameters +  
"&input_cql=select%20*%20from%20cqltable%20where%20token(key1)%20%3E%20%3F%20and%20token(key1)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
@@ -127,13 +126,13 @@ public class CqlTableTest extends PigTestBase
     }
 
     @Test
-    public void testCqlNativeStorageSingleKeyTable() throws TException, 
IOException
+    public void testCqlNativeStorageSingleKeyTable() throws IOException
     {
         //input_cql=select * from moredata where token(x) > ? and token(x) <= ?
-        SingleKeyTableTest("moretestvalues= LOAD 'cql://cql3ks/moredata?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20moredata%20where%20token(x)%20%3E%20%3F%20and%20token(x)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
+        singleKeyTableTest("moretestvalues= LOAD 'cql://cql3ks/moredata?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20moredata%20where%20token(x)%20%3E%20%3F%20and%20token(x)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
     }
 
-    private void SingleKeyTableTest(String initialQuery) throws TException, 
IOException
+    private void singleKeyTableTest(String initialQuery) throws IOException
     {
         pig.setBatchOn();
         pig.registerQuery(initialQuery);
@@ -156,13 +155,13 @@ public class CqlTableTest extends PigTestBase
     }
 
     @Test
-    public void testCqlNativeStorageCompositeKeyTable() throws TException, 
IOException
+    public void testCqlNativeStorageCompositeKeyTable() throws IOException
     {
         //input_cql=select * from compmore where token(id) > ? and token(id) 
<= ?
-        CompositeKeyTableTest("moredata= LOAD 'cql://cql3ks/compmore?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20compmore%20where%20token(id)%20%3E%20%3F%20and%20token(id)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
+        compositeKeyTableTest("moredata= LOAD 'cql://cql3ks/compmore?" + 
defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20compmore%20where%20token(id)%20%3E%20%3F%20and%20token(id)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
     }
 
-    private void CompositeKeyTableTest(String initialQuery) throws TException, 
IOException
+    private void compositeKeyTableTest(String initialQuery) throws IOException
     {
         pig.setBatchOn();
         pig.registerQuery(initialQuery);
@@ -191,13 +190,13 @@ public class CqlTableTest extends PigTestBase
     }
 
     @Test
-    public void testCqlNativeStorageCollectionColumnTable() throws TException, 
IOException
+    public void testCqlNativeStorageCollectionColumnTable() throws IOException
     {
         //input_cql=select * from collectiontable where token(m) > ? and 
token(m) <= ?
         CollectionColumnTableTest("collectiontable= LOAD 
'cql://cql3ks/collectiontable?" + defaultParameters + nativeParameters + 
"&input_cql=select%20*%20from%20collectiontable%20where%20token(m)%20%3E%20%3F%20and%20token(m)%20%3C%3D%20%3F'
 USING CqlNativeStorage();");
     }
 
-    private void CollectionColumnTableTest(String initialQuery) throws 
TException, IOException
+    private void CollectionColumnTableTest(String initialQuery) throws 
IOException
     {
         pig.setBatchOn();
         pig.registerQuery(initialQuery);
@@ -230,8 +229,7 @@ public class CqlTableTest extends PigTestBase
     }
 
     @Test
-    public void testCassandraStorageSchema() throws IOException, 
ClassNotFoundException, TException, NoSuchFieldException,
-        IllegalAccessException, InstantiationException
+    public void testCassandraStorageSchema() throws IOException
     {
         //results: (key1,{((111,),),((111,column1),100),((111,column2),10.1)})
         pig.registerQuery("rows = LOAD 'cassandra://cql3ks/cqltable?" + 
defaultParameters + "' USING CassandraStorage();");

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyDataTypeTest.java
----------------------------------------------------------------------
diff --git 
a/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyDataTypeTest.java 
b/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyDataTypeTest.java
index 2ffd524..3ddb94e 100644
--- a/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyDataTypeTest.java
+++ b/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyDataTypeTest.java
@@ -69,8 +69,7 @@ public class ThriftColumnFamilyDataTypeTest extends 
PigTestBase
     };
 
     @BeforeClass
-    public static void setup() throws IOException, InterruptedException, 
ConfigurationException, TException,
-        ClassNotFoundException, NoSuchFieldException, IllegalAccessException, 
InstantiationException
+    public static void setup() throws IOException, ConfigurationException, 
TException
     {
         startCassandra();
         executeCQLStatements(statements);
@@ -78,8 +77,7 @@ public class ThriftColumnFamilyDataTypeTest extends 
PigTestBase
     }
 
     @Test
-    public void testCassandraStorageDataType() throws IOException, 
ClassNotFoundException, TException,
-        NoSuchFieldException, IllegalAccessException, InstantiationException
+    public void testCassandraStorageDataType() throws IOException
     {
         pig.registerQuery("rows = LOAD 'cassandra://thrift_ks/some_app?" + 
defaultParameters + "' USING CassandraStorage();");
         Tuple t = pig.openIterator("rows").next();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyTest.java
----------------------------------------------------------------------
diff --git a/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyTest.java 
b/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyTest.java
index 167668c..60d04d3 100644
--- a/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyTest.java
+++ b/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyTest.java
@@ -171,8 +171,7 @@ public class ThriftColumnFamilyTest extends PigTestBase
     };
 
     @BeforeClass
-    public static void setup() throws IOException, InterruptedException, 
ConfigurationException, TException,
-        ClassNotFoundException, NoSuchFieldException, IllegalAccessException, 
InstantiationException
+    public static void setup() throws IOException, ConfigurationException, 
TException
     {
         startCassandra();
         executeCQLStatements(statements);
@@ -180,8 +179,7 @@ public class ThriftColumnFamilyTest extends PigTestBase
     }
 
     @Test
-    public void testCqlNativeStorage() throws IOException, 
ClassNotFoundException, TException, NoSuchFieldException,
-        IllegalAccessException, InstantiationException
+    public void testCqlNativeStorage() throws IOException
     {
         //regular thrift column families
         //input_cql=select * from "some_app" where token(key) > ? and 
token(key) <= ?
@@ -302,8 +300,7 @@ public class ThriftColumnFamilyTest extends PigTestBase
     }
 
     @Test
-    public void testCassandraStorageSchema() throws IOException, 
ClassNotFoundException, TException, NoSuchFieldException,
-        IllegalAccessException, InstantiationException
+    public void testCassandraStorageSchema() throws IOException
     {
         //results: 
(qux,(atomic_weight,0.660161815846869),(created,1335890877),(name,User 
Qux),(percent,64.7),
         //(rating,2),(score,12000),(vote_type,dislike))
@@ -342,8 +339,7 @@ public class ThriftColumnFamilyTest extends PigTestBase
     }
 
     @Test
-    public void testCassandraStorageFullCopy() throws IOException, 
ClassNotFoundException, TException, NoSuchFieldException,
-        IllegalAccessException, InstantiationException
+    public void testCassandraStorageFullCopy() throws IOException, TException
     {
         pig.setBatchOn();
         pig.registerQuery("rows = LOAD 'cassandra://thrift_ks/some_app?" + 
defaultParameters + "' USING CassandraStorage();");
@@ -356,13 +352,12 @@ public class ThriftColumnFamilyTest extends PigTestBase
     }
 
     @Test
-    public void testCassandraStorageSigleTupleCopy() throws IOException, 
ClassNotFoundException, TException,
-        NoSuchFieldException, IllegalAccessException, InstantiationException
+    public void testCassandraStorageSingleTupleCopy() throws IOException, 
TException
     {
         executeCQLStatements(deleteCopyOfSomeAppTableData);
         pig.setBatchOn();
         pig.registerQuery("rows = LOAD 'cassandra://thrift_ks/some_app?" + 
defaultParameters + "' USING CassandraStorage();");
-        //sigle tuple
+        //single tuple
         pig.registerQuery("onecol = FOREACH rows GENERATE key, percent;");
         pig.registerQuery("STORE onecol INTO 
'cassandra://thrift_ks/copy_of_some_app?" + defaultParameters + "' USING 
CassandraStorage();");
         pig.executeBatch();
@@ -391,8 +386,7 @@ public class ThriftColumnFamilyTest extends PigTestBase
     }
 
     @Test
-    public void testCassandraStorageBagOnlyCopy() throws IOException, 
ClassNotFoundException, TException,
-        NoSuchFieldException, IllegalAccessException, InstantiationException
+    public void testCassandraStorageBagOnlyCopy() throws IOException, 
TException
     {
         executeCQLStatements(deleteCopyOfSomeAppTableData);
         pig.setBatchOn();
@@ -435,8 +429,7 @@ public class ThriftColumnFamilyTest extends PigTestBase
     }
 
     @Test
-    public void testCassandraStorageFilter() throws IOException, 
ClassNotFoundException, TException, NoSuchFieldException,
-        IllegalAccessException, InstantiationException
+    public void testCassandraStorageFilter() throws IOException, TException
     {
         executeCQLStatements(deleteCopyOfSomeAppTableData);
         pig.setBatchOn();
@@ -503,7 +496,7 @@ public class ThriftColumnFamilyTest extends PigTestBase
     }
 
     @Test
-    public void testCassandraStorageJoin() throws IOException, 
ClassNotFoundException, TException, IllegalAccessException, 
InstantiationException
+    public void testCassandraStorageJoin() throws IOException
     {
         //test key types with a join
         pig.registerQuery("U8 = load 'cassandra://thrift_ks/u8?" + 
defaultParameters + "' using CassandraStorage();");
@@ -555,8 +548,7 @@ public class ThriftColumnFamilyTest extends PigTestBase
     }
 
     @Test
-    public void testCassandraStorageCounterCF() throws IOException, 
ClassNotFoundException, TException, NoSuchFieldException,
-        IllegalAccessException, InstantiationException
+    public void testCassandraStorageCounterCF() throws IOException
     {
         //Test counter column family support
         pig.registerQuery("CC = load 'cassandra://thrift_ks/cc?" + 
defaultParameters + "' using CassandraStorage();");
@@ -568,8 +560,7 @@ public class ThriftColumnFamilyTest extends PigTestBase
     }
 
     @Test
-    public void testCassandraStorageCompositeColumnCF() throws IOException, 
ClassNotFoundException, TException,
-        NoSuchFieldException, IllegalAccessException, InstantiationException
+    public void testCassandraStorageCompositeColumnCF() throws IOException
     {
         //Test CompositeType
         pig.registerQuery("compo = load 'cassandra://thrift_ks/compo?" + 
defaultParameters + "' using CassandraStorage();");
@@ -636,8 +627,7 @@ public class ThriftColumnFamilyTest extends PigTestBase
     }
 
     @Test
-    public void testCassandraStorageCompositeKeyCF() throws IOException, 
ClassNotFoundException, TException,
-        NoSuchFieldException, IllegalAccessException, InstantiationException
+    public void testCassandraStorageCompositeKeyCF() throws IOException
     {
         //Test CompositeKey
         pig.registerQuery("compokeys = load 'cassandra://thrift_ks/compo_key?" 
+ defaultParameters + "' using CassandraStorage();");

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/cql3/NonNativeTimestampTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/NonNativeTimestampTest.java 
b/test/unit/org/apache/cassandra/cql3/NonNativeTimestampTest.java
index 8e3fbed..80c5e3b 100644
--- a/test/unit/org/apache/cassandra/cql3/NonNativeTimestampTest.java
+++ b/test/unit/org/apache/cassandra/cql3/NonNativeTimestampTest.java
@@ -50,7 +50,7 @@ public class NonNativeTimestampTest extends SchemaLoader
     }
 
     @Test
-    public void setServerTimestampForNonCqlNativeStatements() throws 
RequestValidationException, RequestExecutionException, 
CharacterCodingException, UnsupportedEncodingException
+    public void setServerTimestampForNonCqlNativeStatements() throws 
RequestValidationException, RequestExecutionException
     {
         String createKsCQL = "CREATE KEYSPACE non_native_ts_test" +
                              " WITH REPLICATION = { 'class' : 
'SimpleStrategy', 'replication_factor' : 1 };";

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java 
b/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
index 479bb16..7c086f7 100644
--- a/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
+++ b/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
@@ -131,7 +131,7 @@ public class ColumnFamilyStoreTest
     }
 
     @BeforeClass
-    public static void defineSchema() throws ConfigurationException, 
IOException, TException
+    public static void defineSchema() throws ConfigurationException
     {
         SchemaLoader.prepareServer();
         SchemaLoader.createKeyspace(KEYSPACE1,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/db/CommitLogTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/CommitLogTest.java 
b/test/unit/org/apache/cassandra/db/CommitLogTest.java
index 528cbdb..22f1fba 100644
--- a/test/unit/org/apache/cassandra/db/CommitLogTest.java
+++ b/test/unit/org/apache/cassandra/db/CommitLogTest.java
@@ -343,7 +343,7 @@ public class CommitLogTest
     }
 
     @Test
-    public void testTruncateWithoutSnapshot()  throws ExecutionException, 
InterruptedException
+    public void testTruncateWithoutSnapshot()
     {
         CommitLog.instance.resetUnsafe();
         boolean prev = DatabaseDescriptor.isAutoSnapshot();
@@ -372,7 +372,7 @@ public class CommitLogTest
     }
 
     @Test
-    public void testTruncateWithoutSnapshotNonDurable()  throws 
ExecutionException, InterruptedException
+    public void testTruncateWithoutSnapshotNonDurable()
     {
         CommitLog.instance.resetUnsafe();
         boolean prevAutoSnapshot = DatabaseDescriptor.isAutoSnapshot();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java 
b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
index fd37ee3..a051c2c 100644
--- a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
+++ b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
@@ -333,7 +333,7 @@ public class RangeTombstoneTest
     }
 
     @Test
-    public void test7810() throws ExecutionException, InterruptedException, 
IOException
+    public void test7810() throws ExecutionException, InterruptedException
     {
         Keyspace ks = Keyspace.open(KSNAME);
         ColumnFamilyStore cfs = ks.getColumnFamilyStore(CFNAME);
@@ -381,7 +381,7 @@ public class RangeTombstoneTest
     }
 
     @Test
-    public void test7808_2() throws ExecutionException, InterruptedException, 
IOException
+    public void test7808_2() throws ExecutionException, InterruptedException
     {
         Keyspace ks = Keyspace.open(KSNAME);
         ColumnFamilyStore cfs = ks.getColumnFamilyStore(CFNAME);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java
----------------------------------------------------------------------
diff --git 
a/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java 
b/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java
index 63a49de..6ec56c7 100644
--- a/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java
@@ -127,7 +127,7 @@ public class AntiCompactionTest
     }
 
     @Test
-    public void antiCompactionSizeTest() throws ExecutionException, 
InterruptedException, IOException
+    public void antiCompactionSizeTest() throws InterruptedException, 
IOException
     {
         Keyspace keyspace = Keyspace.open(KEYSPACE1);
         ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(CF);
@@ -180,16 +180,16 @@ public class AntiCompactionTest
     }
 
     @Test
-    public void antiCompactTenSTC() throws InterruptedException, 
ExecutionException, IOException{
+    public void antiCompactTenSTC() throws InterruptedException, IOException{
         antiCompactTen("SizeTieredCompactionStrategy");
     }
 
     @Test
-    public void antiCompactTenLC() throws InterruptedException, 
ExecutionException, IOException{
+    public void antiCompactTenLC() throws InterruptedException, IOException{
         antiCompactTen("LeveledCompactionStrategy");
     }
 
-    public void antiCompactTen(String compactionStrategy) throws 
InterruptedException, ExecutionException, IOException
+    public void antiCompactTen(String compactionStrategy) throws 
InterruptedException, IOException
     {
         Keyspace keyspace = Keyspace.open(KEYSPACE1);
         ColumnFamilyStore store = keyspace.getColumnFamilyStore(CF);
@@ -240,7 +240,7 @@ public class AntiCompactionTest
         assertEquals(nonRepairedKeys, 60);
     }
     @Test
-    public void shouldMutateRepairedAt() throws InterruptedException, 
ExecutionException, IOException
+    public void shouldMutateRepairedAt() throws InterruptedException, 
IOException
     {
         ColumnFamilyStore store = prepareColumnFamilyStore();
         Collection<SSTableReader> sstables = store.getUnrepairedSSTables();
@@ -259,7 +259,7 @@ public class AntiCompactionTest
 
 
     @Test
-    public void shouldSkipAntiCompactionForNonIntersectingRange() throws 
InterruptedException, ExecutionException, IOException
+    public void shouldSkipAntiCompactionForNonIntersectingRange() throws 
InterruptedException, IOException
     {
         Keyspace keyspace = Keyspace.open(KEYSPACE1);
         ColumnFamilyStore store = keyspace.getColumnFamilyStore(CF);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
----------------------------------------------------------------------
diff --git 
a/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java 
b/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
index 4b5aa79..6db01d7 100644
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
@@ -90,7 +90,7 @@ public class CompactionsPurgeTest
     }
 
     @Test
-    public void testMajorCompactionPurge() throws ExecutionException, 
InterruptedException
+    public void testMajorCompactionPurge()
     {
         CompactionManager.instance.disableAutoCompaction();
 
@@ -362,7 +362,7 @@ public class CompactionsPurgeTest
     }
 
     @Test
-    public void testRowTombstoneObservedBeforePurging() throws 
InterruptedException, ExecutionException
+    public void testRowTombstoneObservedBeforePurging()
     {
         String keyspace = "cql_keyspace";
         String table = "table1";

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java 
b/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
index a6ee3f9..0016261 100644
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
@@ -160,7 +160,7 @@ public class CompactionsTest
     }
 
     @Test
-    public void testSuperColumnTombstones() throws ExecutionException, 
InterruptedException
+    public void testSuperColumnTombstones()
     {
         Keyspace keyspace = Keyspace.open(KEYSPACE1);
         ColumnFamilyStore cfs = keyspace.getColumnFamilyStore("Super1");
@@ -378,7 +378,7 @@ public class CompactionsTest
     }
 
     @Test
-    public void testRangeTombstones() throws IOException, ExecutionException, 
InterruptedException
+    public void testRangeTombstones()
     {
         Keyspace keyspace = Keyspace.open(KEYSPACE1);
         ColumnFamilyStore cfs = keyspace.getColumnFamilyStore("Standard2");

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/db/compaction/OneCompactionTest.java
----------------------------------------------------------------------
diff --git 
a/test/unit/org/apache/cassandra/db/compaction/OneCompactionTest.java 
b/test/unit/org/apache/cassandra/db/compaction/OneCompactionTest.java
index 216c9cf..a2c4191 100644
--- a/test/unit/org/apache/cassandra/db/compaction/OneCompactionTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/OneCompactionTest.java
@@ -59,7 +59,7 @@ public class OneCompactionTest
                                     SchemaLoader.standardCFMD(KEYSPACE1, 
CF_STANDARD2));
     }
 
-    private void testCompaction(String columnFamilyName, int insertsPerTable) 
throws ExecutionException, InterruptedException
+    private void testCompaction(String columnFamilyName, int insertsPerTable)
     {
         CompactionManager.instance.disableAutoCompaction();
 
@@ -81,13 +81,13 @@ public class OneCompactionTest
     }
 
     @Test
-    public void testCompaction1() throws ExecutionException, 
InterruptedException
+    public void testCompaction1()
     {
         testCompaction("Standard1", 1);
     }
 
     @Test
-    public void testCompaction2() throws ExecutionException, 
InterruptedException
+    public void testCompaction2()
     {
         testCompaction("Standard2", 2);
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
----------------------------------------------------------------------
diff --git 
a/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java 
b/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
index b2cc1a4..a415634 100644
--- a/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
+++ b/test/unit/org/apache/cassandra/db/index/PerRowSecondaryIndexTest.java
@@ -144,7 +144,7 @@ public class PerRowSecondaryIndexTest
     }
     
     @Test
-    public void testInvalidSearch() throws IOException
+    public void testInvalidSearch()
     {
         Mutation rm;
         rm = new Mutation(KEYSPACE1, ByteBufferUtil.bytes("k4"));

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java 
b/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
index 0a29255..25f906f 100644
--- a/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
+++ b/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
@@ -107,7 +107,7 @@ public class SSTableReaderTest
     }
 
     @Test
-    public void testGetPositionsForRanges() throws ExecutionException, 
InterruptedException
+    public void testGetPositionsForRanges()
     {
         Keyspace keyspace = Keyspace.open(KEYSPACE1);
         ColumnFamilyStore store = keyspace.getColumnFamilyStore("Standard2");
@@ -146,7 +146,7 @@ public class SSTableReaderTest
     }
 
     @Test
-    public void testSpannedIndexPositions() throws IOException, 
ExecutionException, InterruptedException
+    public void testSpannedIndexPositions() throws IOException
     {
         MmappedSegmentedFile.MAX_SEGMENT_SIZE = 40; // each index entry is ~11 
bytes, so this will generate lots of segments
 
@@ -238,7 +238,7 @@ public class SSTableReaderTest
     }
 
     @Test
-    public void testGetPositionsForRangesWithKeyCache() throws 
ExecutionException, InterruptedException
+    public void testGetPositionsForRangesWithKeyCache()
     {
         Keyspace keyspace = Keyspace.open(KEYSPACE1);
         ColumnFamilyStore store = keyspace.getColumnFamilyStore("Standard2");
@@ -286,7 +286,7 @@ public class SSTableReaderTest
         // check if opening and querying works
         assertIndexQueryWorks(store);
     }
-    public void testGetPositionsKeyCacheStats() throws IOException, 
ExecutionException, InterruptedException
+    public void testGetPositionsKeyCacheStats()
     {
         Keyspace keyspace = Keyspace.open(KEYSPACE1);
         ColumnFamilyStore store = keyspace.getColumnFamilyStore("Standard2");
@@ -407,7 +407,7 @@ public class SSTableReaderTest
     }
 
     @Test
-    public void testGetPositionsForRangesFromTableOpenedForBulkLoading() 
throws IOException, ExecutionException, InterruptedException
+    public void testGetPositionsForRangesFromTableOpenedForBulkLoading() 
throws IOException
     {
         Keyspace keyspace = Keyspace.open(KEYSPACE1);
         ColumnFamilyStore store = keyspace.getColumnFamilyStore("Standard2");

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java 
b/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
index 708c29a..747b522 100644
--- a/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
+++ b/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
@@ -48,7 +48,7 @@ public class ThriftValidationTest
     public static final String CF_STANDARDLONG3 = "StandardLong3";
 
     @BeforeClass
-    public static void defineSchema() throws ConfigurationException, 
IOException, TException
+    public static void defineSchema() throws ConfigurationException
     {
         SchemaLoader.prepareServer();
         SchemaLoader.createKeyspace(KEYSPACE1,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/tools/SSTableExportTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/tools/SSTableExportTest.java 
b/test/unit/org/apache/cassandra/tools/SSTableExportTest.java
index 8e3f5ca..3b04110 100644
--- a/test/unit/org/apache/cassandra/tools/SSTableExportTest.java
+++ b/test/unit/org/apache/cassandra/tools/SSTableExportTest.java
@@ -74,7 +74,7 @@ public class SSTableExportTest
     public static final String CF_VALSWITHQUOTES = "ValuesWithQuotes";
 
     @BeforeClass
-    public static void defineSchema() throws ConfigurationException, 
IOException, TException
+    public static void defineSchema() throws ConfigurationException
     {
         SchemaLoader.prepareServer();
         SchemaLoader.createKeyspace(KEYSPACE1,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/tools/SSTableImportTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/tools/SSTableImportTest.java 
b/test/unit/org/apache/cassandra/tools/SSTableImportTest.java
index eb5fb28..3e64b38 100644
--- a/test/unit/org/apache/cassandra/tools/SSTableImportTest.java
+++ b/test/unit/org/apache/cassandra/tools/SSTableImportTest.java
@@ -71,7 +71,7 @@ public class SSTableImportTest
     public static final String CQL_TABLE = "table1";
 
     @BeforeClass
-    public static void defineSchema() throws ConfigurationException, 
IOException, TException
+    public static void defineSchema() throws ConfigurationException
     {
         SchemaLoader.prepareServer();
         SchemaLoader.createKeyspace(KEYSPACE1,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/utils/BitSetTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/utils/BitSetTest.java 
b/test/unit/org/apache/cassandra/utils/BitSetTest.java
index 59bc5e4..2f1e7c6 100644
--- a/test/unit/org/apache/cassandra/utils/BitSetTest.java
+++ b/test/unit/org/apache/cassandra/utils/BitSetTest.java
@@ -70,15 +70,19 @@ public class BitSetTest
     @Test
     public void testOffHeapSerialization() throws IOException
     {
-        OffHeapBitSet bs = new OffHeapBitSet(100000);
-        populateAndReserialize(bs);
+        try (OffHeapBitSet bs = new OffHeapBitSet(100000))
+        {
+            populateAndReserialize(bs);
+        }
     }
 
     @Test
     public void testOffHeapCompatibility() throws IOException
     {
-        OpenBitSet bs = new OpenBitSet(100000);
-        populateAndReserialize(bs);
+        try (OpenBitSet bs = new OpenBitSet(100000)) 
+        {
+            populateAndReserialize(bs);
+        }
     }
 
     private void populateAndReserialize(IBitSet bs) throws IOException
@@ -90,8 +94,10 @@ public class BitSetTest
         DataOutputBuffer out = new DataOutputBuffer();
         bs.serialize(out);
         DataInputStream in = new DataInputStream(new 
ByteArrayInputStream(out.getData()));
-        OffHeapBitSet newbs = OffHeapBitSet.deserialize(in);
-        compare(bs, newbs);
+        try (OffHeapBitSet newbs = OffHeapBitSet.deserialize(in))
+        {
+            compare(bs, newbs);
+        }
     }
 
     private void compare(IBitSet bs, IBitSet newbs)
@@ -102,25 +108,26 @@ public class BitSetTest
     }
 
     @Test
-    public void testBitClear() throws IOException
+    public void testBitClear()
     {
         int size = Integer.MAX_VALUE / 4000;
-        OffHeapBitSet bitset = new OffHeapBitSet(size);
-        List<Integer> randomBits = Lists.newArrayList();
-        for (int i = 0; i < 10; i++)
-            randomBits.add(random.nextInt(size));
-
-        for (long randomBit : randomBits)
-            bitset.set(randomBit);
-
-        for (long randomBit : randomBits)
-            Assert.assertEquals(true, bitset.get(randomBit));
-
-        for (long randomBit : randomBits)
-            bitset.clear(randomBit);
-
-        for (long randomBit : randomBits)
-            Assert.assertEquals(false, bitset.get(randomBit));
-        bitset.close();
+        try (OffHeapBitSet bitset = new OffHeapBitSet(size))
+        {
+            List<Integer> randomBits = Lists.newArrayList();
+            for (int i = 0; i < 10; i++)
+                randomBits.add(random.nextInt(size));
+    
+            for (long randomBit : randomBits)
+                bitset.set(randomBit);
+    
+            for (long randomBit : randomBits)
+                Assert.assertEquals(true, bitset.get(randomBit));
+    
+            for (long randomBit : randomBits)
+                bitset.clear(randomBit);
+    
+            for (long randomBit : randomBits)
+                Assert.assertEquals(false, bitset.get(randomBit));
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c87b6a30/test/unit/org/apache/cassandra/utils/JVMStabilityInspectorTest.java
----------------------------------------------------------------------
diff --git 
a/test/unit/org/apache/cassandra/utils/JVMStabilityInspectorTest.java 
b/test/unit/org/apache/cassandra/utils/JVMStabilityInspectorTest.java
index 2ecbee4..f588244 100644
--- a/test/unit/org/apache/cassandra/utils/JVMStabilityInspectorTest.java
+++ b/test/unit/org/apache/cassandra/utils/JVMStabilityInspectorTest.java
@@ -68,7 +68,7 @@ public class JVMStabilityInspectorTest
     }
 
     @Test
-    public void fileHandleTest() throws FileNotFoundException
+    public void fileHandleTest()
     {
         KillerForTests killerForTests = new KillerForTests();
         JVMStabilityInspector.Killer originalKiller = 
JVMStabilityInspector.replaceKiller(killerForTests);

Reply via email to