flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Ewen <se...@apache.org>
Subject Re: In AbstractRocksDBState, why write a byte 42 between key and namespace?
Date Fri, 15 Jul 2016 14:31:31 GMT
My assumption is that this was a sanity check that actually just stuck in
the code.

It can probably be removed.

PS: Moving this to the dev@flink.apache.org list...



On Fri, Jul 15, 2016 at 11:05 AM, 刘彪 <mmyy1110@gmail.com> wrote:

> In AbstractRocksDBState.writeKeyAndNamespace():
>
> protected void writeKeyAndNamespace(DataOutputView out) throws IOException
> {
> backend.keySerializer().serialize(backend.currentKey(), out);
> out.writeByte(42);
> namespaceSerializer.serialize(currentNamespace, out);
> }
>
> Why write a byte 42 between key and namespace? The keySerializer and
> namespaceSerializer know their lengths. It seems we don't need this byte.
>
> Could anybody tell me what it is for?  Is there any situation that we must
> have this separator?
>

Mime
View raw message