Commit graph

1009 commits

Author SHA1 Message Date
Jonas Chapuis
7c264a9748 support up to 22 inputs as per spec and fix race in test 2018-10-02 22:37:14 +02:00
Jonas Chapuis
375c1f8365 add additional coverage for possible case 2018-10-02 22:34:13 +02:00
Jonas Chapuis
41c59fdf48 change semantics of ZipLatest slightly to account for pending first tuple with subsequent completion 2018-10-02 18:50:44 +02:00
Jonas Chapuis
a098e0b743 add zipLatest and zipLatestWith operators and graphstages 2018-09-21 09:51:28 +02:00
Kazuhiro Sera
482eaea122 Fix several minor typos detected by github.com/client9/misspell (#25448)
* Fix several minor typos detected by github.com/client9/misspell

* Revert s/erminater/erminator/ in /ActorSystemSpec
2018-08-21 11:02:37 +09:00
Nafer Sanabria
3a92104160 Impl Sink.takeLast operator
Add documentation

reformatting

Address review comments
2018-08-03 16:31:28 +09:00
kenji yoshida
5b3b191bac Remove procedure syntax (#25362) 2018-07-25 13:38:27 +02:00
iyogi
3e698be9ce Add code sample for operator Source.single (#25375)
* Add code example for Source.single
2018-07-20 07:15:13 +01:00
Giuseppe D'Alessio
578f32d322 Adding combine operator scala example #24933 (#25371) 2018-07-18 18:53:31 +02:00
Nathan Kleyn
a372ad8b03 Allow named pipes / FIFOs when using FileIO #25328 2018-07-12 08:31:16 +02:00
Patrik Nordwall
d76b27ba3e
Optimize flatMapConcat for single element source, #25241 (#25242)
* Optimize flatMapConcat for single element source, #25241

* Grab the SourceSingle via TraversalBuilder

* Also handle the case when there is no demand

* don't match when mapMaterializedValue and async
2018-07-11 18:19:40 +02:00
Rob Moore
ce185c4dfc Source.actorRef not completing on Success (#25285)
When a Success is received, call onCompleteThenStop instead of just
context.stop; that takes care of the completion logic instead of just
stopping the actor and leaving the stream going.

Add test to ensure the stream materializes on Source.actorRef receiving
Status.Success

Remove tests around stream completion behaviour in response to
PoisonPill - as well as these tests not correctly demonstrating that the
completion was passed on downstream, they describe behaviour which was
previously incidental and is no longer accurate.

Update the docs to reflect that PoisonPill should not be used on the
actor ref as this scenario will necessarily result in bad behaviour as
it will be unable to signal the completion downstream.

Make a few grammar fixes and remove some trailing space while updating the
docs.
2018-07-09 22:25:32 +01:00
Martynas Mickevičius
766944a592
Expose assertAllStagesStopped 2018-06-27 10:34:32 +03:00
Guy Youansi
a4951e0ce7 Java time duration support for javadsl #24646
java.time.Duration support in all jdocs java file, the persistence module and the distributed-data
2018-06-26 15:41:30 +02:00
Richard S. Imaoka
bf8f60f1ff no need to rename to operators in internal API 2018-06-17 13:17:59 +09:00
Richard S. Imaoka
60eee84345 Replace graph with operator in Scaladoc/Javadoc 2018-06-09 17:42:56 +09:00
Tim Moore
5c401584c3 Add static import convenience methods to Done and NotUsed (#25174)
* Add Done.done() convenience for static import
* Add NotUsed.notUsed() convenience for static import
2018-05-31 13:12:20 +01:00
Johan Andrén
333c05da60 Hopefully fixed a race in the shutdown test (#25155) 2018-05-31 07:55:13 +01:00
Sergey Kisel
f4cc1dd0f9 ScanAsync handling fully complete stream while future is resolved #25112 2018-05-30 13:01:18 +03:00
Jimin Hsieh
7c3a8a8ed5 java.time.Duration APIs in javadsl.TestKit #24646 2018-05-29 12:17:48 +02:00
Martynas Mickevičius
3d61400409 Decrease the uninitialized connection counter as late as possible #25148
This fixes (or decreases the chances significately for) a
situation where a stream of incoming connections is closed
and the incoming connection does not have a chance to startup
properly.
2018-05-25 16:22:48 +02:00
Patrik Nordwall
34bb7fee3c
Merge pull request #24988 from huntc/groupby-decider
Akka stream groupBy does not invoke decider
2018-05-21 11:30:57 +02:00
Richard Imaoka
a57235098b consistent wording; operator instead of combinator, in remaining places (#25101) 2018-05-15 15:31:11 +02:00
Filip Matusak
19f23514f6 #24778 MergeLatest operator 2018-05-15 15:03:52 +02:00
Filip Matusak
6fed2d78ad Fail FileSubscriber's Promise if it can't open the file #24889 2018-05-15 10:23:37 +02:00
Song Kun
55fb092bb2 Add convenient version of recover, recoverWith and recoverWithRetries for javadsl.Flow (#25036)
* Add more convenient version of recover, recoverWith and recoverWithRetries for javadsl.Flow.

* The new method take a Class parameter to decide which failure to recover from.
* Also add corresponding unit tests for them.

* use case expression to express partial function

* make time out larger in unit test

* checkstyle

* fix parameter type
2018-05-13 19:15:00 +02:00
Konrad `ktoso` Malawski
7fa28b3488
consistent wording; stream ops are "operators" (#25064) 2018-05-09 16:50:32 +02:00
Christopher Hunt
97297dd2d1 groupBy does not invoke decider
groupBy does not invoke a decider when the maximum number of substreams has been exceeded. This commit fixes that.
2018-05-09 11:17:54 +10:00
Johan Andrén
9b7c2a8cb4 UnfoldResourceSource closing twice on failure, #24924
* Don't write to actual disk in test

* Silence expected log errors

* Bugfix #24924 UnfoldResource closed resource twice on failure

* One more case where close would be called twice

* Toggle closed flag after operation in restartState

* open false _before_ closing in restartState
2018-05-07 17:00:46 +02:00
Konrad `ktoso` Malawski
256f81f97e
Akka Typed ask() for Akka Streams (#24892)
* +str,typ introduce akka typed ask for akka stream

address feedback and add actor interop stages incl ask to docs

more compile tests and adjusted things

last docs

* document adding stages to docs in CONTRIBUTING

* address review comments

* rebase conflicts
2018-05-07 19:23:30 +09:00
Johan Andrén
dfd8d8aa81
Additional tests for async boundaries and GroupBy #24676 2018-05-03 13:24:51 +02:00
Markus Thömmes
35e53f570c Allow groupBy to recreate already closed substreams #24758
`groupBy`'s default behavior is to filter elements, that would go to a substream
that is already closed. This allows `groupBy` to recreate those already closed streams,
if wanted, and run them as if they would've never run before in the first place.

Overload instead of default parameter

Make set of closed keys unmodifiable if not needed

Adjust documentation, adding a warning on memory consumption.

Add MiMa exclude.
2018-05-03 10:54:11 +02:00
Christopher Batey
82e2e2c551
RestartWithBackOff delay cancel to wait for failure (#24795)
* RestartWithBackOff delay cancel to wait for failure

For wrapping a user flow with FlowRestart.onFlowWithFailures when the user
flow it fails signals a cancel upstream and a failure downstream.

These are intercepted by a SubSource/SubSink. In the case
the SubSource receives the cancel before the SubSink receives
the real upstream is wrongly canceled leading to an error
when the SubSink restarts the flow.

This commit introduces a delay for the cancel so that the failure
is more likely to win.

Would be far better to propagate a reason for cancel so this could
be deterministic. See https://github.com/akka/akka/pull/23909

Refs #24528 #24726
2018-04-27 12:09:16 +01:00
Konrad `ktoso` Malawski
ca2fe92f0d =str clarify invocation semantics of wireTap, make test less flaky #24979 2018-04-26 14:56:58 +01:00
Konrad `ktoso` Malawski
5f5b41f3b8 =str #24934 sub timeout must be cancelled when streams establish conn 2018-04-25 12:44:14 +09:00
svozniuk
0dd63837b6 str #24934 - fix stream reference timeout
str #24934 - Change in error message -> change the value expected in test
2018-04-25 12:44:14 +09:00
Konrad `ktoso` Malawski
11a397d9c5
+str add in-line wireTap operator for sideeffecting (#24610) 2018-04-25 01:02:31 +09:00
Christopher Batey
4d20b2a660 Reduce size of jenkins logs
Each build is now over 40mb logs.

A lot of DEBUG logging was left on for test failures that have been
fixed. Added an issue # for ones that are still valid or if if it on
as the test verifies debug
2018-04-24 08:49:41 +01:00
KAWACHI Takashi
d0dd8e6d4c Fixed an empty ByteStrings problem in InputStreamSinkStage #24880 2018-04-11 13:04:14 +02:00
Patrik Nordwall
6baa2b676e
Merge pull request #24836 from chbatey/issue-24833
Harden TcpSpec: wait for port to be bound
2018-04-11 11:26:10 +02:00
Hawstein
ecdaf0e530 add eagerCancel to Partition and Balance stage (#22339)
* add eagerCancel to Partition and Balance stage

* fix mima error

* rebase master and add unit test

* add java support and since to deprecated
2018-04-10 01:46:39 +09:00
Johan Andrén
b94e064a34 Make sure to close resource in UnfoldResourceAsync (#24842)
* Make sure to close resource in UnfoldResourceAsync #24839

* Better fix for #24839
2018-04-09 14:30:24 +09:00
Christopher Batey
01022e1bcd Harden TcpSpec: wait for port to be bound
Refs #24833
2018-04-03 09:34:36 +01:00
Patrik Nordwall
6f330ef69c automatic throttle burst size, #24699 (#24784)
* automatic throttle burst size, #24699

* throttleEven used maxBurst=Int.MaxValue, which in practise resulted
  in no throttling at all at high rates
* The original problem that throttleEven tried to solve was that when
  the throttle rate (cost / per) was high the cost of scheduling
  dominated and became much lower than the given rate, if 0 or low
  maxBurst was given. Difficult for user to know what maxBurst to use.
* In fact, that was already the case for rates > 30/s.
* This is fixed by automatically adjusting the maxBurst for higher
  throttle rates in a new throttle overload that doesn't include
  maxBurst parameter
* Also skipped the mode parameter for that variant since Shaping is
  what almost always is what you want, and otherwise you can use
  the full signature with a good maxBurst
* Deprecated throttleEven, since it is the same. Also fixed the
  implementation of throttleEven to use the automatic burst size,
  since Int.MaxValue is not useful at all.
2018-04-02 15:07:16 +01:00
mikolak-net
00068e2d1d Extrapolate stage and expand redoc #23804 2018-03-27 10:39:25 +02:00
Gergő Törcsvári
67a81eb01b GraphDSL create with Seq[Graph] added #24067 2018-03-26 17:41:54 +02:00
虎鸣
c354aa0b6a =doc using java.time.Duration for stream's javadsl 2018-03-21 11:29:11 +08:00
Jimin Hsieh
3685ce619e Remove some of Unused import warning (#24750)
* Remove `Unused import` of `akka-actor-typed`

* Remove `Unused import` of `akka-actor-typed-tests`

* Remove `Unused import` of `akka-stream-tests`

* Remove `Unused import` of `akka-persistence`

* Remove `Unused import` of `akka-persistence-typed`

* Remove `Unused import` of `akka-cluster-typed`

* Remove `Unused import` of `akka-cluster-sharding-typed`

* Format source code
2018-03-20 12:01:15 +09:00
Konrad `ktoso` Malawski
6656b3c869
improve docs and test style of lazyInitAsync (#24754) 2018-03-20 00:04:34 +09:00
Stefan Wachter
3db145643a materialized value of Flow.lazyInit must be a Future #24670 (#24685)
* change materialized value of LazyFlow from [M] to Future[Option[M]]

* remove whitespace

* improve docu

* restore old Flow.lazyInit method and add new Flow.lazyInitAsync method

* fix deprecation messages

* add 2.5.11.backwards.excludes because of changed LazyFlow constructor signature

* check switching behaviour

* apply formatting

* improve deprecation message; improve null safety

* prevent premature stage completion by setting keepGoing

* deprecate Sink.lazyInit; add Sink.lazyInitAsync

* apply formatting

* add ProblemFilter.exclude for changed LazySink.this

* Update Sink.scala

* Update Sink.scala

* Update Flow.scala

* Update Flow.scala
2018-03-19 22:42:37 +09:00