summaryrefslogtreecommitdiffstats
path: root/config-model/src
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2018-09-20 12:24:04 +0200
committergjoranv <gv@oath.com>2019-01-21 15:09:22 +0100
commit7b58424ddd4cdf0c2e963cd89bac83dcf8566381 (patch)
treea0d1c4b7f8fecbc9d999ce8417e78b40bdc6f7bd /config-model/src
parentb940326231702e8a07dc7e2d3fb5da440bf171cf (diff)
Track removal of fileHandler.rotateSchema from access-log.def
Diffstat (limited to 'config-model/src')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java23
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java5
-rw-r--r--config-model/src/test/derived/importedfields/imported-fields.cfg10
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessLogTest.java2
4 files changed, 1 insertions, 39 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java b/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java
index d9cb43c1850..009aa454ab3 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java
@@ -8,8 +8,6 @@ import com.yahoo.container.logging.JSONAccessLog;
import com.yahoo.osgi.provider.model.ComponentModel;
import edu.umd.cs.findbugs.annotations.Nullable;
-import static com.yahoo.container.core.AccessLogConfig.FileHandler.RotateScheme;
-
/**
* @author Tony Vaagenes
* @author gjoranv
@@ -20,7 +18,6 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL
private final String fileNamePattern;
private final String rotationInterval;
- private final RotateScheme.Enum rotationScheme;
private final Boolean compression;
private final boolean isHostedVespa;
private final String symlinkName;
@@ -29,7 +26,7 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL
{
this(logType,
String.format("logs/vespa/qrs/%s.%s.%s", capitalize(logType.name()), clusterName, "%Y%m%d%H%M%S"),
- null, null, null, isHostedVespa,
+ null, null, isHostedVespa,
capitalize(logType.name()) + "." + clusterName);
}
@@ -40,7 +37,6 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL
public AccessLogComponent(AccessLogType logType,
String fileNamePattern,
String rotationInterval,
- RotateScheme.Enum rotationScheme,
Boolean compressOnRotation,
boolean isHostedVespa,
String symlinkName)
@@ -48,7 +44,6 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL
super(new ComponentModel(accessLogClass(logType), null, "container-core", null));
this.fileNamePattern = fileNamePattern;
this.rotationInterval = rotationInterval;
- this.rotationScheme = rotationScheme;
this.compression = compressOnRotation;
this.isHostedVespa = isHostedVespa;
this.symlinkName = symlinkName;
@@ -81,8 +76,6 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL
builder.pattern(fileNamePattern);
if (rotationInterval != null)
builder.rotation(rotationInterval);
- if (rotationScheme != null)
- builder.rotateScheme(rotationScheme);
if (symlinkName != null)
builder.symlink(symlinkName);
if (compression != null) {
@@ -97,18 +90,4 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL
public String getFileNamePattern() {
return fileNamePattern;
}
-
- public static final RotateScheme.Enum rotateScheme(@Nullable String name) {
- if (name == null)
- return null;
-
- switch (name) {
- case "date":
- return RotateScheme.Enum.DATE;
- case "sequence":
- return RotateScheme.Enum.SEQUENCE;
- default:
- throw new IllegalArgumentException("Invalid rotation scheme " + name);
- }
- }
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java
index ddea1a189bc..ee70032724e 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java
@@ -59,7 +59,6 @@ public class AccessLogBuilder {
accessLogType,
fileNamePattern(spec),
rotationInterval(spec),
- rotationScheme(spec),
compressOnRotation(spec),
isHostedVespa,
symlinkName(spec));
@@ -74,10 +73,6 @@ public class AccessLogBuilder {
return (compress.isEmpty() ? null : Boolean.parseBoolean(compress));
}
- private AccessLogConfig.FileHandler.RotateScheme.Enum rotationScheme(Element spec) {
- return AccessLogComponent.rotateScheme(nullIfEmpty(spec.getAttribute("rotationScheme")));
- }
-
private String rotationInterval(Element spec) {
return nullIfEmpty(spec.getAttribute("rotationInterval"));
}
diff --git a/config-model/src/test/derived/importedfields/imported-fields.cfg b/config-model/src/test/derived/importedfields/imported-fields.cfg
index d1895d02290..c8de7d4fb7e 100644
--- a/config-model/src/test/derived/importedfields/imported-fields.cfg
+++ b/config-model/src/test/derived/importedfields/imported-fields.cfg
@@ -1,25 +1,15 @@
attribute[].name "my_int_field"
attribute[].referencefield "a_ref"
attribute[].targetfield "int_field"
-attribute[].datatype NONE
-attribute[].collectiontype SINGLE
attribute[].name "my_string_field"
attribute[].referencefield "b_ref"
attribute[].targetfield "string_field"
-attribute[].datatype NONE
-attribute[].collectiontype SINGLE
attribute[].name "my_int_array_field"
attribute[].referencefield "a_ref"
attribute[].targetfield "int_array_field"
-attribute[].datatype NONE
-attribute[].collectiontype SINGLE
attribute[].name "my_int_wset_field"
attribute[].referencefield "a_ref"
attribute[].targetfield "int_wset_field"
-attribute[].datatype NONE
-attribute[].collectiontype SINGLE
attribute[].name "my_ancient_int_field"
attribute[].referencefield "a_ref"
attribute[].targetfield "ancient_int_field"
-attribute[].datatype NONE
-attribute[].collectiontype SINGLE
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessLogTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessLogTest.java
index a4a8eef74dd..817d9a943e0 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessLogTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessLogTest.java
@@ -85,7 +85,6 @@ public class AccessLogTest extends ContainerModelBuilderTestBase {
AccessLogConfig.FileHandler fileHandlerConfig = config.fileHandler();
assertEquals("pattern", fileHandlerConfig.pattern());
assertEquals("interval", fileHandlerConfig.rotation());
- assertEquals(AccessLogConfig.FileHandler.RotateScheme.DATE, fileHandlerConfig.rotateScheme());
}
{ // json
@@ -96,7 +95,6 @@ public class AccessLogTest extends ContainerModelBuilderTestBase {
AccessLogConfig.FileHandler fileHandlerConfig = config.fileHandler();
assertEquals("pattern", fileHandlerConfig.pattern());
assertEquals("interval", fileHandlerConfig.rotation());
- assertEquals(AccessLogConfig.FileHandler.RotateScheme.DATE, fileHandlerConfig.rotateScheme());
}
}