Happybase version 1.2.0.
A batch.delete, then a batch.put on the same key in the same batch results in the key not being present. Outside of a batch, this has the expected semantics.
Does anybody have any idea why?
Example:
import happybase
connection = happybase.Connection('hbase-docker', 9090)
try:
connection.create_table('t2', {'s': dict()})
except Exception:
pass
table = connection.table('t2')
key = b'key1'
val = b'abcd'
# A put/delete outside of a batch
table.delete(key)
table.put(key, {b's:d': val})
actual = table.row(key)
if actual[b's:d'] != val:
print('Invalid value outside of batch')
# Same inside of a batch
b = table.batch()
b.delete(key)
b.put(key, {b's:d': val})
b.send()
actual = table.row(key)
if b's:d' not in actual:
print('Value missing')
elif actual.get(b's:d') != val:
print('Invalid value for batch')
Happybase version 1.2.0.
A batch.delete, then a batch.put on the same key in the same batch results in the key not being present. Outside of a batch, this has the expected semantics.
Does anybody have any idea why?
Example: