Assuming there are always one state after the HDFS, This solve the issue:
awk '$1=="HDFS"{l=$0;next};$1=="state"{print(l,$2);l=""}' file
$1=="HDFS"{ … } For lines the field 1 is HDFS do ….
l=$0;next Store line in var l (elle, line) move to next line.
$1=="state"{ … } for lines that field 1 is state do …
{print(l,$2)} print the line stored in var l (elle) and field 2.
{l=""} Avoid printing stale (old) values of l.