plasma_admin add_datanode <nn_options> -size <blocks> <identity> ... plasma_admin enable_datanode <nn_options> <identity> <dn_host>:<dn_port> plasma_admin disable_datanode <nn_options> <identity> plasma_admin list_datanodes <nn_options> plasma_admin destroy_datanode <nn_options> <identity> plasma_admin fsck -conf <namenode_config_file>
-namenode <host>:<port> -cluster <name>
plasma_admin is used for making administrative changes to namenodes.
Right now, there are two types of operations:
Every datanode has a unique identity which is created when the
datanode is initialized (via
identity is primarily stored on the disk of the datanode. The
namenodes maintain a table of known datanode identities. Each
identity can be disabled, enabled, or even be connected with a
Note that the namenode config file also enumerates datanodes. This list of nodes, only given as host and port (and lacking identity strings), is only used for the automatic discovery of datanodes at cluster startup time. When the namenode server is started, it connects to the datanode servers listening to these ports, and automatically sets the state of these identities to enabled and connected if it finds the identities in the database, and the identities are enabled.
The following subcommands all require that the namenodes are up and running.
add_datanode subcommand adds the identity on the command line
to the database. It also puts
size into the db, given as number
of blocks. This
size should match the size of the data file - however,
this cannot be checked at
add_datanode time. Be careful to pass the
enable_datanode subcommand sets the identity to enabled, and
tries to connect it to the datanode server listening on
<dn_port>. If the connection cannot be established, the identity is
nevertheless enabled although it remains unconnected to a server.
This subcommand disables the identity on the command-line.
Lists the known identities and the associated states. Sample output:
20a7df016a330c6d5c5459e409edc14b disabled not associated to datanode 5df72474031271d41cf15c1ca6ef6a4f enabled not associated to datanode 47aa6893145cb75ebe3fab17d0a6521f enabled not associated to datanode 2c9c71b888e367ba75a36e6a6c46e2a8 enabled 192.168.5.30:2728 3347e7d4719a0a1333313a736621123a enabled 192.168.5.40:2728 OK
The identity is entirely removed from the namenode database. This includes the block lists of the files, i.e. all information about the blocks for the identity is lost.
This command checks the namenode database for inconsistencies. This especially includes the correctness of the blockmaps, i.e. the tables that store whether a block is free or allocated. The blockmaps are compared with the block lists attached to the inodes.
It is required that the namenode servers are down (i.e. not accessing the database at the same time).
fsck subcommand does not try to repair the blockmaps.
-conf file: The
filemust be the config file of the namenode server. Effectively, only the parameters from the
databasesection are interpreted.