limit metadata value to 1KB at max
Merge pull request #530 from LipuFei/metadata-limit

Limit metadata value to 1KB at max