debasishg / scala-redis

A scala library for connecting to a redis server, or a cluster of redis nodes using consistent hashing on the client side.
1.02k stars 219 forks source link

How to use scala-redis project in other scala project #204

Closed writeaditya closed 5 years ago

writeaditya commented 6 years ago

Hi,

I'm trying to use scala-redis library into my scala project but it gives an error. So, I have a following doubts -

1) How to create jar file of this project so that I can simply import it into my project 2) Right now I tried to create zip by compiling the code using "sbt" command from console and used in my project . I can execute RedisClient for inserting data into Redis but when I'm trying to create RedisClientPool , it gives an error in code - something like - .commons.pool is missing from the classpath . This Symbol is used by ' value com.redis.RedisClientPool.pool'.

Thanks,

james-turner commented 6 years ago

Just include it in your build.sbt libraryDependencies ++= Seq( "net.debasishg" %% "redisclient" % "3.7" )

writeaditya commented 6 years ago

Hi James,

Thank you for the reply. but Since my project is Spark based so will this library be helpful ? as I have checked we cannot consume this project in case of spark stream I have to collect the RDD and then use which will create an overhead on my project. Is there any way or any version which can be sued with spark scala 2.11 version. Thanks,

kikhofua commented 6 years ago

Hi Aditya,

Were you able to resolve the issues you had? I am having a similar problem and would benefit from what you learnt. Thanks.

writeaditya commented 5 years ago

Hi Kikhofua,

Yes , there is a maven repository from where you can directly include jar in your project. I know by now you must have resolved the issue. but, it might help some other. Thanks, closing this issue.