Plasma GitLab Archive
Projects Blog Knowledge

Module Plasma_client_config


module Plasma_client_config: sig .. end
Configuration of clients

class type client_config = object .. end
val parse_config_file : string -> client_config list
Parses the config file and returns all included configs

The config file should look like:

      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.

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:

  • If both clustername and nn_nodes are passed, this configuration is taken
  • The file ~/.plasmafs is parsed and all configurations are extracted.
  • If a clustername is passed, this configuration is selected (it is an error if this does not exist)
  • If no clustername is passed, and the environment variable PLASMAFS_CLUSTER is set, this variable selects the cluster
  • Otherwise, the first configuration from ~/.plasmafs is selected.
  • Otherwise the algorithm fails.

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml