\x represents a hex char escape. So the byte array key is encoded in a hex characters sequence in redis.
Could somebody tell me how to analyze the bytearray keys from redis?
Question
I got a key like this: "\x04y\x03\x00\x00K" from my redis, and I totally confused about its meaning.
Are "\x04" represents for a hex string and "y" stands for a ascii char? Is so, why does the key combine both?
Thx in advance.
edit: I am using Jedis(a java client for redis) and make key as byte arrays. My codes(in java) are some like this:
jedis.set(aByteArr, value)
While running the code, I opened the native client provided by redis, executing "MONITOR" command to see what key is actually being saved in redis. And this is what I have found:
... SET "\x04y\x03\x00\x00K" "aString"
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow