There doesn't seem to be a way to escape a % character, or prevent macro substitution. For an input string in the cluster json:
<value>/usr/bin/ssh %1$s %2$s%3$s%4$s \"sudo -u hbase sh -lc \"%5$s\"\"</value>
it consistently returns
Exception while expanding macros: Extra characters after macro at position 1
We believe it is because the "1" after the first "%" is unexpected.