Skip to content

Commit

Permalink
fix memorymapstate and lrumemorymapstate to avoid concurrent access t…
Browse files Browse the repository at this point in the history
…o same map, update trident integration test of getting all tuples to properly do broadcast
  • Loading branch information
nathanmarz committed May 29, 2013
1 parent 45d0fae commit dc8a3d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/jvm/storm/trident/testing/LRUMemoryMapState.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public Factory(int maxSize) {

@Override
public State makeState(Map conf, IMetricsContext metrics, int partitionIndex, int numPartitions) {
return new LRUMemoryMapState(_maxSize, _id);
return new LRUMemoryMapState(_maxSize, _id + partitionIndex);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/jvm/storm/trident/testing/MemoryMapState.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Factory() {

@Override
public State makeState(Map conf, IMetricsContext metrics, int partitionIndex, int numPartitions) {
return new MemoryMapState(_id);
return new MemoryMapState(_id + partitionIndex);
}
}

Expand Down
1 change: 1 addition & 0 deletions test/clj/storm/trident/integration_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
))
(-> topo
(.newDRPCStream "all-tuples" drpc)
(.broadcast)
(.stateQuery word-counts (fields "args") (TupleCollectionGet.) (fields "word" "count"))
(.project (fields "word" "count")))
(with-topology [cluster topo]
Expand Down

0 comments on commit dc8a3d1

Please sign in to comment.