Cmd_plasmad



plasmad - daemon for datanodes and namenodes

Synopsis

plasmad -conf file [-fg] [-pid file]

Description

This is the daemon implementing datanode and namenode services. plasmad is a collection of services which can be selectively enabled from the configuration file. By choosing certain sets of services, one gets either a datanode or a namenode server.

The configuration file is in Netplex syntax, and also uses many features from this framework. See the documentation for Netplex which is available as part of the Ocamlnet library package. A working subset is described below.

Options

General configuration file layout

A config file generally looks like:

netplex {
  controller {
    socket_directory = "<socket_directory>";
    max_level = "debug";    (* Log level, also "info", "notice", "err", ... *)
    logging {
      ...
    }
  };
  service {
    name = "<service_name>";
    ...
  };
  <custom_section> {
    ...
  };
}

Without going too much into detail:

The <socket_directory> is a place where the daemon puts runtime files like Unix Domain sockets. Each instance of a daemon must have a separate socket directory.

Logging

Log messages can go to stderr, to files, or to syslog. Please see the documentation in Netplex_log for details. A simple logging specification would be:

  logging { type = "stderr" }

Config file for datanodes

For a datanode the config file looks like:

netplex {
  controller {
    ... (* see above *)
  };
  datanode {
    clustername = "<name>";
    directory = "<data_dir>";
    blocksize = <blocksize>;  (* int *)
    io_processes = <p>;       (* int *)
    shm_queue_length = <q>;   (* int *)
    sync_period = <s>;        (* float *)
  };
  access {
    min_level = "auth";
    user { name = "proot"; password_file = "password_proot" };
    user { name = "pnobody"; password_file = "password_pnobody" };
  };
  service {
    name = "Dn_manager";
    protocol {
      name = "RPC";
      address {
        type = "internet";
        bind = "0.0.0.0:2728"
      };
      address {
        type = "local";
        path = "<rpc_socket>";
      }
    };
    processor {
      type = "dn_manager";
    };
    workload_manager {
      type = "constant";
      threads = 1;
    };
  };
}

Parameters:

Parameters in access:

Config files for namenodes

For a namenode the config file looks like:

netplex {
  controller {
    ... (* see above *)
  };
  database {
    dbname = "<name_of_postgresql_database>";
    (* maybe more options, see below *)
  };
  namenodes {
    clustername="<cluster_name>";
    node_list = "<nn_list>";
    port = 2730;
    rank_script = "ip addr show label 'eth*' | grep link/ether | awk '{print $2}'"; (* see below *)
    inodecache { port = 2740 };
  };
  datanodes {
    node_list = "<dn_list>";
    port = 2728;
    blocksize = <blocksize>;
  };
  access {
    min_level = "priv";
    client_level = "priv";
    user { name = "proot"; password_file = "password_proot" };
    user { name = "pnobody"; password_file = "password_pnobody" };
  };
  service {
    name = "Nn_manager";
    protocol {
      name = "RPC";
      address {
        type = "internet";
        bind = "0.0.0.0:2730"
      };
      address {
        type = "local";
        path = "<manager_socket>";
      };
    };
    processor {
      type = "nn_manager";
    };
    workload_manager {
      type = "constant";
      threads = 1;
    };
  };
  service {
    name = "Nn_inodecache";
    protocol {
      name = "RPC";
      address {
        type = "internet";
        bind = "0.0.0.0:2740"
      };
      address {
        type = "container";
      };
    };
    processor {
      type = "nn_inodecache";
    };
    workload_manager {
      type = "constant";
      threads = 1;
    };
  };
}

Parameters in database:

Parameters in namenodes: Parameters in datanodes: Parameters in access: It is strongly advised to leave the security level at "priv" (i.e. maximum).

Other:

How to shut down the daemon

The orderly way for shutting down the daemon is the command

netplex-admin -sockdir <socket_directory> -shutdown

netplex-admin is part of the Ocamlnet distribution. The socket directory must be the configured socket directory.

It is also allowed to do a hard shutdown by sending SIGTERM signals to the process group whose ID is written to the pid file. There is no risk of data loss in the server because of the transactional design. However, clients may be well confused when the connections simply crash.