public byte [ ] keyToStorageFormat ( byte [ ] key ) { switch ( getReadOnlyStorageFormat ( ) ) { case READONLY_V0 : case READONLY_V1 : return ByteUtils . md5 ( key ) ; case READONLY_V2 : return ByteUtils . copy ( ByteUtils . md5 ( key ) , 0 , 2 * ByteUtils . SIZE_OF_INT ) ; default : throw new VoldemortException ( "Unknown read-only storage format" ) ; } }
Converts the key to the format in which it is stored for searching