I dont know how hbase is normally used by users - so I cant comment unfortunately.
It was not clear if this was the assumption, but I inferred it based on the "- 1" in rest of the code, etc.