Details
-
Sub-task
-
Status: Resolved
-
Minor
-
Resolution: Not A Problem
-
HDFS-7240
-
None
Description
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,
at ScmBlockLocationProtocolClientSideTranslatorPB.allocateBlock
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.
ksm.KeyManagerImpl.allocateKey
ksm.KeySpaceManager.allocateKey(KeySpaceManager.java:428)
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.
vagarychen Would you like to fix this in the next patch you are working on ?