|
HSCALE - MySQL Partitioning
|
ConfigurationHSCALE is configured via a Lua script. The path to that script may be set via the environment variable HSCALE_CONFIG_FILE. If not set /etc/hscale.lua will be used. File FormatAs said above the configuration file must be a valid Lua script. "Basic configuration file" config = {}
-- Set a value
config.someKey = "value"
return config
Common Options
Partition Module Specific OptionsTake a look at Partition Lookup Modules. ExampleFull configuration example using ModulusPartitionLookup config = {}
-- Define the partitioning lookup module to be used.
-- This module tells the application how to split your tables.
-- The Lua file must be found within your LUA_PATH.
config.partitionLookupModule = "optivo.hscale.modulusPartitionLookup"
-- Configure the tables to be partitioned (a, b) with the partition columns ("category", "folder").
config.tableKeyColumns = {
["a"] = "category",
["b"] = "folder"
}
-- Used for optivo.hscale.modulusPartitionLookup only - the number of partitions per table (i.e. the modulo value)
config.partitionsPerTable = 3
return config
|