Java examples for Big Data:Redis
Add data to redis
import redis.clients.jedis.Jedis; public class Redis { public static void main(String[] args) { Jedis jedis = new Jedis("localhost",6379); System.out.println("Connect to redis successfully!"); //from w w w .j a v a 2s. c o m System.out.println("Jedis pings: "+jedis.ping()); jedis.set("name", "lipanpan"); jedis.append("name", " is my lover!"); String jrs = jedis.get("name"); System.out.println(jrs); } }