summaryrefslogtreecommitdiffstats
path: root/filedistribution
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-10-15 07:39:49 +0200
committerGitHub <noreply@github.com>2020-10-15 07:39:49 +0200
commit63097163bfe4f2868ee936c7e14fbf505e6ff242 (patch)
tree827263dce595e96ace811bbd45de30139c7f33e1 /filedistribution
parentf07e7cde693a73d99d6d3d27dc3aa65e44d1958b (diff)
Revert "Log more when downloading file fails"
Diffstat (limited to 'filedistribution')
-rw-r--r--filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java4
-rw-r--r--filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownload.java16
2 files changed, 5 insertions, 15 deletions
diff --git a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java
index 7470ac0952d..f7b951e89d8 100644
--- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java
+++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java
@@ -5,7 +5,6 @@ import com.yahoo.config.FileReference;
import java.util.logging.Level;
import com.yahoo.vespa.config.ConnectionPool;
import com.yahoo.vespa.defaults.Defaults;
-import com.yahoo.yolean.Exceptions;
import java.io.File;
import java.time.Duration;
@@ -56,8 +55,7 @@ public class FileDownloader implements AutoCloseable {
try {
return getFutureFile(fileReferenceDownload).get(timeout.toMillis(), TimeUnit.MILLISECONDS);
} catch (InterruptedException | ExecutionException | TimeoutException e) {
- log.log(Level.WARNING, "Failed downloading '" + fileReferenceDownload +
- "', removing from download queue: " + Exceptions.toMessageString(e));
+ log.log(Level.WARNING, "Failed downloading '" + fileReferenceDownload.fileReference().value() + "', removing from download queue: " + e.getMessage());
fileReferenceDownloader.failedDownloading(fileReferenceDownload.fileReference());
return Optional.empty();
}
diff --git a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownload.java b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownload.java
index 31e6eb5daab..fe501484faf 100644
--- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownload.java
+++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownload.java
@@ -1,4 +1,4 @@
-// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.filedistribution;
@@ -15,17 +15,15 @@ public class FileReferenceDownload {
// If a config server wants to download from another config server (because it does not have the
// file itself) we set this flag to true to avoid an eternal loop
private final boolean downloadFromOtherSourceIfNotFound;
- private final String client;
public FileReferenceDownload(FileReference fileReference) {
- this(fileReference, true, "unknown");
+ this(fileReference, true);
}
- public FileReferenceDownload(FileReference fileReference, boolean downloadFromOtherSourceIfNotFound, String client) {
+ public FileReferenceDownload(FileReference fileReference, boolean downloadFromOtherSourceIfNotFound) {
this.fileReference = fileReference;
this.future = new CompletableFuture<>();
this.downloadFromOtherSourceIfNotFound = downloadFromOtherSourceIfNotFound;
- this.client = client;
}
FileReference fileReference() {
@@ -36,13 +34,7 @@ public class FileReferenceDownload {
return future;
}
- public boolean downloadFromOtherSourceIfNotFound() {
+ boolean downloadFromOtherSourceIfNotFound() {
return downloadFromOtherSourceIfNotFound;
}
-
- @Override
- public String toString() {
- return fileReference + ", client: " + client;
- }
-
}