module Plasma_client_config:Configuration of clientssig..end
class type client_config =object..end
val parse_config_file : string -> client_config list plasmafs {
cluster {
clustername = "cluster1";
node { addr = "hostname:port" };
node { addr = "hostname:port" };
...
}
... (* more [cluster] sections possible *)
}
As usual, one can also have
node_list = "filename";
port = <default_port>;
instead of several node/addr sections. node_list points then
to another file enumerating the hostnames (and optionally ports).
val get_config : ?clustername:string ->
?nn_nodes:string list -> unit -> client_config get_config (): This is the standard way for
clients to obtain a config object. Generally, the settings can
be passed directly to get_config, by environment variables,
and by the config file ~/.plasmafs.
clustername and nn_nodes are passed, this configuration
is taken~/.plasmafs is parsed and all configurations are extracted.clustername is passed, this configuration is selected (it is
an error if this does not exist). Environment variables are ignored.PLASMAFS_CLUSTER is set, this variable selects the cluster.
If also PLASMAFS_NAMENODES is set, the namenodes are configured
from there. Otherwise the PLASMAFS_CLUSTER must be described
in the configuration file.~/.plasmafs
is selected.
PLASMAFS_NAMENODES enumerates the namenodes in host:port syntax,
separated by commas.