Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document more ways to override driver config #576

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ private static CqlSession createSession(final Builder builder)
{
sessionBuilder.withMetricRegistry(builder.myMeterRegistry);
}
sessionBuilder.withConfigLoader(loaderBuilder.build());
DriverConfigLoader driverConfigLoader = loaderBuilder.build();
LOG.debug("Driver configuration: {}", driverConfigLoader.getInitialConfig().getDefaultProfile().entrySet());
sessionBuilder.withConfigLoader(driverConfigLoader);
return sessionBuilder.build();
}

Expand Down
16 changes: 13 additions & 3 deletions docs/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,12 @@ More information about the custom connection provider can be found [here](STANDA

For more advanced use-cases, it's possible to override the java-driver configuration,
please see [reference configuration](https://docs.datastax.com/en/developer/java-driver/4.17/manual/core/configuration/reference/) for available configuration options.
To override default java-driver configuration, make sure `application.conf` file is available on the class path.
The easiest way to do this is by simply putting `application.conf` file in the `conf` directory of ecChronos.
To override default java-driver configuration,
follow any of the supported methods documented at [datastax docs](https://docs.datastax.com/en/developer/java-driver/4.17/manual/core/configuration/#default-implementation-typesafe-config).
masokol marked this conversation as resolved.
Show resolved Hide resolved

Example:
Examples:

`application.conf` in `conf` directory of ecChronos:

```
datastax-java-driver {
Expand All @@ -198,6 +200,14 @@ datastax-java-driver {
}
```

system properties (you can put these in `jvm.options` file of ecChronos:

```
-Ddatastax-java-driver.advanced.prepared-statements.prepare-on-all-nodes=false -Ddatastax-java-driver.advanced.prepared-statements.reprepare-on-up.enabled=false
```



## Running ecChronos

To run ecChronos execute `bin/ecc` or `bin/ecctool start` from the root directory.
Expand Down