aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zma...@apache.org
Subject aurora git commit: Upgrade guava to 20.0
Date Wed, 16 Nov 2016 16:25:43 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 889f4b2e3 -> 85e249390


Upgrade guava to 20.0

Release Notes: https://github.com/google/guava/wiki/Release20

It's the usual mix of new features and deprecations. The additions of
`Quantiles` and `Stats` could give us some quick improvements in our stats
libraries.

Bugs closed: AURORA-1821

Reviewed at https://reviews.apache.org/r/53796/


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

Branch: refs/heads/master
Commit: 85e249390a6a9a3e34f9859da5466ca119ef8107
Parents: 889f4b2
Author: Zameer Manji <zmanji@apache.org>
Authored: Wed Nov 16 08:25:26 2016 -0800
Committer: Zameer Manji <zmanji@apache.org>
Committed: Wed Nov 16 08:25:26 2016 -0800

----------------------------------------------------------------------
 build.gradle                                                  | 2 +-
 .../java/org/apache/aurora/scheduler/SchedulerLifecycle.java  | 3 +--
 src/main/java/org/apache/aurora/scheduler/TierModule.java     | 5 ++---
 .../java/org/apache/aurora/scheduler/app/SchedulerMain.java   | 2 +-
 .../aurora/scheduler/cron/quartz/CronJobManagerImpl.java      | 3 +--
 .../java/org/apache/aurora/scheduler/cron/quartz/Quartz.java  | 3 +--
 .../aurora/scheduler/discovery/ServiceDiscoveryModule.java    | 3 +--
 .../org/apache/aurora/scheduler/events/WebhookModule.java     | 5 ++---
 .../org/apache/aurora/scheduler/http/JettyServerModule.java   | 5 ++---
 .../java/org/apache/aurora/scheduler/http/LeaderRedirect.java | 4 ++--
 .../java/org/apache/aurora/scheduler/http/api/ApiBeta.java    | 5 ++---
 .../aurora/scheduler/http/api/GsonMessageBodyHandler.java     | 3 +--
 .../http/api/security/Kerberos5ShiroRealmModule.java          | 3 +--
 .../scheduler/mesos/CommandLineDriverSettingsModule.java      | 5 ++---
 .../org/apache/aurora/scheduler/scheduling/TaskGroups.java    | 3 +--
 .../org/apache/aurora/scheduler/state/StateManagerImpl.java   | 3 +--
 .../java/org/apache/aurora/scheduler/storage/TaskStore.java   | 5 ++---
 .../aurora/scheduler/storage/db/MigrationManagerImpl.java     | 3 +--
 .../apache/aurora/scheduler/storage/log/EntrySerializer.java  | 3 +--
 .../aurora/scheduler/storage/log/SnapshotStoreImpl.java       | 7 +++----
 .../aurora/scheduler/thrift/aop/LoggingInterceptor.java       | 2 +-
 .../aurora/scheduler/updater/JobUpdateControllerImpl.java     | 7 +++----
 .../apache/aurora/scheduler/storage/log/LogManagerTest.java   | 3 ++-
 23 files changed, 35 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 848851b..a586ad0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -82,7 +82,7 @@ For more details, please see https://issues.apache.org/jira/browse/AURORA-1169
   ext.commonsLangRev = '2.6'
   ext.curatorRev = '2.11.1'
   ext.gsonRev = '2.3.1'
-  ext.guavaRev = '19.0'
+  ext.guavaRev = '20.0'
   ext.guiceRev = '3.0'
   ext.httpclientRev = '4.5.2'
   ext.httpcoreRev = '4.4.4'

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/SchedulerLifecycle.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/SchedulerLifecycle.java b/src/main/java/org/apache/aurora/scheduler/SchedulerLifecycle.java
index 5ac5f25..76209b1 100644
--- a/src/main/java/org/apache/aurora/scheduler/SchedulerLifecycle.java
+++ b/src/main/java/org/apache/aurora/scheduler/SchedulerLifecycle.java
@@ -32,7 +32,6 @@ import com.google.common.base.Preconditions;
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
 import com.google.common.base.Supplier;
-import com.google.common.base.Throwables;
 import com.google.common.eventbus.Subscribe;
 import com.google.common.util.concurrent.Atomics;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
@@ -274,7 +273,7 @@ public class SchedulerLifecycle implements EventSubscriber {
           leaderControl.get().advertise();
         } catch (SingletonService.AdvertiseException | InterruptedException e) {
           LOG.error("Failed to advertise leader, shutting down.");
-          throw Throwables.propagate(e);
+          throw new RuntimeException(e);
         }
       }
     };

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/TierModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/TierModule.java b/src/main/java/org/apache/aurora/scheduler/TierModule.java
index d956664..61afa31 100644
--- a/src/main/java/org/apache/aurora/scheduler/TierModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/TierModule.java
@@ -19,7 +19,6 @@ import java.nio.charset.StandardCharsets;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Strings;
-import com.google.common.base.Throwables;
 import com.google.common.io.Files;
 import com.google.common.io.Resources;
 import com.google.inject.AbstractModule;
@@ -76,7 +75,7 @@ public class TierModule extends AbstractModule {
               StandardCharsets.UTF_8);
     } catch (IOException e) {
       LOG.error("Error loading tier configuration file.");
-      throw Throwables.propagate(e);
+      throw new RuntimeException(e);
     }
   }
 
@@ -87,7 +86,7 @@ public class TierModule extends AbstractModule {
       return new ObjectMapper().readValue(config, TierConfig.class);
     } catch (IOException e) {
       LOG.error("Error parsing tier configuration file.");
-      throw Throwables.propagate(e);
+      throw new RuntimeException(e);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java b/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
index 0f92a3c..e0d32de 100644
--- a/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
+++ b/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
@@ -116,7 +116,7 @@ public class SchedulerMain {
 
     HostAndPort httpAddress = httpService.getAddress();
     InetSocketAddress httpSocketAddress =
-        InetSocketAddress.createUnresolved(httpAddress.getHostText(), httpAddress.getPort());
+        InetSocketAddress.createUnresolved(httpAddress.getHost(), httpAddress.getPort());
     try {
       schedulerService.lead(
           httpSocketAddress,

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java
b/src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java
index 850effc..90399f2 100644
--- a/src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java
@@ -19,7 +19,6 @@ import java.util.TimeZone;
 import javax.inject.Inject;
 
 import com.google.common.base.Optional;
-import com.google.common.base.Throwables;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableMap;
 
@@ -206,7 +205,7 @@ class CronJobManagerImpl implements CronJobManager {
         }
       }
     } catch (SchedulerException e) {
-      throw Throwables.propagate(e);
+      throw new RuntimeException(e);
     }
     return scheduledJobs.build();
   }

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/cron/quartz/Quartz.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/cron/quartz/Quartz.java b/src/main/java/org/apache/aurora/scheduler/cron/quartz/Quartz.java
index c379a32..4f57e33 100644
--- a/src/main/java/org/apache/aurora/scheduler/cron/quartz/Quartz.java
+++ b/src/main/java/org/apache/aurora/scheduler/cron/quartz/Quartz.java
@@ -18,7 +18,6 @@ import java.util.List;
 import java.util.TimeZone;
 
 import com.google.common.base.Joiner;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ContiguousSet;
 import com.google.common.collect.DiscreteDomain;
 import com.google.common.collect.Lists;
@@ -81,7 +80,7 @@ final class Quartz {
     try {
       cronExpression = new CronExpression(rawCronExpresion);
     } catch (ParseException e) {
-      throw Throwables.propagate(e);
+      throw new RuntimeException(e);
     }
     cronExpression.setTimeZone(timeZone);
     return cronExpression;

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/discovery/ServiceDiscoveryModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/discovery/ServiceDiscoveryModule.java
b/src/main/java/org/apache/aurora/scheduler/discovery/ServiceDiscoveryModule.java
index ef62f27..b7ca62c 100644
--- a/src/main/java/org/apache/aurora/scheduler/discovery/ServiceDiscoveryModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/discovery/ServiceDiscoveryModule.java
@@ -20,7 +20,6 @@ import java.util.List;
 
 import javax.inject.Singleton;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.io.Files;
 import com.google.common.util.concurrent.AbstractIdleService;
@@ -135,7 +134,7 @@ public class ServiceDiscoveryModule extends AbstractModule {
       try {
         testServer.startNetwork();
       } catch (IOException | InterruptedException e) {
-        throw Throwables.propagate(e);
+        throw new RuntimeException(e);
       }
       return ImmutableList.of(
           InetSocketAddress.createUnresolved("localhost", testServer.getPort()));

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/events/WebhookModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/events/WebhookModule.java b/src/main/java/org/apache/aurora/scheduler/events/WebhookModule.java
index 05e19f4..1f10af7 100644
--- a/src/main/java/org/apache/aurora/scheduler/events/WebhookModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/events/WebhookModule.java
@@ -19,7 +19,6 @@ import java.nio.charset.StandardCharsets;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Strings;
-import com.google.common.base.Throwables;
 import com.google.common.io.Files;
 import com.google.common.io.Resources;
 import com.google.inject.AbstractModule;
@@ -102,7 +101,7 @@ public class WebhookModule extends AbstractModule {
               StandardCharsets.UTF_8);
     } catch (IOException e) {
       LOG.error("Error loading webhook configuration file.");
-      throw Throwables.propagate(e);
+      throw new RuntimeException(e);
     }
   }
 
@@ -113,7 +112,7 @@ public class WebhookModule extends AbstractModule {
       return new ObjectMapper().readValue(config, WebhookInfo.class);
     } catch (IOException e) {
       LOG.error("Error parsing Webhook configuration file.");
-      throw Throwables.propagate(e);
+      throw new RuntimeException(e);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java b/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java
index 84f7ef3..af8567f 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java
@@ -33,7 +33,6 @@ import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Supplier;
 import com.google.common.base.Suppliers;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableMultimap;
 import com.google.common.collect.ImmutableSet;
@@ -355,7 +354,7 @@ public class JettyServerModule extends AbstractModule {
     public HostAndPort getAddress() {
       Preconditions.checkState(state() == State.RUNNING);
       return HostAndPort.fromParts(
-          advertisedHostOverride.or(serverAddress.getHostText()),
+          advertisedHostOverride.or(serverAddress.getHost()),
           serverAddress.getPort());
     }
 
@@ -390,7 +389,7 @@ public class JettyServerModule extends AbstractModule {
         connector.open();
         server.start();
       } catch (Exception e) {
-        throw Throwables.propagate(e);
+        throw new RuntimeException(e);
       }
 
       String host;

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/http/LeaderRedirect.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/http/LeaderRedirect.java b/src/main/java/org/apache/aurora/scheduler/http/LeaderRedirect.java
index 0077911..6ea780c 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/LeaderRedirect.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/LeaderRedirect.java
@@ -99,7 +99,7 @@ class LeaderRedirect implements Closeable {
   private Optional<HostAndPort> getLocalHttp() {
     HostAndPort localHttp = httpService.getAddress();
     return (localHttp == null) ? Optional.absent()
-        : Optional.of(HostAndPort.fromParts(localHttp.getHostText(), localHttp.getPort()));
+        : Optional.of(HostAndPort.fromParts(localHttp.getHost(), localHttp.getPort()));
   }
 
   /**
@@ -166,7 +166,7 @@ class LeaderRedirect implements Closeable {
       StringBuilder redirect = new StringBuilder()
           .append(req.getScheme())
           .append("://")
-          .append(target.getHostText())
+          .append(target.getHost())
           .append(':')
           .append(target.getPort())
           .append(

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/http/api/ApiBeta.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/http/api/ApiBeta.java b/src/main/java/org/apache/aurora/scheduler/http/api/ApiBeta.java
index 053b87b..f923067 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/api/ApiBeta.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/api/ApiBeta.java
@@ -34,7 +34,6 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
 import javax.ws.rs.core.StreamingOutput;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.Lists;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
@@ -112,7 +111,7 @@ public class ApiBeta {
     try {
       return Iface.class.getMethod(name, parameterTypes);
     } catch (NoSuchMethodException e) {
-      throw Throwables.propagate(e);
+      throw new RuntimeException(e);
     }
   }
 
@@ -151,7 +150,7 @@ public class ApiBeta {
           GSON.toJson(response, out);
         }
       } catch (IllegalAccessException | InvocationTargetException e) {
-        throw Throwables.propagate(e);
+        throw new RuntimeException(e);
       }
     }).build();
   }

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/http/api/GsonMessageBodyHandler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/http/api/GsonMessageBodyHandler.java
b/src/main/java/org/apache/aurora/scheduler/http/api/GsonMessageBodyHandler.java
index 1007a32..651e501 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/api/GsonMessageBodyHandler.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/api/GsonMessageBodyHandler.java
@@ -35,7 +35,6 @@ import javax.ws.rs.ext.MessageBodyReader;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
@@ -230,7 +229,7 @@ public class GsonMessageBodyHandler
 
                 throw new RuntimeException("Failed to deserialize " + typeOfT);
               } catch (NoSuchFieldException | IllegalAccessException | InstantiationException
e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
               }
             } else {
               throw new RuntimeException("Unable to deserialize " + typeOfT);

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/http/api/security/Kerberos5ShiroRealmModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/http/api/security/Kerberos5ShiroRealmModule.java
b/src/main/java/org/apache/aurora/scheduler/http/api/security/Kerberos5ShiroRealmModule.java
index 0f8bdbb..9c7aead 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/api/security/Kerberos5ShiroRealmModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/api/security/Kerberos5ShiroRealmModule.java
@@ -26,7 +26,6 @@ import javax.security.auth.login.LoginException;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Optional;
-import com.google.common.base.Throwables;
 import com.google.common.io.Files;
 import com.google.inject.AbstractModule;
 import com.google.inject.PrivateModule;
@@ -168,7 +167,7 @@ public class Kerberos5ShiroRealmModule extends AbstractModule {
                   new Oid[] {new Oid(GSS_SPNEGO_MECH_OID), new Oid(GSS_KRB5_MECH_OID)},
                   GSSCredential.ACCEPT_ONLY);
             } catch (GSSException e) {
-              throw Throwables.propagate(e);
+              throw new RuntimeException(e);
             }
           });
     } catch (LoginException e) {

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
b/src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
index 96b5a28..4987768 100644
--- a/src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/mesos/CommandLineDriverSettingsModule.java
@@ -23,7 +23,6 @@ import java.util.Properties;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import com.google.inject.AbstractModule;
 
 import org.apache.aurora.common.args.Arg;
@@ -136,7 +135,7 @@ public class CommandLineDriverSettingsModule extends AbstractModule {
         properties = parseCredentials(new FileInputStream(FRAMEWORK_AUTHENTICATION_FILE.get()));
       } catch (FileNotFoundException e) {
         LOG.error("Authentication File not Found");
-        throw Throwables.propagate(e);
+        throw new RuntimeException(e);
       }
 
       LOG.info(
@@ -194,7 +193,7 @@ public class CommandLineDriverSettingsModule extends AbstractModule {
       properties.load(credentialsStream);
     } catch (IOException e) {
       LOG.error("Unable to load authentication file");
-      throw Throwables.propagate(e);
+      throw new RuntimeException(e);
     }
     Preconditions.checkState(properties.containsKey(PRINCIPAL_KEY),
         "The framework authentication file is missing the key: %s", PRINCIPAL_KEY);

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/scheduling/TaskGroups.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/scheduling/TaskGroups.java b/src/main/java/org/apache/aurora/scheduler/scheduling/TaskGroups.java
index 77187bc..2cd2105 100644
--- a/src/main/java/org/apache/aurora/scheduler/scheduling/TaskGroups.java
+++ b/src/main/java/org/apache/aurora/scheduler/scheduling/TaskGroups.java
@@ -25,7 +25,6 @@ import javax.inject.Qualifier;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Maps;
@@ -168,7 +167,7 @@ public class TaskGroups implements EventSubscriber {
             scheduled = result.get();
           } catch (ExecutionException | InterruptedException e) {
             Thread.currentThread().interrupt();
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
           }
 
           if (scheduled.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/state/StateManagerImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/state/StateManagerImpl.java b/src/main/java/org/apache/aurora/scheduler/state/StateManagerImpl.java
index ffa9481..1c4a621 100644
--- a/src/main/java/org/apache/aurora/scheduler/state/StateManagerImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/state/StateManagerImpl.java
@@ -27,7 +27,6 @@ import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Supplier;
 import com.google.common.base.Suppliers;
-import com.google.common.base.Throwables;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
@@ -203,7 +202,7 @@ public class StateManagerImpl implements StateManager {
           return InetAddress.getLocalHost().getHostName();
         } catch (UnknownHostException e) {
           LOG.error("Failed to get self hostname.");
-          throw Throwables.propagate(e);
+          throw new RuntimeException(e);
         }
       });
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/storage/TaskStore.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/TaskStore.java b/src/main/java/org/apache/aurora/scheduler/storage/TaskStore.java
index 3be2993..1094a12 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/TaskStore.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/TaskStore.java
@@ -15,6 +15,7 @@ package org.apache.aurora.scheduler.storage;
 
 import java.util.Set;
 
+import com.google.common.base.CharMatcher;
 import com.google.common.base.Function;
 import com.google.common.base.Optional;
 import com.google.common.base.Predicate;
@@ -26,8 +27,6 @@ import org.apache.aurora.scheduler.storage.entities.IScheduledTask;
 import org.apache.aurora.scheduler.storage.entities.ITaskConfig;
 import org.apache.aurora.scheduler.storage.entities.ITaskQuery;
 
-import static com.google.common.base.CharMatcher.WHITESPACE;
-
 /**
  * Stores all tasks configured with the scheduler.
  */
@@ -128,7 +127,7 @@ public interface TaskStore {
         ITaskConfig config = task.getAssignedTask().getTask();
         // TODO(wfarner): Investigate why blank inputs are treated specially for the role
field.
         if (query.getRole() != null
-            && !WHITESPACE.matchesAllOf(query.getRole())
+            && !CharMatcher.whitespace().matchesAllOf(query.getRole())
             && !query.getRole().equals(config.getJob().getRole())) {
           return false;
         }

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/storage/db/MigrationManagerImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/db/MigrationManagerImpl.java
b/src/main/java/org/apache/aurora/scheduler/storage/db/MigrationManagerImpl.java
index ca11e59..f9b8c42 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/db/MigrationManagerImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/db/MigrationManagerImpl.java
@@ -21,7 +21,6 @@ import java.util.List;
 import javax.inject.Inject;
 
 import com.google.common.base.Charsets;
-import com.google.common.base.Throwables;
 import com.google.common.io.CharStreams;
 
 import org.apache.aurora.scheduler.storage.db.views.MigrationChangelogEntry;
@@ -128,7 +127,7 @@ public class MigrationManagerImpl implements MigrationManager {
 
         mapper.saveDowngradeScript(c.getId(), downgradeScript.getBytes(Charsets.UTF_8));
       } catch (IOException e) {
-        Throwables.propagate(e);
+        throw new RuntimeException(e);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/storage/log/EntrySerializer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/log/EntrySerializer.java b/src/main/java/org/apache/aurora/scheduler/storage/log/EntrySerializer.java
index dea2bda..90c5383 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/log/EntrySerializer.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/log/EntrySerializer.java
@@ -19,7 +19,6 @@ import java.util.Iterator;
 import javax.inject.Inject;
 
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Throwables;
 import com.google.common.collect.AbstractIterator;
 import com.google.common.collect.ImmutableList;
 import com.google.common.hash.HashFunction;
@@ -99,7 +98,7 @@ public interface EntrySerializer {
             try {
               result = encode(Frame.chunk(new FrameChunk(chunk)));
             } catch (CodingException e) {
-              throw Throwables.propagate(e);
+              throw new RuntimeException(e);
             }
           } else {
             return endOfData();

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java
b/src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java
index b9b3eb0..d2c8590 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java
@@ -31,7 +31,6 @@ import javax.sql.DataSource;
 
 import com.google.common.base.Joiner;
 import com.google.common.base.Optional;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Lists;
@@ -122,7 +121,7 @@ public class SnapshotStoreImpl implements SnapshotStore<Snapshot>
{
               }
             }
           } catch (SQLException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
           }
         }
 
@@ -145,13 +144,13 @@ public class SnapshotStoreImpl implements SnapshotStore<Snapshot>
{
                 }
               }
             } catch (SQLException e) {
-              Throwables.propagate(e);
+              throw new RuntimeException(e);
             }
 
             try {
               migrationManager.migrate();
             } catch (SQLException e) {
-              Throwables.propagate(e);
+              throw new RuntimeException(e);
             }
           }
         }

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/thrift/aop/LoggingInterceptor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/thrift/aop/LoggingInterceptor.java
b/src/main/java/org/apache/aurora/scheduler/thrift/aop/LoggingInterceptor.java
index d6fbc6a..3f11d8e 100644
--- a/src/main/java/org/apache/aurora/scheduler/thrift/aop/LoggingInterceptor.java
+++ b/src/main/java/org/apache/aurora/scheduler/thrift/aop/LoggingInterceptor.java
@@ -84,7 +84,7 @@ class LoggingInterceptor implements MethodInterceptor {
     } catch (RuntimeException e) {
       // We need shiro's exceptions to bubble up to the Shiro servlet filter so we intentionally
       // do not swallow them here.
-      Throwables.propagateIfInstanceOf(e, ShiroException.class);
+      Throwables.throwIfInstanceOf(e, ShiroException.class);
       LOG.warn("Uncaught exception while handling " + message, e);
       return Responses.addMessage(Responses.empty(), ResponseCode.ERROR, e);
     }

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java
b/src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java
index 25b3f37..2a92a5a 100644
--- a/src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java
@@ -23,7 +23,6 @@ import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Function;
 import com.google.common.base.Functions;
 import com.google.common.base.Optional;
-import com.google.common.base.Throwables;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
@@ -294,7 +293,7 @@ class JobUpdateControllerImpl implements JobUpdateController {
           try {
             changeJobUpdateStatus(storeProvider, key, newEvent(status), false);
           } catch (UpdateStateException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
           }
         }
       }
@@ -364,7 +363,7 @@ class JobUpdateControllerImpl implements JobUpdateController {
                 getOnlyMatch(storeProvider.getJobUpdateStore(), queryActiveByJob(job)),
                 ImmutableMap.of(instance.getInstanceId(), state));
           } catch (UpdateStateException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
           }
         } else {
           LOG.info("Instance " + instance + " is not part of active update for "
@@ -750,7 +749,7 @@ class JobUpdateControllerImpl implements JobUpdateController {
                           instance.getInstanceId())));
             } catch (UpdateStateException e) {
               LOG.error(String.format("Error running deferred evaluation for %s: %s", instance,
e));
-              Throwables.propagate(e);
+              throw new RuntimeException(e);
             }
           }
         }));

http://git-wip-us.apache.org/repos/asf/aurora/blob/85e24939/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java b/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java
index 7344051..3f44559 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java
@@ -15,6 +15,7 @@ package org.apache.aurora.scheduler.storage.log;
 
 import java.nio.ByteBuffer;
 import java.security.MessageDigest;
+import java.util.Collections;
 import java.util.Deque;
 import java.util.Iterator;
 import java.util.List;
@@ -109,7 +110,7 @@ public class LogManagerTest extends EasyMockTest {
 
   @Test
   public void testStreamManagerReadFromUnknownNone() throws CodingException {
-    expect(stream.readAll()).andReturn(Iterators.emptyIterator());
+    expect(stream.readAll()).andReturn(Collections.emptyIterator());
 
     Consumer<LogEntry> reader = createMock(new Clazz<Consumer<LogEntry>>()
{ });
 


Mime
View raw message