summaryrefslogtreecommitdiffstats
path: root/filedistribution
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2020-04-24 13:12:46 +0200
committergjoranv <gv@verizonmedia.com>2020-04-25 02:22:55 +0200
commit25f832e613bb6087327c293b527d5445babb4319 (patch)
tree8197a5b331e845bfe91f006d9cfe8bec9a28170f /filedistribution
parent4e6825b47270804a36e7d76b873ca6c2fe360eac (diff)
LogLevel.DEBUG -> Level.FINE
Diffstat (limited to 'filedistribution')
-rw-r--r--filedistribution/src/main/java/com/yahoo/vespa/filedistribution/CompressedFileReference.java6
-rw-r--r--filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java2
-rw-r--r--filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReceiver.java10
-rw-r--r--filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java4
4 files changed, 11 insertions, 11 deletions
diff --git a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/CompressedFileReference.java b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/CompressedFileReference.java
index 5ea4092e0c6..66b713ac6ba 100644
--- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/CompressedFileReference.java
+++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/CompressedFileReference.java
@@ -63,7 +63,7 @@ public class CompressedFileReference {
}
static void decompress(File inputFile, File outputDir) throws IOException {
- log.log(LogLevel.DEBUG, () -> "Decompressing '" + inputFile + "' into '" + outputDir + "'");
+ log.log(Level.FINE, () -> "Decompressing '" + inputFile + "' into '" + outputDir + "'");
try (ArchiveInputStream ais = new TarArchiveInputStream(new GZIPInputStream(new FileInputStream(inputFile)))) {
decompress(ais, outputDir);
} catch (IllegalArgumentException e) {
@@ -78,7 +78,7 @@ public class CompressedFileReference {
File outFile = new File(outputFile, entry.getName());
if (entry.isDirectory()) {
if (!(outFile.exists() && outFile.isDirectory())) {
- log.log(LogLevel.DEBUG, () -> "Creating dir: " + outFile.getAbsolutePath());
+ log.log(Level.FINE, () -> "Creating dir: " + outFile.getAbsolutePath());
if (!outFile.mkdirs()) {
log.log(LogLevel.WARNING, "Could not create dir " + entry.getName());
}
@@ -113,7 +113,7 @@ public class CompressedFileReference {
}
private static void writeFileToTar(ArchiveOutputStream taos, File baseDir, File file) throws IOException {
- log.log(LogLevel.DEBUG, () -> "Adding file to tar: " + baseDir.toPath().relativize(file.toPath()).toString());
+ log.log(Level.FINE, () -> "Adding file to tar: " + baseDir.toPath().relativize(file.toPath()).toString());
taos.putArchiveEntry(taos.createArchiveEntry(file, baseDir.toPath().relativize(file.toPath()).toString()));
ByteStreams.copy(new FileInputStream(file), taos);
taos.closeArchiveEntry();
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 57281d4a84b..cb3a3caf2d4 100644
--- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java
+++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java
@@ -89,7 +89,7 @@ public class FileDownloader {
} else if (!file.canRead()) {
throw new RuntimeException("File reference '" + fileReference.value() + "'exists, but unable to read it");
} else {
- log.log(LogLevel.DEBUG, () -> "File reference '" + fileReference.value() + "' found: " + file.getAbsolutePath());
+ log.log(Level.FINE, () -> "File reference '" + fileReference.value() + "' found: " + file.getAbsolutePath());
fileReferenceDownloader.setDownloadStatus(fileReference, 1.0);
return Optional.of(file);
}
diff --git a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReceiver.java b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReceiver.java
index 0228ad0a5a2..a79f3831c17 100644
--- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReceiver.java
+++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReceiver.java
@@ -123,7 +123,7 @@ public class FileReceiver {
log.log(LogLevel.ERROR, "Failed creating directory (" + fileReferenceDir.toPath() + "): " + e.getMessage(), e);
throw new RuntimeException("Failed creating directory (" + fileReferenceDir.toPath() + "): ", e);
}
- log.log(LogLevel.DEBUG, () -> "Uncompressed file, moving to " + file.getAbsolutePath());
+ log.log(Level.FINE, () -> "Uncompressed file, moving to " + file.getAbsolutePath());
moveFileToDestination(inprogressFile, file);
}
} catch (IOException e) {
@@ -188,7 +188,7 @@ public class FileReceiver {
private static void moveFileToDestination(File tempFile, File destination) {
try {
Files.move(tempFile.toPath(), destination.toPath());
- log.log(LogLevel.DEBUG, () -> "File moved from " + tempFile.getAbsolutePath()+ " to " + destination.getAbsolutePath());
+ log.log(Level.FINE, () -> "File moved from " + tempFile.getAbsolutePath()+ " to " + destination.getAbsolutePath());
} catch (FileAlreadyExistsException e) {
// Don't fail if it already exists (we might get the file from several config servers when retrying, servers are down etc.
// so it might be written already). Delete temp file/dir in that case, to avoid filling the disk.
@@ -215,7 +215,7 @@ public class FileReceiver {
}
private void receiveFileMeta(Request req) {
- log.log(LogLevel.DEBUG, () -> "Received method call '" + req.methodName() + "' with parameters : " + req.parameters());
+ log.log(Level.FINE, () -> "Received method call '" + req.methodName() + "' with parameters : " + req.parameters());
FileReference reference = new FileReference(req.parameters().get(0).asString());
String fileName = req.parameters().get(1).asString();
String type = req.parameters().get(2).asString();
@@ -240,7 +240,7 @@ public class FileReceiver {
}
private void receiveFilePart(Request req) {
- log.log(LogLevel.DEBUG, () -> "Received method call '" + req.methodName() + "' with parameters : " + req.parameters());
+ log.log(Level.FINE, () -> "Received method call '" + req.methodName() + "' with parameters : " + req.parameters());
FileReference reference = new FileReference(req.parameters().get(0).asString());
int sessionId = req.parameters().get(1).asInt32();
@@ -261,7 +261,7 @@ public class FileReceiver {
}
private void receiveFileEof(Request req) {
- log.log(LogLevel.DEBUG, () -> "Received method call '" + req.methodName() + "' with parameters : " + req.parameters());
+ log.log(Level.FINE, () -> "Received method call '" + req.methodName() + "' with parameters : " + req.parameters());
FileReference reference = new FileReference(req.parameters().get(0).asString());
int sessionId = req.parameters().get(1).asInt32();
long xxhash = req.parameters().get(2).asInt64();
diff --git a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java
index 4a3c474a436..35f8636c0f9 100644
--- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java
+++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java
@@ -81,7 +81,7 @@ public class FileReferenceDownloader {
void addToDownloadQueue(FileReferenceDownload fileReferenceDownload) {
FileReference fileReference = fileReferenceDownload.fileReference();
- log.log(LogLevel.DEBUG, () -> "Will download file reference '" + fileReference.value() + "' with timeout " + downloadTimeout);
+ log.log(Level.FINE, () -> "Will download file reference '" + fileReference.value() + "' with timeout " + downloadTimeout);
synchronized (downloads) {
downloads.put(fileReference, fileReferenceDownload);
downloadStatus.put(fileReference, 0.0);
@@ -97,7 +97,7 @@ public class FileReferenceDownloader {
downloads.remove(fileReference);
download.future().complete(Optional.of(file));
} else {
- log.log(LogLevel.DEBUG, () -> "Received '" + fileReference + "', which was not requested. Can be ignored if happening during upgrades/restarts");
+ log.log(Level.FINE, () -> "Received '" + fileReference + "', which was not requested. Can be ignored if happening during upgrades/restarts");
}
}
}