|
@@ -17,16 +17,28 @@ public class FeatureV2ServiceTest {
|
|
|
@Qualifier("byteRedisTemplate")
|
|
@Qualifier("byteRedisTemplate")
|
|
|
private RedisTemplate<String, byte[]> byteRedisTemplate;
|
|
private RedisTemplate<String, byte[]> byteRedisTemplate;
|
|
|
|
|
|
|
|
|
|
+ @Qualifier("redisTemplate")
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private RedisTemplate<String, String> redisTemplate;
|
|
|
|
|
+
|
|
|
@Test
|
|
@Test
|
|
|
public void featureV2Test() {
|
|
public void featureV2Test() {
|
|
|
|
|
|
|
|
- List<String> keys = Arrays.asList(
|
|
|
|
|
- "snappy:alg_videoid_feature:70282758:v2",
|
|
|
|
|
- "snappy:alg_videoid_feature:70268863:v2"
|
|
|
|
|
|
|
+ List<String> byteArraykeys = Arrays.asList(
|
|
|
|
|
+ "snappy:alg_user_network_seq_feature:ohlZ7xLtnpqmeqJaBHejIeX2BZiY:v2"
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
- for (byte[] bytes : byteRedisTemplate.opsForValue().multiGet(keys)) {
|
|
|
|
|
|
|
+ for (byte[] bytes : byteRedisTemplate.opsForValue().multiGet(byteArraykeys)) {
|
|
|
System.out.println(CompressionUtil.snappyDecompressV2(bytes));
|
|
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));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|