summaryrefslogtreecommitdiffstats
path: root/config/src/main/java
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-03-11 18:18:30 +0100
committerHarald Musum <musum@verizonmedia.com>2020-03-11 18:18:30 +0100
commit5ce79371860589a5a0c8971eb25ee21564376c27 (patch)
tree6727bfb8dc7a82bab81118e45b78586fa4650158 /config/src/main/java
parentacb7410c1109426844bb4a4b2fb8c05abec7ec2f (diff)
Simplify code, as there exists only one config protocol version
Diffstat (limited to 'config/src/main/java')
-rw-r--r--config/src/main/java/com/yahoo/vespa/config/benchmark/LoadTester.java11
-rw-r--r--config/src/main/java/com/yahoo/vespa/config/protocol/JRTConfigRequestFactory.java15
2 files changed, 3 insertions, 23 deletions
diff --git a/config/src/main/java/com/yahoo/vespa/config/benchmark/LoadTester.java b/config/src/main/java/com/yahoo/vespa/config/benchmark/LoadTester.java
index dcaa71dda25..f20371d203c 100644
--- a/config/src/main/java/com/yahoo/vespa/config/benchmark/LoadTester.java
+++ b/config/src/main/java/com/yahoo/vespa/config/benchmark/LoadTester.java
@@ -47,7 +47,6 @@ public class LoadTester {
protected Supervisor supervisor = new Supervisor(transport);
private List<ConfigKey<?>> configs = new ArrayList<>();
private Map<ConfigDefinitionKey, Tuple2<String, String[]>> defs = new HashMap<>();
- private long protocolVersion = Long.parseLong(JRTConfigRequestFactory.getProtocolVersion());
private CompressionType compressionType = JRTConfigRequestFactory.getCompressionType();
/**
@@ -261,13 +260,9 @@ public class LoadTester {
private JRTClientConfigRequest getRequest(ConfigKey<?> reqKey, String[] defContent) {
if (defContent == null) defContent = new String[0];
final long serverTimeout = 1000;
- if (protocolVersion == 3) {
- return JRTClientConfigRequestV3.createWithParams(reqKey, DefContent.fromList(Arrays.asList(defContent)),
- "unknown", "", 0, serverTimeout, Trace.createDummy(),
- compressionType, Optional.empty());
- } else {
- throw new RuntimeException("Unsupported protocol version" + protocolVersion);
- }
+ return JRTClientConfigRequestV3.createWithParams(reqKey, DefContent.fromList(Arrays.asList(defContent)),
+ "unknown", "", 0, serverTimeout, Trace.createDummy(),
+ compressionType, Optional.empty());
}
private Target connect(Spec spec) {
diff --git a/config/src/main/java/com/yahoo/vespa/config/protocol/JRTConfigRequestFactory.java b/config/src/main/java/com/yahoo/vespa/config/protocol/JRTConfigRequestFactory.java
index 60c6aa6e54d..b6277f750dc 100644
--- a/config/src/main/java/com/yahoo/vespa/config/protocol/JRTConfigRequestFactory.java
+++ b/config/src/main/java/com/yahoo/vespa/config/protocol/JRTConfigRequestFactory.java
@@ -6,9 +6,7 @@ import com.yahoo.config.subscription.impl.JRTConfigSubscription;
import com.yahoo.vespa.config.RawConfig;
import com.yahoo.vespa.config.util.ConfigUtils;
-import java.util.Collections;
import java.util.Optional;
-import java.util.Set;
/**
* To hide JRT implementations.
@@ -17,7 +15,6 @@ import java.util.Set;
*/
public class JRTConfigRequestFactory {
- public static final String VESPA_CONFIG_PROTOCOL_VERSION = "VESPA_CONFIG_PROTOCOL_VERSION"; // Unused, but should be used if we add a new version
private static final CompressionType compressionType = getCompressionType();
private static final String VESPA_CONFIG_PROTOCOL_COMPRESSION = "VESPA_CONFIG_PROTOCOL_COMPRESSION";
@@ -31,18 +28,6 @@ public class JRTConfigRequestFactory {
return JRTClientConfigRequestV3.createFromRaw(config, serverTimeout, Trace.createNew(), compressionType, getVespaVersion());
}
- public static String getProtocolVersion() {
- return "3";
- }
-
- static String getProtocolVersion(String env, String alternateEnv, String property) {
- return ConfigUtils.getEnvValue("3", env, alternateEnv, property);
- }
-
- public static Set<Long> supportedProtocolVersions() {
- return Collections.singleton(3L);
- }
-
public static CompressionType getCompressionType() {
return getCompressionType(System.getenv(VESPA_CONFIG_PROTOCOL_COMPRESSION),
System.getenv("services__config_protocol_compression"),