implementation of redis datastore#1454
Conversation
jdgarrett
left a comment
There was a problem hiding this comment.
Mostly extra comments need to be addressed. There was one TODO that could affect mergeData, and one issue with the RedisStoreTestEnvironment.
| private Iterator<T> transformAndFilter( | ||
| final Collection<ScoredEntry<GeoWaveRedisPersistedRow>> result, | ||
| final byte[] partitionKey ) { | ||
| // final List<ScoredEntry<GeoWaveRedisPersistedRow>> list = new |
| public class RedisOperations implements | ||
| MapReduceDataStoreOperations | ||
| { | ||
| // private final static int WRITE_RESPONSE_THREAD_SIZE = 16; |
There was a problem hiding this comment.
ahh, yeah another block to remove
| gwNamespace = options.getGeowaveNamespace(); | ||
| } | ||
| this.options = options; | ||
| // this.options = options; |
| private void deleteByPattern( | ||
| final String pattern ) { | ||
| final RKeys keySet = client.getKeys(); | ||
| // final String[] keys = Iterators.toArray( |
| @Override | ||
| public void close() | ||
| throws Exception { | ||
| // TODO its unclear whether this is necessary |
There was a problem hiding this comment.
If this is necessary, it may need to be done on flush() as well to make sure the delete happens before the write when merging rows.
There was a problem hiding this comment.
yeah, I agree, I actually did look at this unnecessary block of code and debated deleting it a couple times - I should write some test to see if its necessary and then either delete or not
There was a problem hiding this comment.
wrote some code - its unncecessary
RedisServer server= RedisServer.builder().port(
6379).setting(
"bind 127.0.0.1") // secure + prevents popups on Windows
.setting(
"maxmemory 512M")
.setting(
"timeout 30000")
.build();
server.start();
Config config = new Config();
config.useSingleServer().setAddress("redis://127.0.0.1:6379");
RedissonClient r = Redisson.create(config);
r.getKeys().getKeys().forEach(k -> System.err.println(k));
RList list = r.getList("test");
System.err.println("1");
r.getKeys().getKeys().forEach(k -> System.err.println(k));
list.add(new Integer(100));
System.err.println("2");
r.getKeys().getKeys().forEach(k -> System.err.println(k));
list.remove(new Integer(100));
r.getKeys().getKeys().forEach(k -> System.err.println(k));
System.err.println("3");
list.delete();
System.err.println("4");
r.getKeys().getKeys().forEach(k -> System.err.println(k));
server.stop();
produces:
1
2
test
3
4
| public static Collection<ScoredEntry<GeoWaveRedisPersistedRow>> groupByRow( | ||
| final Collection<ScoredEntry<GeoWaveRedisPersistedRow>> result, | ||
| final boolean sortByTime ) { | ||
| // final List<ScoredEntry<GeoWaveRedisPersistedRow>> list = new |
|
|
||
| @Override | ||
| public void setup() { | ||
| // DynamoDB IT's rely on an external dynamo local process |
|
|
||
| @Override | ||
| protected GeoWaveStoreType getStoreType() { | ||
| return GeoWaveStoreType.DYNAMODB; |
There was a problem hiding this comment.
apparently thats fairly unnecessary
No description provided.