summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2020-09-14 11:41:25 +0000
committerTor Brede Vekterli <vekterli@verizonmedia.com>2020-09-14 13:22:15 +0000
commit0817a6890194989a2f243e54d671252bee2f8920 (patch)
treec2a76c26c61ec9d26d0f1567cdff70a7df5ba28f /config-model/src/main/java/com
parent77e3fa9d8df495f48fa282e4f82f26743c8078de (diff)
Add feature flag to use direct RPC for Storage API communication between distributor and content node.
Diffstat (limited to 'config-model/src/main/java/com')
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java7
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java3
2 files changed, 10 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
index fc799449379..22bdf31350a 100644
--- a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
+++ b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
@@ -37,6 +37,7 @@ public class TestProperties implements ModelContext.Properties {
private boolean useDedicatedNodeForLogserver = false;
private boolean useContentNodeBtreeDb = false;
private boolean useThreePhaseUpdates = false;
+ private boolean useDirectStorageApiRpc = false;
private double defaultTermwiseLimit = 1.0;
private double threadPoolSizeFactor = 0.0;
private double queueSizeFactor = 0.0;
@@ -73,6 +74,7 @@ public class TestProperties implements ModelContext.Properties {
}
@Override public boolean useContentNodeBtreeDb() { return useContentNodeBtreeDb; }
@Override public boolean useThreePhaseUpdates() { return useThreePhaseUpdates; }
+ @Override public boolean useDirectStorageApiRpc() { return useDirectStorageApiRpc; }
@Override public Optional<AthenzDomain> athenzDomain() { return Optional.ofNullable(athenzDomain); }
@Override public Optional<ApplicationRoles> applicationRoles() { return Optional.ofNullable(applicationRoles); }
@Override public String responseSequencerType() { return responseSequencerType; }
@@ -113,6 +115,11 @@ public class TestProperties implements ModelContext.Properties {
return this;
}
+ public TestProperties setUseDirectStorageApiRpc(boolean useDirectStorageApiRpc) {
+ this.useDirectStorageApiRpc = useDirectStorageApiRpc;
+ return this;
+ }
+
public TestProperties setThreadPoolSizeFactor(double threadPoolSizeFactor) {
this.threadPoolSizeFactor = threadPoolSizeFactor;
return this;
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
index f2e90ae2859..34b6dd017cf 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
@@ -27,6 +27,7 @@ public abstract class ContentNode extends AbstractService
private final boolean skipCommunicationManagerThread;
private final boolean skipMbusRequestThread;
private final boolean skipMbusReplyThread;
+ private final boolean useDirectStorageApiRpc;
public ContentNode(ModelContext.Properties properties, AbstractConfigProducer parent, String clusterName, String rootDirectory, int distributionKey) {
super(parent, "" + distributionKey);
@@ -35,6 +36,7 @@ public abstract class ContentNode extends AbstractService
this.skipMbusRequestThread = properties.skipMbusRequestThread();
this.skipMbusReplyThread = properties.skipMbusReplyThread();
this.rootDirectory = rootDirectory;
+ this.useDirectStorageApiRpc = properties.useDirectStorageApiRpc();
initialize();
setProp("clustertype", "content");
@@ -81,6 +83,7 @@ public abstract class ContentNode extends AbstractService
builder.skip_thread(skipCommunicationManagerThread);
builder.mbus.skip_request_thread(skipMbusRequestThread);
builder.mbus.skip_reply_thread(skipMbusReplyThread);
+ builder.use_direct_storageapi_rpc(useDirectStorageApiRpc);
}
@Override