Skip to content

Instantly share code, notes, and snippets.

@spmallette
Last active August 29, 2015 14:00
Show Gist options
  • Save spmallette/eee03b57e92ec85ac0f4 to your computer and use it in GitHub Desktop.
Save spmallette/eee03b57e92ec85ac0f4 to your computer and use it in GitHub Desktop.
Decoding Permanent Locking Exception
gremlin> b = [ 64, 0, 0, 0, 0, 0, 0, 202 ] as byte[]
==>[B@150858bb
gremlin> r = new com.thinkaurelius.titan.diskstorage.util.ReadArrayBuffer(b)
==>64-0-0-0-0-0-0-202
gremlin> com.thinkaurelius.titan.graphdb.database.idhandling.VariableLong.readPositive(r)
==>36028797018964042
gremlin> ks = new com.thinkaurelius.titan.graphdb.database.serialize.kryo.KryoSerializer(true)
==>com.thinkaurelius.titan.graphdb.database.serialize.kryo.KryoSerializer@2ba74026
gremlin> x = ks.getDataOutput(40, true).writeObjectNotNull("10000000038529").getStaticBuffer()
==>1-49-48-48-48-48-48-48-48-48-51-56-53-50-185
gremlin> ks.readObjectNotNull(x.asReadBuffer(), String.class)
==>10000000038529
gremlin>
gremlin> x = new com.thinkaurelius.titan.diskstorage.util.StaticArrayBuffer([1, 49,48,48,48,48,48,48,48,48,51,56,53,50,185] as byte[])
==>1-49-48-48-48-48-48-48-48-48-51-56-53-50-185
gremlin> ks.readObjectNotNull(x.asReadBuffer(), String.class)
==>10000000038529
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment