egor-ryashin commented on a change in pull request #7038: Fix and document
concurrency of EventReceiverFirehose and TimedShutoffFirehose; Refine
concurrency specification of Firehose
URL: https://github.com/apache/incubator-druid/pull/7038#discussion_r255177651
##########
File path: core/src/main/java/org/apache/druid/data/input/Firehose.java
##########
@@ -77,8 +82,18 @@
* A simple implementation of this interface might do nothing when run() is
called
* (in which case the same do-nothing instance can be returned every time),
or
* a more complex implementation might clean up temporary resources that are
no longer needed
- * because of InputRows delivered by prior calls to ##nextRow().
+ * because of InputRows delivered by prior calls to {@link #nextRow()}.
* </p>
*/
Runnable commit();
+
+ /**
+ * Closes the "ingestion side" of the Firehose, potentially concurrently
with calls to {@link #hasMore()}, {@link
+ * #nextRow()} and {@link #commit()} being made from a different thread.
{@link #hasMore()} and {@link #nextRow()}
+ * continue to work after close(), but since the ingestion side is closed
rows will eventually run out. The effects
+ * of calling the {@link Runnable} returned from {@link #commit()} (but not
{@link #commit()} itself) concurrently or
Review comment:
particularly:
- "but not from commit() itself", I suppose "but calling from commit()
itself"?
- I'd write all in brackets "(returned from commit() but not ...)"
- how "not silently" differs from "with error"?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]