summaryrefslogtreecommitdiffstats
path: root/config-proxy
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 /config-proxy
parent4e6825b47270804a36e7d76b873ca6c2fe360eac (diff)
LogLevel.DEBUG -> Level.FINE
Diffstat (limited to 'config-proxy')
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java12
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCache.java6
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCacheConfigClient.java4
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ProxyServer.java2
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java20
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UpstreamConfigSubscriber.java2
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/CachedFilesMaintainer.java2
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionRpcServer.java6
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/UrlDownloadRpcServer.java2
9 files changed, 28 insertions, 28 deletions
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java
index e27c26bd248..c8b16f5376a 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java
@@ -50,7 +50,7 @@ public class ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer
public void run() {
try {
Acceptor acceptor = supervisor.listen(spec);
- log.log(LogLevel.DEBUG, "Ready for requests on " + spec);
+ log.log(Level.FINE, "Ready for requests on " + spec);
supervisor.transport().join();
acceptor.shutdown().join();
} catch (ListenFailedException e) {
@@ -270,7 +270,7 @@ public class ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer
*/
private void getConfigImpl(JRTServerConfigRequest request) {
request.getRequestTrace().trace(TRACELEVEL, "Config proxy getConfig()");
- log.log(LogLevel.DEBUG, () ->"getConfig: " + request.getShortDescription() + ",configmd5=" + request.getRequestConfigMd5());
+ log.log(Level.FINE, () ->"getConfig: " + request.getShortDescription() + ",configmd5=" + request.getRequestConfigMd5());
if (!request.validateParameters()) {
// Error code is set in verifyParameters if parameters are not OK.
log.log(LogLevel.WARNING, "Parameters for request " + request + " did not validate: " + request.errorCode() + " : " + request.errorMessage());
@@ -335,12 +335,12 @@ public class ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer
*/
@Override
public void notifyTargetInvalid(Target target) {
- log.log(LogLevel.DEBUG, () -> "Target invalid " + target);
+ log.log(Level.FINE, () -> "Target invalid " + target);
for (Iterator<DelayedResponse> it = proxyServer.delayedResponses().responses().iterator(); it.hasNext(); ) {
DelayedResponse delayed = it.next();
JRTServerConfigRequest request = delayed.getRequest();
if (request.getRequest().target().equals(target)) {
- log.log(LogLevel.DEBUG, () -> "Removing " + request.getShortDescription());
+ log.log(Level.FINE, () -> "Removing " + request.getShortDescription());
it.remove();
}
}
@@ -351,7 +351,7 @@ public class ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer
public void returnOkResponse(JRTServerConfigRequest request, RawConfig config) {
request.getRequestTrace().trace(TRACELEVEL, "Config proxy returnOkResponse()");
request.addOkResponse(config.getPayload(), config.getGeneration(), config.isInternalRedeploy(), config.getConfigMd5());
- log.log(LogLevel.DEBUG, () -> "Return response: " + request.getShortDescription() + ",configMd5=" + config.getConfigMd5() +
+ log.log(Level.FINE, () -> "Return response: " + request.getShortDescription() + ",configMd5=" + config.getConfigMd5() +
",generation=" + config.getGeneration());
log.log(LogLevel.SPAM, () -> "Config payload in response for " + request.getShortDescription() + ":" + config.getPayload());
@@ -361,7 +361,7 @@ public class ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer
try {
request.getRequest().returnRequest();
} catch (IllegalStateException e) {
- log.log(LogLevel.DEBUG, () -> "Something bad happened when sending response for '" + request.getShortDescription() + "':" + e.getMessage());
+ log.log(Level.FINE, () -> "Something bad happened when sending response for '" + request.getShortDescription() + "':" + e.getMessage());
}
}
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCache.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCache.java
index e10289733df..50f8ad26bf0 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCache.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCache.java
@@ -50,7 +50,7 @@ public class MemoryCache {
return;
}
- log.log(LogLevel.DEBUG, () -> "Putting '" + config + "' into memory cache");
+ log.log(Level.FINE, () -> "Putting '" + config + "' into memory cache");
cache.put(new ConfigCacheKey(config.getKey(), config.getDefMd5()), config);
}
@@ -114,11 +114,11 @@ public class MemoryCache {
try {
filename = path + File.separator + createCacheFileName(config);
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "Writing '" + config.getKey() + "' to '" + filename + "'");
+ log.log(Level.FINE, "Writing '" + config.getKey() + "' to '" + filename + "'");
}
final Payload payload = config.getPayload();
long protocolVersion = 3;
- log.log(LogLevel.DEBUG, "Writing config '" + config + "' to file '" + filename + "' with protocol version " + protocolVersion);
+ log.log(Level.FINE, "Writing config '" + config + "' to file '" + filename + "' with protocol version " + protocolVersion);
writer = IOUtils.createWriter(filename, "UTF-8", false);
// First three lines are meta-data about config as comment lines, fourth line is empty
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCacheConfigClient.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCacheConfigClient.java
index 16b80f8d31e..df0b274f32b 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCacheConfigClient.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCacheConfigClient.java
@@ -32,11 +32,11 @@ class MemoryCacheConfigClient implements ConfigSourceClient {
*/
@Override
public RawConfig getConfig(RawConfig input, JRTServerConfigRequest request) {
- log.log(LogLevel.DEBUG, () -> "Getting config from cache");
+ log.log(Level.FINE, () -> "Getting config from cache");
ConfigKey<?> key = input.getKey();
RawConfig cached = cache.get(new ConfigCacheKey(key, input.getDefMd5()));
if (cached != null) {
- log.log(LogLevel.DEBUG, () -> "Found config " + key + " in cache");
+ log.log(Level.FINE, () -> "Found config " + key + " in cache");
return cached;
} else {
return null;
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ProxyServer.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ProxyServer.java
index ddc0c0d8320..1ebf3106a94 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ProxyServer.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ProxyServer.java
@@ -48,7 +48,7 @@ public class ProxyServer implements Runnable {
ProxyServer(Spec spec, ConfigSourceSet source, MemoryCache memoryCache, ConfigSourceClient configClient) {
this.configSource = source;
- log.log(LogLevel.DEBUG, "Using config source '" + source);
+ log.log(Level.FINE, "Using config source '" + source);
this.memoryCache = memoryCache;
this.rpcServer = createRpcServer(spec);
this.configClient = (configClient == null) ? createRpcClient(rpcServer, source, memoryCache) : configClient;
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
index ddf3bc4d9ce..d37408f97b3 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
@@ -92,7 +92,7 @@ class RpcConfigSourceClient implements ConfigSourceClient {
Target target = supervisor.connect(spec);
target.invokeSync(req, 30.0);
if (target.isValid()) {
- log.log(LogLevel.DEBUG, () -> "Created connection to config source at " + spec.toString());
+ log.log(Level.FINE, () -> "Created connection to config source at " + spec.toString());
return;
} else {
log.log(LogLevel.INFO, "Could not connect to config source at " + spec.toString());
@@ -132,7 +132,7 @@ class RpcConfigSourceClient implements ConfigSourceClient {
RawConfig ret = null;
if (cachedConfig != null) {
- log.log(LogLevel.DEBUG, () -> "Found config " + configCacheKey + " in cache, generation=" + cachedConfig.getGeneration() +
+ log.log(Level.FINE, () -> "Found config " + configCacheKey + " in cache, generation=" + cachedConfig.getGeneration() +
",configmd5=" + cachedConfig.getConfigMd5());
log.log(LogLevel.SPAM, () -> "input config=" + input + ",cached config=" + cachedConfig);
if (ProxyServer.configOrGenerationHasChanged(cachedConfig, request)) {
@@ -155,9 +155,9 @@ class RpcConfigSourceClient implements ConfigSourceClient {
private void subscribeToConfig(RawConfig input, ConfigCacheKey configCacheKey) {
synchronized (activeSubscribersLock) {
if (activeSubscribers.containsKey(configCacheKey)) {
- log.log(LogLevel.DEBUG, () -> "Already a subscriber running for: " + configCacheKey);
+ log.log(Level.FINE, () -> "Already a subscriber running for: " + configCacheKey);
} else {
- log.log(LogLevel.DEBUG, () -> "Could not find good config in cache, creating subscriber for: " + configCacheKey);
+ log.log(Level.FINE, () -> "Could not find good config in cache, creating subscriber for: " + configCacheKey);
UpstreamConfigSubscriber subscriber =
new UpstreamConfigSubscriber(input, this, configSourceSet, timingValues, requester, memoryCache);
try {
@@ -215,14 +215,14 @@ class RpcConfigSourceClient implements ConfigSourceClient {
* @param config new config
*/
public void updateSubscribers(RawConfig config) {
- log.log(LogLevel.DEBUG, () -> "Config updated for " + config.getKey() + "," + config.getGeneration());
+ log.log(Level.FINE, () -> "Config updated for " + config.getKey() + "," + config.getGeneration());
DelayQueue<DelayedResponse> responseDelayQueue = delayedResponses.responses();
log.log(LogLevel.SPAM, () -> "Delayed response queue: " + responseDelayQueue);
if (responseDelayQueue.size() == 0) {
- log.log(LogLevel.DEBUG, () -> "There exists no matching element on delayed response queue for " + config.getKey());
+ log.log(Level.FINE, () -> "There exists no matching element on delayed response queue for " + config.getKey());
return;
} else {
- log.log(LogLevel.DEBUG, () -> "Delayed response queue has " + responseDelayQueue.size() + " elements");
+ log.log(Level.FINE, () -> "Delayed response queue has " + responseDelayQueue.size() + " elements");
}
boolean found = false;
for (DelayedResponse response : responseDelayQueue.toArray(new DelayedResponse[0])) {
@@ -232,7 +232,7 @@ class RpcConfigSourceClient implements ConfigSourceClient {
&& (config.getGeneration() >= request.getRequestGeneration() || config.getGeneration() == 0)) {
if (delayedResponses.remove(response)) {
found = true;
- log.log(LogLevel.DEBUG, () -> "Call returnOkResponse for " + config.getKey() + "," + config.getGeneration());
+ log.log(Level.FINE, () -> "Call returnOkResponse for " + config.getKey() + "," + config.getGeneration());
rpcServer.returnOkResponse(request, config);
} else {
log.log(LogLevel.INFO, "Could not remove " + config.getKey() + " from delayedResponses queue, already removed");
@@ -240,9 +240,9 @@ class RpcConfigSourceClient implements ConfigSourceClient {
}
}
if (!found) {
- log.log(LogLevel.DEBUG, () -> "Found no recipient for " + config.getKey() + " in delayed response queue");
+ log.log(Level.FINE, () -> "Found no recipient for " + config.getKey() + " in delayed response queue");
}
- log.log(LogLevel.DEBUG, () -> "Finished updating config for " + config.getKey() + "," + config.getGeneration());
+ log.log(Level.FINE, () -> "Finished updating config for " + config.getKey() + "," + config.getGeneration());
}
@Override
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UpstreamConfigSubscriber.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UpstreamConfigSubscriber.java
index c7567c45c27..14d93ee046e 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UpstreamConfigSubscriber.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UpstreamConfigSubscriber.java
@@ -65,7 +65,7 @@ public class UpstreamConfigSubscriber implements Subscriber {
private void updateWithNewConfig(GenericConfigHandle handle) {
RawConfig newConfig = handle.getRawConfig();
- log.log(LogLevel.DEBUG, () -> "config to be returned for '" + newConfig.getKey() +
+ log.log(Level.FINE, () -> "config to be returned for '" + newConfig.getKey() +
"', generation=" + newConfig.getGeneration() +
", payload=" + newConfig.getPayload());
memoryCache.update(newConfig);
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/CachedFilesMaintainer.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/CachedFilesMaintainer.java
index c2daa6e739b..146a5e644ef 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/CachedFilesMaintainer.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/CachedFilesMaintainer.java
@@ -63,7 +63,7 @@ class CachedFilesMaintainer implements Runnable {
File[] files = directory.listFiles();
if (files != null)
filesOnDisk.addAll(Arrays.stream(files).map(File::getName).collect(Collectors.toSet()));
- log.log(LogLevel.DEBUG, "Files on disk (in " + directory + "): " + filesOnDisk);
+ log.log(Level.FINE, "Files on disk (in " + directory + "): " + filesOnDisk);
Set<String> filesToDelete = filesOnDisk
.stream()
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionRpcServer.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionRpcServer.java
index 6f5b125cc1e..3b8a882963c 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionRpcServer.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionRpcServer.java
@@ -106,7 +106,7 @@ class FileDistributionRpcServer {
}
private void setFileReferencesToDownload(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());
Arrays.stream(req.parameters().get(0).asStringArray())
.map(FileReference::new)
.forEach(fileReference -> downloader.downloadIfNeeded(new FileReferenceDownload(fileReference)));
@@ -115,12 +115,12 @@ class FileDistributionRpcServer {
private void downloadFile(Request req) {
FileReference fileReference = new FileReference(req.parameters().get(0).asString());
- log.log(LogLevel.DEBUG, () -> "getFile() called for file reference '" + fileReference.value() + "'");
+ log.log(Level.FINE, () -> "getFile() called for file reference '" + fileReference.value() + "'");
Optional<File> file = downloader.getFile(fileReference);
if (file.isPresent()) {
new RequestTracker().trackRequest(file.get().getParentFile());
req.returnValues().add(new StringValue(file.get().getAbsolutePath()));
- log.log(LogLevel.DEBUG, () -> "File reference '" + fileReference.value() + "' available at " + file.get());
+ log.log(Level.FINE, () -> "File reference '" + fileReference.value() + "' available at " + file.get());
} else {
log.log(LogLevel.INFO, "File reference '" + fileReference.value() + "' not found, returning error");
req.setError(fileReferenceDoesNotExists, "File reference '" + fileReference.value() + "' not found");
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/UrlDownloadRpcServer.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/UrlDownloadRpcServer.java
index 970e4da5511..74393ca07f9 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/UrlDownloadRpcServer.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/UrlDownloadRpcServer.java
@@ -111,7 +111,7 @@ class UrlDownloadRpcServer {
writeLastModifiedTimestamp(downloadDir, connection.getLastModified());
new RequestTracker().trackRequest(downloadDir);
req.returnValues().add(new StringValue(contentsPath.getAbsolutePath()));
- log.log(LogLevel.DEBUG, () -> "URL '" + url + "' available at " + contentsPath);
+ log.log(Level.FINE, () -> "URL '" + url + "' available at " + contentsPath);
log.log(LogLevel.INFO, String.format("Download of URL '%s' done in %.3f seconds",
url, (System.currentTimeMillis() -start) / 1000.0));
} else {