Make datanode write its state to metastore.