You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Uroš Bojanić (Jira)" <ji...@apache.org> on 2026/08/06 10:48:00 UTC
[jira] [Created] (SPARK-58620) Fix incorrect comments and stale usage docs in the custom receiver examples
Uroš Bojanić created SPARK-58620:
------------------------------------
Summary: Fix incorrect comments and stale usage docs in the custom receiver examples
Key: SPARK-58620
URL: https://issues.apache.org/jira/browse/SPARK-58620
Project: Spark
Issue Type: Documentation
Components: Examples
Affects Versions: 4.3.0
Reporter: Uroš Bojanić
The custom receiver examples carry several documentation defects:
1. JavaCustomReceiver documents a <master> argument that the example does not accept. main() gates on args.length < 2 and reads only args[0] as hostname and args[1] as port, and SparkConf is built with setAppName only. The in-code usage string already prints "Usage: JavaCustomReceiver <hostname> <port>", so only the class comment disagrees. The stale text is a leftover of SPARK-1826, which removed the positional master argument but did not fully update the comment block.
2. The onStop() comment reads "is designed to stop by itself isStopped() returns false", which describes the loop continuation condition rather than the stop condition. The receive loop is while (!isStopped()), so the thread exits when isStopped() returns true. The same inverted comment appears in CustomReceiver.scala and twice in the custom receiver docs page.
3. JavaCustomReceiver says "Received bytes is interpreted as" where the subject is plural. SPARK-15645 fixed this in CustomReceiver.scala but missed the Java counterpart.
All changes are to comments, example usage text, and documentation snippets. No behavior change.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org