-
Notifications
You must be signed in to change notification settings - Fork 80
Creating forests
ml-gradle provides two primary ways for creating forests and replicas:
- A "payload-driven" way, where you create the exact payloads you want for a particular database.
- A "property-driven" way, where a number of properties are available to configure the number and properties of forests and replicas.
The payload-driven way means any forest configuration is possible, but it's also much more tedious than simply setting a handful of properties. The two approaches are described below.
This approach is simple and is shown in this sample project. For each database that you want to create forests for by defining all of the forest payloads, you create an ml-config/forests/(name of database)/(any-filename-you-want).json file. As shown in the sample project, you can put many forest payloads into one file.
This is the preferred approach - the payload-driven approach exists only when the set of available properties can't be used to meet your use case (and if you run into this problem, please file an issue to identify it).
The Database and forest section of the Property Reference page covers all of the properties, with version 3.2.0 adding a number of them. The bullets below provide a little more detail about which properties you'll want to use and when:
- To set how many forests are created on each host, use mlForestsPerHost.
- To set default data/fast/large directories for all forests, regardless of the database, use mlForestDataDirectory, mlForestFastDataDirectory, and mlForestLargeDataDirectory.
- To set data/fast/large directories for specific databases (thus overriding the above properties), use mlDatabaseDataDirectories, mlDatabaseFastDataDirectories, and mlDatabaseLargeDataDirectories.
- To create forest replicas for specific databases, use mlDatabaseNamesAndReplicaCounts.
- To set default data/fast/large directories for all replica forests, regardless of the database, use mlReplicaForestDataDirectory, mlReplicaForestFastDataDirectory, and mlReplicaForestLargeDataDirectory.
- To set data/fast/large directories for replicas for specific databases (thus overriding the above properties), use mlDatabaseReplicaDataDirectories, mlDatabaseReplicaFastDataDirectories, and mlDatabaseReplicaLargeDataDirectories.