This is an automated email from the ASF dual-hosted git repository.
frankgh pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-sidecar.git
The following commit(s) were added to refs/heads/trunk by this push:
new 453107f9 CASSANDRASC-147: Expose vert.x filesystem options
configuration (#138)
453107f9 is described below
commit 453107f9a0a7c00b21299f426fb24dda82d735eb
Author: Francisco Guerrero <[email protected]>
AuthorDate: Wed Oct 9 15:45:42 2024 -0700
CASSANDRASC-147: Expose vert.x filesystem options configuration (#138)
By default, vert.x will attempt to resolve files from the application
classpath
when it is unable to find them in the local filesystem. Additionally, by
default
vert.x will cache any files that it reads from the classpath into the local
filesystem.
For Sidecar, this optimization is unnecessary as Sidecar doesn't package
anything
in the classpath that might be used while running the application.
In this commit, we disable this optimization by default, but expose
configuration
options to tune these options on need-basis.
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-147
---
.circleci/config.yml | 2 +-
server/src/main/dist/conf/sidecar.yaml | 5 ++
.../config/FileSystemOptionsConfiguration.java | 55 +++++++++++++
.../sidecar/config/SidecarConfiguration.java | 7 ++
.../sidecar/config/VertxConfiguration.java | 32 ++++++++
.../yaml/FileSystemOptionsConfigurationImpl.java | 93 ++++++++++++++++++++++
.../config/yaml/SidecarConfigurationImpl.java | 31 ++++++++
.../config/yaml/VertxConfigurationImpl.java | 52 ++++++++++++
.../cassandra/sidecar/server/MainModule.java | 20 ++++-
.../sidecar/config/SidecarConfigurationTest.java | 29 +++++++
.../config/sidecar_multiple_instances.yaml | 5 ++
....yaml => sidecar_vertx_filesystem_options.yaml} | 90 +++++++--------------
12 files changed, 355 insertions(+), 66 deletions(-)
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 473cda3e..9bf5b711 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -26,7 +26,7 @@ version: 2.1
aliases:
base_job: &base_job
machine:
- image: ubuntu-2004:202010-01
+ image: ubuntu-2204:edge
working_directory: ~/repo
environment:
TERM: dumb
diff --git a/server/src/main/dist/conf/sidecar.yaml
b/server/src/main/dist/conf/sidecar.yaml
index 76b8d0bb..1e35b733 100644
--- a/server/src/main/dist/conf/sidecar.yaml
+++ b/server/src/main/dist/conf/sidecar.yaml
@@ -110,6 +110,11 @@ sidecar:
replication_strategy: SimpleStrategy
replication_factor: 1
+vertx:
+ filesystem_options:
+ classpath_resolving_enabled: false
+ file_caching_enabled: false
+
#
# Enable SSL configuration (Disabled by default)
#
diff --git
a/server/src/main/java/org/apache/cassandra/sidecar/config/FileSystemOptionsConfiguration.java
b/server/src/main/java/org/apache/cassandra/sidecar/config/FileSystemOptionsConfiguration.java
new file mode 100644
index 00000000..e0877ebb
--- /dev/null
+++
b/server/src/main/java/org/apache/cassandra/sidecar/config/FileSystemOptionsConfiguration.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.sidecar.config;
+
+import io.vertx.core.file.FileSystemOptions;
+
+/**
+ * Exposes configuration in Sidecar for vert.x {@link FileSystemOptions}
+ */
+public interface FileSystemOptionsConfiguration
+{
+ /**
+ * When vert.x cannot find the file on the filesystem it tries to resolve
the
+ * file from the classpath when this is set to {@code true}. Otherwise,
vert.x
+ * will not attempt to resolve the file on the classpath
+ *
+ * @return {@code true} if classpath resolving is enabled, {@code false}
otherwise.
+ */
+ boolean classpathResolvingEnabled();
+
+ /**
+ * When vert.x reads a file that is packaged with the application it gets
+ * extracted to this directory first and subsequent reads will use the
extracted
+ * file to get better IO performance.
+ *
+ * @return the configured file cache dir
+ */
+ String fileCacheDir();
+
+ /**
+ * Returns {@code true} to enable caching files on the real file system
+ * when the filesystem performs class path resolving. {@code false} to
+ * disable caching.
+ *
+ * @return {@code true} when caching files on the underlying file system
is enabled
+ * {@code false} otherwise
+ */
+ boolean fileCachingEnabled();
+}
diff --git
a/server/src/main/java/org/apache/cassandra/sidecar/config/SidecarConfiguration.java
b/server/src/main/java/org/apache/cassandra/sidecar/config/SidecarConfiguration.java
index e9a84370..6140372f 100644
---
a/server/src/main/java/org/apache/cassandra/sidecar/config/SidecarConfiguration.java
+++
b/server/src/main/java/org/apache/cassandra/sidecar/config/SidecarConfiguration.java
@@ -20,6 +20,8 @@ package org.apache.cassandra.sidecar.config;
import java.util.List;
+import org.jetbrains.annotations.Nullable;
+
/**
* Configuration for this Sidecar process
*/
@@ -75,4 +77,9 @@ public interface SidecarConfiguration
* @return the configuration for Amazon S3 client
*/
S3ClientConfiguration s3ClientConfiguration();
+
+ /**
+ * @return the configuration for vert.x
+ */
+ @Nullable VertxConfiguration vertxConfiguration();
}
diff --git
a/server/src/main/java/org/apache/cassandra/sidecar/config/VertxConfiguration.java
b/server/src/main/java/org/apache/cassandra/sidecar/config/VertxConfiguration.java
new file mode 100644
index 00000000..7f4e8588
--- /dev/null
+++
b/server/src/main/java/org/apache/cassandra/sidecar/config/VertxConfiguration.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.sidecar.config;
+
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Encapsulates vert.x configuration
+ */
+public interface VertxConfiguration
+{
+ /**
+ * @return vert.x file system configuration
+ */
+ @Nullable FileSystemOptionsConfiguration filesystemOptionsConfiguration();
+}
diff --git
a/server/src/main/java/org/apache/cassandra/sidecar/config/yaml/FileSystemOptionsConfigurationImpl.java
b/server/src/main/java/org/apache/cassandra/sidecar/config/yaml/FileSystemOptionsConfigurationImpl.java
new file mode 100644
index 00000000..978b4fac
--- /dev/null
+++
b/server/src/main/java/org/apache/cassandra/sidecar/config/yaml/FileSystemOptionsConfigurationImpl.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.sidecar.config.yaml;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.vertx.core.file.FileSystemOptions;
+import org.apache.cassandra.sidecar.config.FileSystemOptionsConfiguration;
+
+/**
+ * Encapsulates configuration needed for vert.x {@link
io.vertx.core.file.FileSystemOptions}
+ */
+public class FileSystemOptionsConfigurationImpl implements
FileSystemOptionsConfiguration
+{
+ @JsonProperty(value = "classpath_resolving_enabled")
+ private final boolean classpathResolvingEnabled;
+
+ private String fileCacheDir;
+
+ @JsonProperty(value = "file_caching_enabled")
+ private final boolean fileCachingEnabled;
+
+ public static final boolean DEFAULT_CLASSPATH_RESOLVING_ENABLED = false;
+ public static final boolean DEFAULT_FILE_CACHING_ENABLED = false;
+
+ public FileSystemOptionsConfigurationImpl()
+ {
+ this(DEFAULT_CLASSPATH_RESOLVING_ENABLED,
+ FileSystemOptions.DEFAULT_FILE_CACHING_DIR,
+ DEFAULT_FILE_CACHING_ENABLED);
+ }
+
+ public FileSystemOptionsConfigurationImpl(boolean
classpathResolvingEnabled,
+ String fileCacheDir,
+ boolean fileCachingEnabled)
+ {
+
+ this.classpathResolvingEnabled = classpathResolvingEnabled;
+ this.fileCachingEnabled = fileCachingEnabled;
+ setFileCacheDir(fileCacheDir);
+ }
+
+ @Override
+ @JsonProperty(value = "classpath_resolving_enabled")
+ public boolean classpathResolvingEnabled()
+ {
+ return classpathResolvingEnabled;
+ }
+
+ @Override
+ @JsonProperty(value = "file_cache_dir")
+ public String fileCacheDir()
+ {
+ return fileCacheDir;
+ }
+
+ @JsonProperty(value = "file_cache_dir")
+ public void setFileCacheDir(String fileCacheDir)
+ {
+ if (fileCacheDir == null || fileCacheDir.isEmpty())
+ {
+ // Honor vert.x's default configuration when the fileCacheDir
+ // is not configured
+ this.fileCacheDir = FileSystemOptions.DEFAULT_FILE_CACHING_DIR;
+ }
+ else
+ {
+ this.fileCacheDir = fileCacheDir;
+ }
+ }
+
+ @Override
+ @JsonProperty(value = "file_caching_enabled")
+ public boolean fileCachingEnabled()
+ {
+ return fileCachingEnabled;
+ }
+}
diff --git
a/server/src/main/java/org/apache/cassandra/sidecar/config/yaml/SidecarConfigurationImpl.java
b/server/src/main/java/org/apache/cassandra/sidecar/config/yaml/SidecarConfigurationImpl.java
index cd8971d7..3ca4dad8 100644
---
a/server/src/main/java/org/apache/cassandra/sidecar/config/yaml/SidecarConfigurationImpl.java
+++
b/server/src/main/java/org/apache/cassandra/sidecar/config/yaml/SidecarConfigurationImpl.java
@@ -48,6 +48,8 @@ import
org.apache.cassandra.sidecar.config.S3ClientConfiguration;
import org.apache.cassandra.sidecar.config.ServiceConfiguration;
import org.apache.cassandra.sidecar.config.SidecarConfiguration;
import org.apache.cassandra.sidecar.config.SslConfiguration;
+import org.apache.cassandra.sidecar.config.VertxConfiguration;
+import org.jetbrains.annotations.Nullable;
/**
* Configuration for this Sidecar process
@@ -85,6 +87,10 @@ public class SidecarConfigurationImpl implements
SidecarConfiguration
@JsonProperty("s3_client")
protected final S3ClientConfiguration s3ClientConfiguration;
+ @JsonProperty("vertx")
+ @Nullable
+ protected final VertxConfiguration vertxConfiguration;
+
public SidecarConfigurationImpl()
{
this(builder());
@@ -102,6 +108,7 @@ public class SidecarConfigurationImpl implements
SidecarConfiguration
driverConfiguration = builder.driverConfiguration;
restoreJobConfiguration = builder.restoreJobConfiguration;
s3ClientConfiguration = builder.s3ClientConfiguration;
+ vertxConfiguration = builder.vertxConfiguration;
}
/**
@@ -211,6 +218,17 @@ public class SidecarConfigurationImpl implements
SidecarConfiguration
return s3ClientConfiguration;
}
+ /**
+ * @return the configuration for vert.x
+ */
+ @Override
+ @JsonProperty("vertx")
+ @Nullable
+ public VertxConfiguration vertxConfiguration()
+ {
+ return vertxConfiguration;
+ }
+
public static SidecarConfigurationImpl readYamlConfiguration(String
yamlConfigurationPath) throws IOException
{
try
@@ -311,6 +329,7 @@ public class SidecarConfigurationImpl implements
SidecarConfiguration
private DriverConfiguration driverConfiguration = new
DriverConfigurationImpl();
private RestoreJobConfiguration restoreJobConfiguration = new
RestoreJobConfigurationImpl();
private S3ClientConfiguration s3ClientConfiguration = new
S3ClientConfigurationImpl();
+ private VertxConfiguration vertxConfiguration = new
VertxConfigurationImpl();
protected Builder()
{
@@ -436,6 +455,18 @@ public class SidecarConfigurationImpl implements
SidecarConfiguration
return update(b -> b.s3ClientConfiguration = configuration);
}
+ /**
+ * Sets the {@code vertxConfiguration} and returns a reference to this
Builder enabling
+ * method chaining.
+ *
+ * @param configuration the {@code vertxConfiguration} to set
+ * @return a reference to this Builder
+ */
+ public Builder vertxConfiguration(VertxConfiguration configuration)
+ {
+ return update(b -> b.vertxConfiguration = configuration);
+ }
+
/**
* Returns a {@code SidecarConfigurationImpl} built from the
parameters previously set.
*
diff --git
a/server/src/main/java/org/apache/cassandra/sidecar/config/yaml/VertxConfigurationImpl.java
b/server/src/main/java/org/apache/cassandra/sidecar/config/yaml/VertxConfigurationImpl.java
new file mode 100644
index 00000000..ba38922c
--- /dev/null
+++
b/server/src/main/java/org/apache/cassandra/sidecar/config/yaml/VertxConfigurationImpl.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.sidecar.config.yaml;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.cassandra.sidecar.config.FileSystemOptionsConfiguration;
+import org.apache.cassandra.sidecar.config.VertxConfiguration;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Configuration for vert.x internals
+ */
+public class VertxConfigurationImpl implements VertxConfiguration
+{
+ @JsonProperty("filesystem_options")
+ @Nullable
+ private final FileSystemOptionsConfiguration
filesystemOptionsConfiguration;
+
+ public VertxConfigurationImpl()
+ {
+ this(new FileSystemOptionsConfigurationImpl());
+ }
+
+ public VertxConfigurationImpl(@Nullable FileSystemOptionsConfiguration
filesystemOptionsConfiguration)
+ {
+ this.filesystemOptionsConfiguration = filesystemOptionsConfiguration;
+ }
+
+ @Override
+ @JsonProperty("filesystem_options")
+ @Nullable
+ public FileSystemOptionsConfiguration filesystemOptionsConfiguration()
+ {
+ return filesystemOptionsConfiguration;
+ }
+}
diff --git
a/server/src/main/java/org/apache/cassandra/sidecar/server/MainModule.java
b/server/src/main/java/org/apache/cassandra/sidecar/server/MainModule.java
index 0c574529..095e910a 100644
--- a/server/src/main/java/org/apache/cassandra/sidecar/server/MainModule.java
+++ b/server/src/main/java/org/apache/cassandra/sidecar/server/MainModule.java
@@ -38,6 +38,7 @@ import com.google.inject.name.Named;
import io.netty.handler.codec.http.HttpResponseStatus;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
+import io.vertx.core.file.FileSystemOptions;
import io.vertx.ext.dropwizard.DropwizardMetricsOptions;
import io.vertx.ext.dropwizard.Match;
import io.vertx.ext.dropwizard.MatchType;
@@ -65,10 +66,12 @@ import
org.apache.cassandra.sidecar.common.server.utils.DriverUtils;
import org.apache.cassandra.sidecar.common.server.utils.SidecarVersionProvider;
import org.apache.cassandra.sidecar.concurrent.ExecutorPools;
import
org.apache.cassandra.sidecar.config.CassandraInputValidationConfiguration;
+import org.apache.cassandra.sidecar.config.FileSystemOptionsConfiguration;
import org.apache.cassandra.sidecar.config.InstanceConfiguration;
import org.apache.cassandra.sidecar.config.JmxConfiguration;
import org.apache.cassandra.sidecar.config.ServiceConfiguration;
import org.apache.cassandra.sidecar.config.SidecarConfiguration;
+import org.apache.cassandra.sidecar.config.VertxConfiguration;
import org.apache.cassandra.sidecar.config.VertxMetricsConfiguration;
import org.apache.cassandra.sidecar.config.yaml.SidecarConfigurationImpl;
import org.apache.cassandra.sidecar.db.schema.RestoreJobsSchema;
@@ -162,7 +165,20 @@ public class MainModule extends AbstractModule
// Monitor all V1 endpoints.
// Additional filtering is done by
configuring yaml fields 'metrics.include|exclude'
.addMonitoredHttpServerRoute(serverRouteMatch);
- return Vertx.vertx(new
VertxOptions().setMetricsOptions(dropwizardMetricsOptions));
+
+ VertxOptions vertxOptions = new
VertxOptions().setMetricsOptions(dropwizardMetricsOptions);
+ VertxConfiguration vertxConfiguration =
sidecarConfiguration.vertxConfiguration();
+ FileSystemOptionsConfiguration fsOptions = vertxConfiguration != null
? vertxConfiguration.filesystemOptionsConfiguration() : null;
+
+ if (fsOptions != null)
+ {
+ vertxOptions.setFileSystemOptions(new FileSystemOptions()
+
.setClassPathResolvingEnabled(fsOptions.classpathResolvingEnabled())
+
.setFileCacheDir(fsOptions.fileCacheDir())
+
.setFileCachingEnabled(fsOptions.fileCachingEnabled()));
+ }
+
+ return Vertx.vertx(vertxOptions);
}
@Provides
@@ -510,7 +526,7 @@ public class MainModule extends AbstractModule
return new RestoreRangesSchema(configuration.serviceConfiguration()
.schemaKeyspaceConfiguration(),
configuration.restoreJobConfiguration()
-
.restoreJobTablesTtlSeconds());
+
.restoreJobTablesTtlSeconds());
}
@Provides
diff --git
a/server/src/test/java/org/apache/cassandra/sidecar/config/SidecarConfigurationTest.java
b/server/src/test/java/org/apache/cassandra/sidecar/config/SidecarConfigurationTest.java
index ad8daae0..cbc7cbcd 100644
---
a/server/src/test/java/org/apache/cassandra/sidecar/config/SidecarConfigurationTest.java
+++
b/server/src/test/java/org/apache/cassandra/sidecar/config/SidecarConfigurationTest.java
@@ -274,6 +274,22 @@ class SidecarConfigurationTest
assertThat(pattern.matcher("throttled_429")).matches();
}
+ @Test
+ void testVertxFilesystemOptionsConfiguration() throws IOException
+ {
+ Path yamlPath = yaml("config/sidecar_vertx_filesystem_options.yaml");
+ SidecarConfigurationImpl sidecarConfiguration =
SidecarConfigurationImpl.readYamlConfiguration(yamlPath);
+ assertThat(sidecarConfiguration).isNotNull();
+ assertThat(sidecarConfiguration.serviceConfiguration()).isNotNull();
+ VertxConfiguration vertxConfiguration =
sidecarConfiguration.vertxConfiguration();
+ assertThat(vertxConfiguration).isNotNull();
+ FileSystemOptionsConfiguration vertxFsOptions =
vertxConfiguration.filesystemOptionsConfiguration();
+ assertThat(vertxFsOptions).isNotNull();
+ assertThat(vertxFsOptions.fileCachingEnabled()).isTrue();
+
assertThat(vertxFsOptions.fileCacheDir()).isEqualTo("/path/to/vertx/cache");
+ assertThat(vertxFsOptions.classpathResolvingEnabled()).isTrue();
+ }
+
void validateSingleInstanceSidecarConfiguration(SidecarConfiguration
config)
{
assertThat(config.cassandraInstances()).isNotNull().hasSize(1);
@@ -308,6 +324,11 @@ class SidecarConfigurationTest
// cassandra input validation configuration
validateCassandraInputValidationConfigurationFromYaml(config.cassandraInputValidationConfiguration());
+
+ // vertx FileSystemOptions
+ VertxConfiguration vertxConfiguration = config.vertxConfiguration();
+ assertThat(vertxConfiguration).isNotNull();
+
validateVertxFilesystemOptionsClasspathResolvingDisabled(vertxConfiguration.filesystemOptionsConfiguration());
}
void validateMultipleInstancesSidecarConfiguration(SidecarConfiguration
config, boolean withSslConfiguration)
@@ -439,6 +460,14 @@ class SidecarConfigurationTest
assertThat(config.allowedPatternForRestrictedComponentName()).isEqualTo("[a-zA-Z0-9_-]+(.db|TOC.txt)");
}
+ void
validateVertxFilesystemOptionsClasspathResolvingDisabled(FileSystemOptionsConfiguration
config)
+ {
+ assertThat(config).isNotNull();
+ assertThat(config.classpathResolvingEnabled()).isFalse();
+ assertThat(config.fileCacheDir()).isNotNull();
+ assertThat(config.fileCachingEnabled()).isNotNull();
+ }
+
void validateSslConfigurationFromYaml(SslConfiguration config)
{
assertThat(config).isNotNull();
diff --git a/server/src/test/resources/config/sidecar_multiple_instances.yaml
b/server/src/test/resources/config/sidecar_multiple_instances.yaml
index ffb1dcc7..e7f32cf7 100644
--- a/server/src/test/resources/config/sidecar_multiple_instances.yaml
+++ b/server/src/test/resources/config/sidecar_multiple_instances.yaml
@@ -107,6 +107,11 @@ sidecar:
max_retries: 42
retry_delay_millis: 1234
+vertx:
+ filesystem_options:
+ classpath_resolving_enabled: false
+ file_caching_enabled: false
+
#
# Enable SSL configuration (Disabled by default)
#
diff --git a/server/src/test/resources/config/sidecar_multiple_instances.yaml
b/server/src/test/resources/config/sidecar_vertx_filesystem_options.yaml
similarity index 55%
copy from server/src/test/resources/config/sidecar_multiple_instances.yaml
copy to server/src/test/resources/config/sidecar_vertx_filesystem_options.yaml
index ffb1dcc7..62661048 100644
--- a/server/src/test/resources/config/sidecar_multiple_instances.yaml
+++ b/server/src/test/resources/config/sidecar_vertx_filesystem_options.yaml
@@ -1,76 +1,29 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
#
# Cassandra SideCar configuration file
#
-cassandra_instances:
- - id: 1
- host: localhost1
- port: 9042
- username: cassandra
- password: cassandra
- data_dirs:
- - /ccm/test/node1/data0
- - /ccm/test/node1/data1
- staging_dir: /ccm/test/node1/sstable-staging
- jmx_host: 127.0.0.1
- jmx_port: 7100
- jmx_ssl_enabled: false
- # jmx_role:
- # jmx_role_password:
- - id: 2
- host: localhost2
- port: 9042
- username: cassandra
- password: cassandra
- data_dirs:
- - /ccm/test/node2/data0
- - /ccm/test/node2/data1
- staging_dir: /ccm/test/node2/sstable-staging
- jmx_host: 127.0.0.1
- jmx_port: 7200
- jmx_ssl_enabled: false
- # jmx_role:
- # jmx_role_password:
- - id: 3
- host: localhost3
- port: 9042
- username: cassandra
- password: cassandra
- data_dirs:
- - /ccm/test/node3/data0
- - /ccm/test/node3/data1
- staging_dir: /ccm/test/node3/sstable-staging
- jmx_host: 127.0.0.1
- jmx_port: 7300
- jmx_ssl_enabled: false
-# jmx_role:
-# jmx_role_password:
+cassandra:
+ host: localhost
+ port: 9042
+ username: cassandra
+ password: cassandra
+ data_dirs:
+ - /ccm/test/node1/data0
+ - /ccm/test/node1/data1
+ staging_dir: /ccm/test/node1/sstable-staging
+ jmx_host: 127.0.0.1
+ jmx_port: 7199
+ jmx_role: controlRole
+ jmx_role_password: controlPassword
+ jmx_ssl_enabled: true
sidecar:
host: 0.0.0.0
- port: 9043
+ port: 0 # bind sever to the first available port
request_idle_timeout_millis: 300000 # this field expects integer value
request_timeout_millis: 300000
tcp_keep_alive: false
accept_backlog: 1024
- server_verticle_instances: 1
+ server_verticle_instances: 2
throttle:
stream_requests_per_sec: 5000
timeout_sec: 10
@@ -106,6 +59,17 @@ sidecar:
jmx:
max_retries: 42
retry_delay_millis: 1234
+ schema:
+ is_enabled: false
+ keyspace: sidecar_internal
+ replication_strategy: SimpleStrategy
+ replication_factor: 1
+
+vertx:
+ filesystem_options:
+ classpath_resolving_enabled: true
+ file_cache_dir: /path/to/vertx/cache
+ file_caching_enabled: true
#
# Enable SSL configuration (Disabled by default)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]