Create byte ranges for to match keys starting with

2019-08-10 09:08发布

问题:

I'm doing HBase range scans, and I need to return all rows that begin with a particular letter. Given a single letter as input, how do I create the correct startRow and endRow keys?

回答1:

val letter = "s"
val startRow = letter
val endRow = (letter.charAt(0) + 1).toChar.toString


标签: scala