hzyuemeng1 opened a new pull request #71: Bahir 220
URL: https://github.com/apache/bahir-flink/pull/71
 
 
   Currently, for Flink-1.9.0, we can use the catalog to store our stream table 
source and sink 
   for Redis connector, it should exist a Redis table sink so we can register 
it to catalog, and treat redis as a table in SQL environment
   
   Redis redis = new Redis()
                   .mode(RedisVadidator.REDIS_CLUSTER)
                   .command(RedisCommand.INCRBY_EX.name())
                   .ttl(100000)
                   .property(RedisVadidator.REDIS_NODES, REDIS_HOST+ ":" + 
REDIS_PORT);
   tableEnvironment
                   .connect(redis).withSchema(new Schema()
                   .field("k", TypeInformation.of(String.class))
                   .field("v", TypeInformation.of(Long.class)))
                   .registerTableSink("redis");
   tableEnvironment.sqlUpdate("insert into redis select k, v from t1");
   env.execute("Test Redis Table");
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to