You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by wf...@apache.org on 2017/10/23 15:01:56 UTC
aurora git commit: Update to guava 23.2
Repository: aurora
Updated Branches:
refs/heads/master dbe9a52a0 -> 063df5f7c
Update to guava 23.2
Reviewed at https://reviews.apache.org/r/63204/
Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/063df5f7
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/063df5f7
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/063df5f7
Branch: refs/heads/master
Commit: 063df5f7c9dc9345b693f0fe9e5782036ef25c60
Parents: dbe9a52
Author: Bill Farner <wf...@apache.org>
Authored: Mon Oct 23 08:01:50 2017 -0700
Committer: Bill Farner <wf...@apache.org>
Committed: Mon Oct 23 08:01:50 2017 -0700
----------------------------------------------------------------------
build.gradle | 5 +++--
src/main/java/org/apache/aurora/scheduler/TierModule.java | 2 +-
.../java/org/apache/aurora/scheduler/events/WebhookModule.java | 2 +-
.../scheduler/http/api/security/Kerberos5ShiroRealmModule.java | 2 +-
.../apache/aurora/scheduler/storage/log/LogStorageModule.java | 4 +++-
src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java | 5 +++--
.../apache/aurora/scheduler/events/PubsubEventModuleTest.java | 2 +-
.../org/apache/aurora/scheduler/http/AbstractJettyTest.java | 4 ++--
.../org/apache/aurora/scheduler/http/LeaderRedirectTest.java | 2 +-
.../org/apache/aurora/scheduler/http/ServletFilterTest.java | 2 +-
.../aurora/scheduler/http/api/security/HttpSecurityIT.java | 2 +-
.../apache/aurora/scheduler/reconciliation/KillRetryTest.java | 2 +-
.../aurora/scheduler/scheduling/TaskSchedulerImplTest.java | 2 +-
.../org/apache/aurora/scheduler/state/TaskStateMachineTest.java | 3 ++-
14 files changed, 22 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index fbe5bb1..01622cc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -78,9 +78,9 @@ For more details, please see https://issues.apache.org/jira/browse/AURORA-1169
}
ext.commonsLangRev = '2.6'
- ext.curatorRev = '2.11.1'
+ ext.curatorRev = '2.12.0'
ext.gsonRev = '2.3.1'
- ext.guavaRev = '20.0'
+ ext.guavaRev = '23.2-jre'
ext.guiceRev = '3.0'
ext.asyncHttpclientRev = '2.0.37'
ext.jacksonRev = '2.5.1'
@@ -112,6 +112,7 @@ For more details, please see https://issues.apache.org/jira/browse/AURORA-1169
failOnVersionConflict()
force "com.fasterxml.jackson.core:jackson-annotations:${jacksonRev}"
force "com.fasterxml.jackson.core:jackson-core:${jacksonRev}"
+ force "com.google.code.findbugs:jsr305:${jsrRev}"
force "com.google.code.gson:gson:${gsonRev}"
force "com.google.guava:guava:${guavaRev}"
force "com.google.protobuf:protobuf-java:${protobufRev}"
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/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 4244103..1fe09d2 100644
--- a/src/main/java/org/apache/aurora/scheduler/TierModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/TierModule.java
@@ -77,7 +77,7 @@ public class TierModule extends AbstractModule {
? Resources.toString(
TierModule.class.getClassLoader().getResource(TIER_CONFIG_PATH),
StandardCharsets.UTF_8)
- : Files.toString(tierConfig, StandardCharsets.UTF_8);
+ : Files.asCharSource(tierConfig, StandardCharsets.UTF_8).read();
} catch (IOException e) {
LOG.error("Error loading tier configuration file.");
throw new RuntimeException(e);
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/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 8e13341..b0a9081 100644
--- a/src/main/java/org/apache/aurora/scheduler/events/WebhookModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/events/WebhookModule.java
@@ -63,7 +63,7 @@ public class WebhookModule extends AbstractModule {
this.webhookConfig = Optional.fromNullable(options.webhookConfigFile)
.transform(f -> {
try {
- return Files.toString(options.webhookConfigFile, StandardCharsets.UTF_8);
+ return Files.asCharSource(options.webhookConfigFile, StandardCharsets.UTF_8).read();
} catch (IOException e) {
throw new RuntimeException(e);
}
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/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 4a03798..8da06a0 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
@@ -149,7 +149,7 @@ public class Kerberos5ShiroRealmModule extends AbstractModule {
try {
jaasConfFile = File.createTempFile("jaas", "conf");
jaasConfFile.deleteOnExit();
- Files.write(jaasConf, jaasConfFile, StandardCharsets.UTF_8);
+ Files.asCharSink(jaasConfFile, StandardCharsets.UTF_8).write(jaasConf);
} catch (IOException e) {
addError(e);
return;
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/src/main/java/org/apache/aurora/scheduler/storage/log/LogStorageModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/log/LogStorageModule.java b/src/main/java/org/apache/aurora/scheduler/storage/log/LogStorageModule.java
index 6fdf31d..63150d0 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/log/LogStorageModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/log/LogStorageModule.java
@@ -106,7 +106,9 @@ public class LogStorageModule extends PrivateModule {
bind(EntrySerializer.class).to(EntrySerializerImpl.class);
// TODO(ksweeney): We don't need a cryptographic checksum here - assess performance of MD5
// versus a faster error-detection checksum like CRC32 for large Snapshots.
- bind(HashFunction.class).annotatedWith(LogEntryHashFunction.class).toInstance(Hashing.md5());
+ @SuppressWarnings("deprecation")
+ HashFunction hashFunction = Hashing.md5();
+ bind(HashFunction.class).annotatedWith(LogEntryHashFunction.class).toInstance(hashFunction);
bind(SnapshotDeduplicator.class).to(SnapshotDeduplicatorImpl.class);
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java b/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
index 8e3c1de..efbc42c 100644
--- a/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
+++ b/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
@@ -291,9 +291,10 @@ public class SchedulerIT extends BaseZooKeeperTest {
private Iterable<Entry> toEntries(LogEntry... entries) {
return Iterables.transform(Arrays.asList(entries),
- entry -> () -> {
+ entry -> {
try {
- return Iterables.getFirst(entrySerializer.serialize(entry), null);
+ byte[] data = Iterables.getFirst(entrySerializer.serialize(entry), null);
+ return (Entry) () -> data;
} catch (CodingException e) {
throw Throwables.propagate(e);
}
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/src/test/java/org/apache/aurora/scheduler/events/PubsubEventModuleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/events/PubsubEventModuleTest.java b/src/test/java/org/apache/aurora/scheduler/events/PubsubEventModuleTest.java
index 692adeb..90c0b86 100644
--- a/src/test/java/org/apache/aurora/scheduler/events/PubsubEventModuleTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/events/PubsubEventModuleTest.java
@@ -104,7 +104,7 @@ public class PubsubEventModuleTest extends EasyMockTest {
@Override
protected void configure() {
bind(Executor.class).annotatedWith(AsyncExecutor.class)
- .toInstance(MoreExecutors.sameThreadExecutor());
+ .toInstance(MoreExecutors.directExecutor());
bind(UncaughtExceptionHandler.class).toInstance(exceptionHandler);
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/src/test/java/org/apache/aurora/scheduler/http/AbstractJettyTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/http/AbstractJettyTest.java b/src/test/java/org/apache/aurora/scheduler/http/AbstractJettyTest.java
index 6e77857..f3ae5a5 100644
--- a/src/test/java/org/apache/aurora/scheduler/http/AbstractJettyTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/http/AbstractJettyTest.java
@@ -174,11 +174,11 @@ public abstract class AbstractJettyTest extends EasyMockTest {
httpServer = injector.getInstance(HttpService.class).getAddress();
// By default we'll set this instance to be the leader.
- setLeadingScheduler(httpServer.getHostText(), httpServer.getPort());
+ setLeadingScheduler(httpServer.getHost(), httpServer.getPort());
}
protected String makeUrl(String path) {
- return String.format("http://%s:%s%s", httpServer.getHostText(), httpServer.getPort(), path);
+ return String.format("http://%s:%s%s", httpServer.getHost(), httpServer.getPort(), path);
}
protected WebResource.Builder getPlainRequestBuilder(String path) {
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/src/test/java/org/apache/aurora/scheduler/http/LeaderRedirectTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/http/LeaderRedirectTest.java b/src/test/java/org/apache/aurora/scheduler/http/LeaderRedirectTest.java
index a16058f..a7cc046 100644
--- a/src/test/java/org/apache/aurora/scheduler/http/LeaderRedirectTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/http/LeaderRedirectTest.java
@@ -43,7 +43,7 @@ public class LeaderRedirectTest extends EasyMockTest {
private static final Function<HostAndPort, ServiceInstance> CREATE_INSTANCE =
endpoint -> new ServiceInstance()
- .setServiceEndpoint(new Endpoint(endpoint.getHostText(), endpoint.getPort()));
+ .setServiceEndpoint(new Endpoint(endpoint.getHost(), endpoint.getPort()));
private AtomicReference<ImmutableSet<ServiceInstance>> schedulers;
private ServiceGroupMonitor serviceGroupMonitor;
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/src/test/java/org/apache/aurora/scheduler/http/ServletFilterTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/http/ServletFilterTest.java b/src/test/java/org/apache/aurora/scheduler/http/ServletFilterTest.java
index 1a5cd01..f57ddd0 100644
--- a/src/test/java/org/apache/aurora/scheduler/http/ServletFilterTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/http/ServletFilterTest.java
@@ -117,7 +117,7 @@ public class ServletFilterTest extends AbstractJettyTest {
LeaderRedirectFilter.NO_LEADER_PAGE)));
// This process is leading
- setLeadingScheduler(httpServer.getHostText(), httpServer.getPort());
+ setLeadingScheduler(httpServer.getHost(), httpServer.getPort());
leaderRedirectSmokeTest(Status.OK, Optional.absent());
setLeadingScheduler("otherHost", 1234);
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/src/test/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityIT.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityIT.java b/src/test/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityIT.java
index 86bcab2..be91940 100644
--- a/src/test/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityIT.java
+++ b/src/test/java/org/apache/aurora/scheduler/http/api/security/HttpSecurityIT.java
@@ -177,7 +177,7 @@ public class HttpSecurityIT extends AbstractJettyTest {
}
private String formatUrl(String endpoint) {
- return "http://" + httpServer.getHostText() + ":" + httpServer.getPort() + endpoint;
+ return "http://" + httpServer.getHost() + ":" + httpServer.getPort() + endpoint;
}
private AuroraAdmin.Client getClient(HttpClient httpClient) throws TTransportException {
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/src/test/java/org/apache/aurora/scheduler/reconciliation/KillRetryTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/reconciliation/KillRetryTest.java b/src/test/java/org/apache/aurora/scheduler/reconciliation/KillRetryTest.java
index a561d09..8fd501b 100644
--- a/src/test/java/org/apache/aurora/scheduler/reconciliation/KillRetryTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/reconciliation/KillRetryTest.java
@@ -89,7 +89,7 @@ public class KillRetryTest extends EasyMockTest {
bind(UncaughtExceptionHandler.class)
.toInstance(createMock(UncaughtExceptionHandler.class));
bind(Executor.class).annotatedWith(AsyncExecutor.class)
- .toInstance(MoreExecutors.sameThreadExecutor());
+ .toInstance(MoreExecutors.directExecutor());
}
}
);
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerImplTest.java b/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerImplTest.java
index 09f443b..af6bdff 100644
--- a/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerImplTest.java
@@ -109,7 +109,7 @@ public class TaskSchedulerImplTest extends EasyMockTest {
protected void configure() {
bind(Executor.class).annotatedWith(AsyncExecutor.class)
- .toInstance(MoreExecutors.sameThreadExecutor());
+ .toInstance(MoreExecutors.directExecutor());
bind(new TypeLiteral<BiCache<String, TaskGroupKey>>() { }).toInstance(reservations);
bind(TaskScheduler.class).to(TaskSchedulerImpl.class);
bind(Preemptor.class).toInstance(preemptor);
http://git-wip-us.apache.org/repos/asf/aurora/blob/063df5f7/src/test/java/org/apache/aurora/scheduler/state/TaskStateMachineTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/state/TaskStateMachineTest.java b/src/test/java/org/apache/aurora/scheduler/state/TaskStateMachineTest.java
index c519323..8d6c3ff 100644
--- a/src/test/java/org/apache/aurora/scheduler/state/TaskStateMachineTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/state/TaskStateMachineTest.java
@@ -18,6 +18,7 @@ import java.util.Objects;
import java.util.Set;
import com.google.common.base.Function;
+import com.google.common.base.MoreObjects;
import com.google.common.base.Optional;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableList;
@@ -382,7 +383,7 @@ public class TaskStateMachineTest {
@Override
public String toString() {
- return com.google.common.base.Objects.toStringHelper(this)
+ return MoreObjects.toStringHelper(this)
.add("taskPresent", taskPresent)
.add("from", from)
.add("to", to)