diff options
author | Harald Musum <musum@yahoo-inc.com> | 2017-11-22 11:04:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-22 11:04:22 +0100 |
commit | ba160b5f48616194aff36b5256bb16d440784769 (patch) | |
tree | 46b15b26fcbe769cc65d269f76d881f7818971dc /configserver/src/main | |
parent | 14d093023d5a664ef399919b467014b85633b61c (diff) |
Revert "Revert "Revert "Add support for downloading from another config server"""
Diffstat (limited to 'configserver/src/main')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java | 8 | ||||
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/rpc/RpcServer.java | 4 |
2 files changed, 2 insertions, 10 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java index 9dc94c9fe93..a504cd120ee 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java @@ -4,10 +4,7 @@ package com.yahoo.vespa.config.server.filedistribution; import com.google.inject.Inject; import com.yahoo.config.FileReference; import com.yahoo.config.model.api.FileDistribution; -import com.yahoo.config.subscription.ConfigSourceSet; import com.yahoo.io.IOUtils; -import com.yahoo.vespa.config.JRTConnectionPool; -import com.yahoo.vespa.filedistribution.FileDownloader; import java.io.File; import java.io.IOException; @@ -19,7 +16,6 @@ public class FileServer { private static final Logger log = Logger.getLogger(FileServer.class.getName()); private final FileDirectory root; private final ExecutorService executor; - private final FileDownloader downloader = new FileDownloader(new JRTConnectionPool(ConfigSourceSet.createDefault())); public static class ReplayStatus { private final int code; @@ -90,8 +86,4 @@ public class FileServer { // TODO remove once verified in system tests. log.info("Done serving reference '" + reference.toString() + "' with file '" + file.getAbsolutePath() + "'"); } - - public void download(FileReference fileReference) { - downloader.getFile(fileReference); - } } diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/rpc/RpcServer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/rpc/RpcServer.java index d17cdf722ea..7c5adb3b932 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/rpc/RpcServer.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/rpc/RpcServer.java @@ -21,6 +21,7 @@ import com.yahoo.jrt.StringValue; import com.yahoo.jrt.Supervisor; import com.yahoo.jrt.Target; import com.yahoo.jrt.Transport; +import com.yahoo.jrt.Value; import com.yahoo.log.LogLevel; import com.yahoo.vespa.config.ErrorCode; import com.yahoo.vespa.config.JRTMethods; @@ -248,6 +249,7 @@ public class RpcServer implements Runnable, ReloadListener, TenantListener { } for (int i = 0; i < responsesSent; i++) { + try { completionService.take(); } catch (InterruptedException e) { @@ -467,8 +469,6 @@ public class RpcServer implements Runnable, ReloadListener, TenantListener { : FileApiErrorCodes.NOT_FOUND; if (result == FileApiErrorCodes.OK) { fileServer.startFileServing(fileReference, new FileReceiver(request.target())); - } else { - fileServer.download(new FileReference(fileReference)); } } catch (IllegalArgumentException e) { result = FileApiErrorCodes.NOT_FOUND; |