Skip to content

Instantly share code, notes, and snippets.

@rbotzer
Last active February 16, 2020 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbotzer/435852c1d9d030dac2cbd97c4b228224 to your computer and use it in GitHub Desktop.
Save rbotzer/435852c1d9d030dac2cbd97c4b228224 to your computer and use it in GitHub Desktop.
# Count all the segments in the segment ID range 8000-9000
print("\nCount how many segments u1 has in the segment ID range 8000-9000")
if options.interactive:
pause()
ops = [mh.map_get_by_key_range("u", 8000, 9000, aerospike.MAP_RETURN_COUNT)]
_, _, b = client.operate(key, ops)
print(b["u"])
print(spacer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment