I am using HBase JAVA/Scala API and have a list of rowids List(1,2,5) and want to retrieve rows corresponding to those ids at the same time.
val getOne = new Get(Bytes.toBytes("1"))
Let's me access only 1 row and I don't want to do get(1) get(2) and get(5) sequentially (latency).
How would I do all at once and iterate through the return set later?
If API does not offer it what is the next best way?
所以答案很简单,获取Result [] get(List gets)列表抛出IOException
You just have to construct multiple "Get" requests and use the below method from the HTable.
Result[] get(List<Get> gets)
Link to the javadoc is here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.