RedisLabs/spark-redis

How do you batch read to return an array

Closed this issue · 4 comments

How do you batch read to return an array

You need to read redis in RDD that relies on RDD's data, but you want it to return an array

fe2s commented

Hi @xingshaoqi,
I didn't get the question. Can you please provide some example?

@fe2s rdd.mapPartitions(it=>{
val arr=sc.fromRedisHash(it) //Passing in an array returns an array
})
Do you know how?

fe2s commented

There is no such API to achieve that.