Lua スクリプトを使用して、Redis に保存されている 2 つの数値を乗算しようとしています。しかし、私は ClassCastException を取得しています。誰かがプログラムのどこが間違っているかを指摘できますか
jedis.set("one", "1");
jedis.set("two", "2");
String script = "return {tonumber(redis.call('get',KEYS[1])) * tonumber(redis.call('get',KEYS[2]))}";
String [] keys = new String[]{"one","two"};
Object response = jedis.eval(script, 2, keys );
System.out.println(response);
スロー
Exception in thread "main" java.lang.ClassCastException: java.lang.Long cannot be cast to [B
at redis.clients.jedis.Jedis.getEvalResult(Jedis.java:2806)
at redis.clients.jedis.Jedis.eval(Jedis.java:2766)
at com.test.jedis.script.SimpleScript.main(SimpleScript.java:18)