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>
where <nn_options>:
-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 Cmd_plasma_datanode_init
). The
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
running datanode:
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
The 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
right size
.
enable_datanode
subcommand
The enable_datanode
subcommand sets the identity to enabled, and
tries to connect it to the datanode server listening on <dn_host>
and
<dn_port>
. If the connection cannot be established, the identity is
nevertheless enabled although it remains unconnected to a server.
disable_datanode
subcommandThis subcommand disables the identity on the command-line.
list_datanodes
subcommandLists 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
destroy_datanode
subcommandThe 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.
fsck
subcommandThis 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).
The fsck
subcommand does not try to repair the blockmaps.
Options:
-conf file
: The file
must be the config file of the namenode server.
Effectively, only the parameters from the database
section are interpreted.