Load and parse the JSON file located at path
in the application's resources.
Load and parse the JSON file located at path
in the application's resources.
If no configuration files exist, return NullTunableMap. If multiple configuration files exists, return IllegalArgumentException If the configuration file cannot be parsed, return IllegalArgumentException
Parse the given JSON string json
into a TunableMap
Parses a given JSON string into a TunableMap. The expected format is:
{ "tunables": [ { "id" : "$id1", "value" : $value, "type" : "$class" }, { "id" : "$id2", "value" : $value, "type" : "$class" } ] }
Where $id1 and $id2 are unique identifiers used to access the Tunable, $value is the value, and $class is the fully-qualified class name (e.g. com.twitter.util.Duration)
If the JSON is invalid, or contains duplicate ids for Tunables,
parse
will return a Throw. Otherwise,parse
returns Return[TunableMap