As part of working on HDFS-11909, I was trying to put zero length keys. I found that put key refuses to do that. Here is the call trace,
we check if the block size is greater than 0, which makes sense since we should not call into SCM to allocate a block of zero size.
However these 2 calls are invoked for creating the key, so that metadata for key can be created, we should probably take care of this behavior here.
Another way to fix this might be to just allocate a block with at least 1 byte always, which might be easier than special casing code.
Chen Liang Would you like to fix this in the next patch you are working on ?