Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add parameter descriptions in HadoopFileLinesReader
  • Loading branch information
HyukjinKwon committed Oct 28, 2017
commit bc65e6bdcfdcf5c415217df2e1149a10bbb5d89e
4 changes: 2 additions & 2 deletions python/pyspark/sql/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def json(self, path, schema=None, primitivesAsString=None, prefersDecimal=None,
characters (ASCII characters with value less than 32,
including tab and line feed characters) or not.
:param lineSep: defines the line separator that should be used for parsing. If None is
set, it uses the default value, ``\\r\\n`` or ``\\n``.
set, it uses ``\\n`` by default, covering ``\\r``, ``\\r\\n`` and ``\\n``.

>>> json_sdf = spark.readStream.json(tempfile.mkdtemp(), schema = sdf_schema)
>>> json_sdf.isStreaming
Expand Down Expand Up @@ -528,7 +528,7 @@ def text(self, path, lineSep=None):

:param paths: string, or list of strings, for input path(s).
:param lineSep: defines the line separator that should be used for parsing. If None is
set, it uses the default value, ``\\r\\n`` or ``\\n``.
set, it uses ``\\n`` by default, covering ``\\r``, ``\\r\\n`` and ``\\n``.

>>> text_sdf = spark.readStream.text(tempfile.mkdtemp())
>>> text_sdf.isStreaming
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ import org.apache.hadoop.mapreduce.task.TaskAttemptContextImpl
/**
* An adaptor from a [[PartitionedFile]] to an [[Iterator]] of [[Text]], which are all of the lines
* in that file.
*
* @param file A part (i.e. "block") of a single file that should be read line by line.
* @param lineSeparator A line separator that should be used for each line. If the value is `\n`,
* it covers `\r`, `\r\n` and `\n`.
* @param conf Hadoop configuration
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add @parameter?

class HadoopFileLinesReader(
file: PartitionedFile,
Expand Down