|
|
@@ -1,15 +1,11 @@
|
|
|
package com.tzld.piaoquan.recommend.feature.service;
|
|
|
|
|
|
-import com.tzld.piaoquan.recommend.feature.common.util.CompressionUtil;
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
@SpringBootTest
|
|
|
public class FeatureV2ServiceTest {
|
|
|
|
|
|
@@ -24,21 +20,6 @@ public class FeatureV2ServiceTest {
|
|
|
@Test
|
|
|
public void featureV2Test() {
|
|
|
|
|
|
- List<String> byteArraykeys = Arrays.asList(
|
|
|
- "snappy:alg_user_network_seq_feature:ohlZ7xLtnpqmeqJaBHejIeX2BZiY:v2"
|
|
|
- );
|
|
|
-
|
|
|
- for (byte[] bytes : byteRedisTemplate.opsForValue().multiGet(byteArraykeys)) {
|
|
|
- System.out.println(CompressionUtil.snappyDecompressV2(bytes));
|
|
|
- }
|
|
|
-
|
|
|
- List<String> keys = Arrays.asList(
|
|
|
- "snappy:alg_user_network_seq_feature:ohlZ7xLtnpqmeqJaBHejIeX2BZiY"
|
|
|
- );
|
|
|
-
|
|
|
- for (String value : redisTemplate.opsForValue().multiGet(keys)) {
|
|
|
- System.out.println(CompressionUtil.snappyDecompress(value));
|
|
|
- }
|
|
|
|
|
|
}
|
|
|
}
|