Cassandra , Hector :how to retrieve specific set of columns for specific keys from a column family in 1 call?

StackOverflow https://stackoverflow.com/questions/20661450

  •  19-09-2022
  •  | 
  •  

문제

If there are row keys List rowkeys and for every row key i want some specific set of columns , for some row keys columns might be different and for some row keys they might be different.

How can i do it in Hector ?

mutliget_slice methods requires keys to be in range plus it does not allow 
different ranges for different keys too.

I am not able to find any relevant Hector class which fulfils this requirement of multiget

EDIT:-

I could not find any way , currently i am using mutliget_slice with combined list of columns for all keys and then filtering

도움이 되었습니까?

해결책

You don't.

The native Java driver (https://github.com/datastax/java-driver) addresses this by making everything asynchronous, so you can easily request appropriate columns from a bunch of rows, then wait for all the results. (This has no more overhead than a multiget.)

That said, if you can denormalize into a separate table instead of doing a multiget, that's probably best of all.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top