Skip to content

Commit

Permalink
Document more ways to override driver config (#576)
Browse files Browse the repository at this point in the history
Closes #575
  • Loading branch information
masokol authored Sep 15, 2023
1 parent f05fdc3 commit ea24bcb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
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).

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

0 comments on commit ea24bcb

Please sign in to comment.