diff --git a/src/main/java/icu/funkye/redispike/handler/process/impl/hash/HLenRequestProcessor.java b/src/main/java/icu/funkye/redispike/handler/process/impl/hash/HLenRequestProcessor.java index e9c175f..0826cb7 100644 --- a/src/main/java/icu/funkye/redispike/handler/process/impl/hash/HLenRequestProcessor.java +++ b/src/main/java/icu/funkye/redispike/handler/process/impl/hash/HLenRequestProcessor.java @@ -54,9 +54,9 @@ public void handle(RemotingContext ctx, HLenRequest request) { client.execute(AeroSpikeClientFactory.eventLoops.next(), new ExecuteListener() { @Override public void onSuccess(Key key, Object obj) { - logger.info("hlen response:{}", request); request.setResponse(obj.toString()); write(ctx, request); + logger.info("hlen response:{}", obj); } @Override diff --git a/src/test/java/icu/funkye/redispike/ServerTest.java b/src/test/java/icu/funkye/redispike/ServerTest.java index 7cfa4bb..dfff7e1 100644 --- a/src/test/java/icu/funkye/redispike/ServerTest.java +++ b/src/test/java/icu/funkye/redispike/ServerTest.java @@ -60,10 +60,10 @@ public static void init() throws ParseException { public void TestPippline() { List keys = new ArrayList<>(); String key = String.valueOf(ThreadLocalRandom.current().nextInt(RandomValue)); + for (int i = 0; i < 3; i++) { + keys.add(String.valueOf(ThreadLocalRandom.current().nextInt(RandomValue))); + } try (Jedis jedis = JedisPooledFactory.getJedisInstance()) { - for (int i = 0; i < 3; i++) { - keys.add(String.valueOf(ThreadLocalRandom.current().nextInt(RandomValue))); - } try (Pipeline pipeline = jedis.pipelined()) { for (String value : keys) { pipeline.hset(key, value, "b");