=str - Various Flow and FlowMaterializer improvements
- Switches from using size-of-1/2 Vectors to using Lists - Fixes an issue where processorForNode wouldn't use the dispatcher form the settings - Adds a dedicated Collect fusion op - Adds various simplifications to ActorBasedFlowMaterializer - Adds FIXMEs where appropriate - Switches `grouped` to use a VectorBuilder - Adds support for `scan` - ActorBasedFlowMaterializer now uses Iterator instead of head+tail decomp on Seqs - Identity and Completed Transformers are now cached - Adds dedicated AstNodes for all combinators - Adds a hook-in point for fusion in `ActorBasedFlowMaterializer` - Adds support for `Operate` an AstNode with a function that create a fusing.Op - Adds experimental and slow optimizer as a PoC - Adds verification that Ast.Fused does not exist in optimizer input
This commit is contained in:
parent
efe9331b69
commit
db4e5c4a29
51 changed files with 678 additions and 732 deletions
|
|
@ -43,7 +43,7 @@ public class FlowTest extends StreamTest {
|
|||
public void mustBeAbleToUseSimpleOperators() {
|
||||
final JavaTestKit probe = new JavaTestKit(system);
|
||||
final String[] lookup = { "a", "b", "c", "d", "e", "f" };
|
||||
final java.util.Iterator<Integer> input = Arrays.asList(0, 1, 2, 3, 4, 5).iterator();
|
||||
final java.lang.Iterable<Integer> input = Arrays.asList(0, 1, 2, 3, 4, 5);
|
||||
final Source<Integer> ints = Source.from(input);
|
||||
|
||||
ints.drop(2).take(3).takeWithin(FiniteDuration.create(10, TimeUnit.SECONDS)).map(new Function<Integer, String>() {
|
||||
|
|
@ -79,7 +79,7 @@ public class FlowTest extends StreamTest {
|
|||
@Test
|
||||
public void mustBeAbleToUseVoidTypeInForeach() {
|
||||
final JavaTestKit probe = new JavaTestKit(system);
|
||||
final java.util.Iterator<String> input = Arrays.asList("a", "b", "c").iterator();
|
||||
final java.lang.Iterable<String> input = Arrays.asList("a", "b", "c");
|
||||
Source<String> ints = Source.from(input);
|
||||
|
||||
Future<BoxedUnit> completion = ints.foreach(new Procedure<String>() {
|
||||
|
|
@ -414,17 +414,11 @@ public class FlowTest extends StreamTest {
|
|||
@Test
|
||||
public void mustBeAbleToUseCallableInput() {
|
||||
final JavaTestKit probe = new JavaTestKit(system);
|
||||
final akka.stream.javadsl.japi.Creator<akka.japi.Option<Integer>> input = new akka.stream.javadsl.japi.Creator<akka.japi.Option<Integer>>() {
|
||||
int countdown = 5;
|
||||
|
||||
final Iterable<Integer> input1 = Arrays.asList(4,3,2,1,0);
|
||||
final akka.stream.javadsl.japi.Creator<Iterator<Integer>> input = new akka.stream.javadsl.japi.Creator<Iterator<Integer>>() {
|
||||
@Override
|
||||
public akka.japi.Option<Integer> create() {
|
||||
if (countdown == 0) {
|
||||
return akka.japi.Option.none();
|
||||
} else {
|
||||
countdown -= 1;
|
||||
return akka.japi.Option.option(countdown);
|
||||
}
|
||||
public Iterator<Integer> create() {
|
||||
return input1.iterator();
|
||||
}
|
||||
};
|
||||
Source.from(input).foreach(new Procedure<Integer>() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue