I am getting the error ambiguous reference to overloaded definition. My code looks like this
override def process(record: Row) = {
var asset = record.getString(0);
var count = record.getLong(1);
if(jedis == null){
connect()
}
jedis.hset("click:"+asset, "asset", asset)
jedis.hset("click:"+asset, "count", count.toString)
jedis.expire("click:"+asset, 300)
}
and the error is from the line jedis.expire("click:"+asset, 300). anyone knows how I can go around this error
I'm guessing
jedisis from https://www.javadoc.io/doc/redis.clients/jedis/latest/redis/clients/jedis/Jedis.htmlThat class has four
expiremethod overloads:It looks like you're trying to pass a
Stringand anInt; the closest method signature expects alongas the second argument, so try this:Note the
Lon the number literal tells the compiler you want aLonginstead of anInt.