cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject git commit: don't declare throwing exceptions that aren't
Date Fri, 22 Aug 2014 23:25:08 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 0ce9abd78 -> 0a0ee442f


don't declare throwing exceptions that aren't


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

Branch: refs/heads/trunk
Commit: 0a0ee442fdb13ec8a04c2990635dc389d3ba98a2
Parents: 0ce9abd
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Fri Aug 22 19:24:04 2014 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Fri Aug 22 19:24:04 2014 -0400

----------------------------------------------------------------------
 src/java/org/apache/cassandra/config/UFMetaData.java           | 1 -
 src/java/org/apache/cassandra/cql3/Tuples.java                 | 2 +-
 src/java/org/apache/cassandra/cql3/functions/Functions.java    | 2 +-
 .../cassandra/cql3/statements/ModificationStatement.java       | 2 +-
 .../org/apache/cassandra/cql3/statements/SelectStatement.java  | 2 +-
 src/java/org/apache/cassandra/cql3/udf/UDFunction.java         | 2 +-
 src/java/org/apache/cassandra/db/DefsTables.java               | 2 +-
 src/java/org/apache/cassandra/db/Memtable.java                 | 3 +--
 .../org/apache/cassandra/db/compaction/CompactionManager.java  | 2 +-
 src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java | 2 +-
 src/java/org/apache/cassandra/io/sstable/SSTableReader.java    | 2 +-
 src/java/org/apache/cassandra/locator/CloudstackSnitch.java    | 2 +-
 src/java/org/apache/cassandra/service/ActiveRepairService.java | 6 ++----
 src/java/org/apache/cassandra/service/MigrationManager.java    | 4 ++--
 src/java/org/apache/cassandra/tools/SSTableLevelResetter.java  | 3 +--
 src/java/org/apache/cassandra/tools/StandaloneSplitter.java    | 2 +-
 src/java/org/apache/cassandra/tools/StandaloneUpgrader.java    | 2 +-
 17 files changed, 18 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/config/UFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/UFMetaData.java b/src/java/org/apache/cassandra/config/UFMetaData.java
index 18484f3..f11d7ac 100644
--- a/src/java/org/apache/cassandra/config/UFMetaData.java
+++ b/src/java/org/apache/cassandra/config/UFMetaData.java
@@ -208,7 +208,6 @@ public final class UFMetaData
     }
 
     public static Mutation createOrReplaceFunction(long timestamp, UFMetaData f)
-    throws ConfigurationException, SyntaxException
     {
         Mutation mutation = new Mutation(Keyspace.SYSTEM_KS, partKey.decompose(f.namespace,
f.functionName));
         ColumnFamily cf = mutation.addOrGet(SystemKeyspace.SCHEMA_FUNCTIONS_CF);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/cql3/Tuples.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/Tuples.java b/src/java/org/apache/cassandra/cql3/Tuples.java
index f0d7a13..cc04ebc 100644
--- a/src/java/org/apache/cassandra/cql3/Tuples.java
+++ b/src/java/org/apache/cassandra/cql3/Tuples.java
@@ -285,7 +285,7 @@ public class Tuples
             super(bindIndex);
         }
 
-        private static ColumnSpecification makeReceiver(List<? extends ColumnSpecification>
receivers) throws InvalidRequestException
+        private static ColumnSpecification makeReceiver(List<? extends ColumnSpecification>
receivers)
         {
             List<AbstractType<?>> types = new ArrayList<>(receivers.size());
             StringBuilder inName = new StringBuilder("(");

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/cql3/functions/Functions.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/functions/Functions.java b/src/java/org/apache/cassandra/cql3/functions/Functions.java
index 03dd13d..977d242 100644
--- a/src/java/org/apache/cassandra/cql3/functions/Functions.java
+++ b/src/java/org/apache/cassandra/cql3/functions/Functions.java
@@ -137,7 +137,7 @@ public abstract class Functions
         }
     }
 
-    private static boolean isValidType(String keyspace, Function fun, List<? extends AssignementTestable>
providedArgs, ColumnSpecification receiver) throws InvalidRequestException
+    private static boolean isValidType(String keyspace, Function fun, List<? extends AssignementTestable>
providedArgs, ColumnSpecification receiver)
     {
         if (!receiver.type.isValueCompatibleWith(fun.returnType()))
             return false;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index c32f9a8..c4ab50e 100644
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@ -178,7 +178,7 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF
                                 staticConditions == null ? Collections.<ColumnDefinition>emptyList()
: Iterables.transform(staticConditions, getColumnForCondition));
     }
 
-    public void addCondition(ColumnCondition cond) throws InvalidRequestException
+    public void addCondition(ColumnCondition cond)
     {
         List<ColumnCondition> conds = null;
         if (cond.column.isStatic())

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 011419b..ccfd09e 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -1282,7 +1282,7 @@ public class SelectStatement implements CQLStatement, MeasurableForPreparedCache
     /**
      * Orders results when multiple keys are selected (using IN)
      */
-    private void orderResults(ResultSet cqlRows) throws InvalidRequestException
+    private void orderResults(ResultSet cqlRows)
     {
         if (cqlRows.size() == 0 || !needsPostQueryOrdering())
             return;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/cql3/udf/UDFunction.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/udf/UDFunction.java b/src/java/org/apache/cassandra/cql3/udf/UDFunction.java
index 89f37d5..61e52e5 100644
--- a/src/java/org/apache/cassandra/cql3/udf/UDFunction.java
+++ b/src/java/org/apache/cassandra/cql3/udf/UDFunction.java
@@ -113,7 +113,7 @@ public class UDFunction
         }
     }
 
-    public Function create(List<? extends AssignementTestable> providedArgs) throws
InvalidRequestException
+    public Function create(List<? extends AssignementTestable> providedArgs)
     {
         final int argCount = providedArgs.size();
         final List<AbstractType<?>> argsType = new ArrayList<>(argCount);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/db/DefsTables.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/DefsTables.java b/src/java/org/apache/cassandra/db/DefsTables.java
index 33a112a..e8692a7 100644
--- a/src/java/org/apache/cassandra/db/DefsTables.java
+++ b/src/java/org/apache/cassandra/db/DefsTables.java
@@ -168,7 +168,7 @@ public class DefsTables
         Schema.instance.updateVersionAndAnnounce();
     }
 
-    public static synchronized void mergeSchemaInternal(Collection<Mutation> mutations,
boolean doFlush) throws ConfigurationException, IOException
+    public static synchronized void mergeSchemaInternal(Collection<Mutation> mutations,
boolean doFlush) throws IOException
     {
         // compare before/after schemas of the affected keyspaces only
         Set<String> keyspaces = new HashSet<>(mutations.size());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/db/Memtable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Memtable.java b/src/java/org/apache/cassandra/db/Memtable.java
index 1eea915..2e22113 100644
--- a/src/java/org/apache/cassandra/db/Memtable.java
+++ b/src/java/org/apache/cassandra/db/Memtable.java
@@ -319,7 +319,6 @@ public class Memtable
         }
 
         private SSTableReader writeSortedContents(ReplayPosition context, File sstableDirectory)
-        throws ExecutionException, InterruptedException
         {
             logger.info("Writing {}", Memtable.this.toString());
 
@@ -375,7 +374,7 @@ public class Memtable
             }
         }
 
-        public SSTableWriter createFlushWriter(String filename) throws ExecutionException,
InterruptedException
+        public SSTableWriter createFlushWriter(String filename)
         {
             MetadataCollector sstableMetadataCollector = new MetadataCollector(cfs.metadata.comparator).replayPosition(context);
             return new SSTableWriter(filename,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/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 5af7139..247a0c1 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -396,7 +396,7 @@ public class CompactionManager implements CompactionManagerMBean
     public void performAnticompaction(ColumnFamilyStore cfs,
                                       Collection<Range<Token>> ranges,
                                       Collection<SSTableReader> validatedForRepair,
-                                      long repairedAt) throws InterruptedException, ExecutionException,
IOException
+                                      long repairedAt) throws InterruptedException, IOException
     {
         logger.info("Starting anticompaction for {}/{}", cfs.keyspace.getName(), cfs.getColumnFamilyName());
         logger.debug("Starting anticompaction for ranges {}", ranges);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
index 5bac2fc..9ad7d8c 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
@@ -89,7 +89,7 @@ class CqlRecordWriter extends AbstractColumnFamilyRecordWriter<Map<String,
ByteB
         this.context = context;
     }
 
-    CqlRecordWriter(Configuration conf, Progressable progressable) throws IOException
+    CqlRecordWriter(Configuration conf, Progressable progressable)
     {
         this(conf);
         this.progressable = progressable;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
index 53f7e53..433fdd7 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
@@ -1071,7 +1071,7 @@ public 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/0a0ee442/src/java/org/apache/cassandra/locator/CloudstackSnitch.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/CloudstackSnitch.java b/src/java/org/apache/cassandra/locator/CloudstackSnitch.java
index 0200f0f..9f98cff 100644
--- a/src/java/org/apache/cassandra/locator/CloudstackSnitch.java
+++ b/src/java/org/apache/cassandra/locator/CloudstackSnitch.java
@@ -168,7 +168,7 @@ public class CloudstackSnitch extends AbstractNetworkTopologySnitch
         throw new ConfigurationException("No valid DHCP lease file could be found.");
     }
 
-    String csEndpointFromLease(File lease) throws ConfigurationException, IOException
+    String csEndpointFromLease(File lease) throws ConfigurationException
     {
         BufferedReader reader = null;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/service/ActiveRepairService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/ActiveRepairService.java b/src/java/org/apache/cassandra/service/ActiveRepairService.java
index 35a86f6..f1b9cce 100644
--- a/src/java/org/apache/cassandra/service/ActiveRepairService.java
+++ b/src/java/org/apache/cassandra/service/ActiveRepairService.java
@@ -18,7 +18,6 @@
 package org.apache.cassandra.service;
 
 import java.io.File;
-import java.io.IOException;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.*;
@@ -33,7 +32,6 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.concurrent.JMXConfigurableThreadPoolExecutor;
 import org.apache.cassandra.concurrent.NamedThreadFactory;
-import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.compaction.CompactionManager;
 import org.apache.cassandra.dht.Bounds;
@@ -316,7 +314,7 @@ public class ActiveRepairService
         parentRepairSessions.put(parentRepairSession, new ParentRepairSession(columnFamilyStores,
ranges, sstablesToRepair, System.currentTimeMillis()));
     }
 
-    public void finishParentSession(UUID parentSession, Set<InetAddress> neighbors,
boolean doAntiCompaction) throws InterruptedException, ExecutionException, IOException
+    public void finishParentSession(UUID parentSession, Set<InetAddress> neighbors,
boolean doAntiCompaction)
     {
         try
         {
@@ -343,7 +341,7 @@ public class ActiveRepairService
         return parentRepairSessions.get(parentSessionId);
     }
 
-    public List<Future<?>> doAntiCompaction(UUID parentRepairSession) throws
InterruptedException, ExecutionException, IOException
+    public List<Future<?>> doAntiCompaction(UUID parentRepairSession)
     {
         assert parentRepairSession != null;
         ParentRepairSession prs = getParentRepairSession(parentRepairSession);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/service/MigrationManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java
index 28e3e39..c203934 100644
--- a/src/java/org/apache/cassandra/service/MigrationManager.java
+++ b/src/java/org/apache/cassandra/service/MigrationManager.java
@@ -384,7 +384,7 @@ public class MigrationManager
     }
 
     public static void announceNewFunction(UFMetaData function, boolean announceLocally)
-        throws ConfigurationException, SyntaxException
+        throws ConfigurationException
     {
         Mutation mutation = UFMetaData.createOrReplaceFunction(FBUtilities.timestampMicros(),
function);
         if (mutation == null)
@@ -406,7 +406,7 @@ public class MigrationManager
             {
                 DefsTables.mergeSchemaInternal(Collections.singletonList(schema), false);
             }
-            catch (ConfigurationException | IOException e)
+            catch (IOException e)
             {
                 throw new RuntimeException(e);
             }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/tools/SSTableLevelResetter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/SSTableLevelResetter.java b/src/java/org/apache/cassandra/tools/SSTableLevelResetter.java
index 7f7ce99..b83edae 100644
--- a/src/java/org/apache/cassandra/tools/SSTableLevelResetter.java
+++ b/src/java/org/apache/cassandra/tools/SSTableLevelResetter.java
@@ -17,7 +17,6 @@
  */
 package org.apache.cassandra.tools;
 
-import java.io.IOException;
 import java.io.PrintStream;
 import java.util.Map;
 import java.util.Set;
@@ -39,7 +38,7 @@ public class SSTableLevelResetter
     /**
      * @param args a list of sstables whose metadata we are changing
      */
-    public static void main(String[] args) throws IOException
+    public static void main(String[] args)
     {
         PrintStream out = System.out;
         if (args.length == 0)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/tools/StandaloneSplitter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/StandaloneSplitter.java b/src/java/org/apache/cassandra/tools/StandaloneSplitter.java
index f3725fd..befe270 100644
--- a/src/java/org/apache/cassandra/tools/StandaloneSplitter.java
+++ b/src/java/org/apache/cassandra/tools/StandaloneSplitter.java
@@ -45,7 +45,7 @@ public class StandaloneSplitter
     private static final String NO_SNAPSHOT_OPTION = "no-snapshot";
     private static final String SIZE_OPTION = "size";
 
-    public static void main(String args[]) throws IOException
+    public static void main(String args[])
     {
         Options options = Options.parseArgs(args);
         try

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0a0ee442/src/java/org/apache/cassandra/tools/StandaloneUpgrader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/StandaloneUpgrader.java b/src/java/org/apache/cassandra/tools/StandaloneUpgrader.java
index 5d8625b..1538efc 100644
--- a/src/java/org/apache/cassandra/tools/StandaloneUpgrader.java
+++ b/src/java/org/apache/cassandra/tools/StandaloneUpgrader.java
@@ -39,7 +39,7 @@ public class StandaloneUpgrader
     private static final String DEBUG_OPTION  = "debug";
     private static final String HELP_OPTION  = "help";
 
-    public static void main(String args[]) throws IOException
+    public static void main(String args[])
     {
         Options options = Options.parseArgs(args);
         try


Mime
View raw message