[ 
https://issues.apache.org/jira/browse/BEAM-10124?focusedWorklogId=473607&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-473607
 ]

ASF GitHub Bot logged work on BEAM-10124:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Aug/20 05:51
            Start Date: 23/Aug/20 05:51
    Worklog Time Spent: 10m 
      Work Description: abhiy13 commented on a change in pull request #12645:
URL: https://github.com/apache/beam/pull/12645#discussion_r475174519



##########
File path: 
sdks/java/io/contextual-text-io/src/main/java/org/apache/beam/sdk/io/contextualtextio/ContextualTextIO.java
##########
@@ -151,8 +157,27 @@
  *      .apply(ContextualTextIO.readFiles());
  * }</pre>
  *
- * NOTE: Using {@link 
ContextualTextIO.Read#withHasMultilineCSVRecords(Boolean)} introduces a
- * performance penalty: when this option is enabled, the input cannot be split 
and read in parallel.
+ * <p>Example 6: reading without recordNum metadata, or only fileName 
associated Metadata. (the
+ * Objects would still contain recordNums, but these recordNums would 
correspond to their positions
+ * in their respective offsets rather than their positions within the entire 
file).
+ *
+ * <pre>{@code
+ * Pipeline p = ...;
+ *
+ * PCollection<RecordWithMetadata> records = p.apply(ContextualTextIO.read()
+ *     .from("/local/path/to/files/*.csv")
+ *      .setWithoutRecordNumMetadata(true));
+ * }</pre>
+ *
+ * <p>NOTE: When using {@link 
ContextualTextIO.Read#withHasMultilineCSVRecords(Boolean)} this
+ * option, a single reader will be used to process the file, rather than 
multiple readers which can
+ * read from different offsets. For a large file this can result in lower 
performance.
+ *
+ * <p>NOTE: Use {@link Read#withoutRecordNumMetadata()} when recordNum 
metadata is not required or
+ * when only metadata associated with filenames is required, Not using this 
option introduces a
+ * shuffle step which increases the resources used by the pipeline. <b>This 
option is set to false
+ * by default. Meaning that the shuffle step will be performed, set it to 
false to avoid the shuffle

Review comment:
       Done.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 473607)
    Remaining Estimate: 1,334h 40m  (was: 1,334h 50m)
            Time Spent: 9h 20m  (was: 9h 10m)

> ContextualTextIO - An IO that is provides metadata about the line. 
> -------------------------------------------------------------------
>
>                 Key: BEAM-10124
>                 URL: https://issues.apache.org/jira/browse/BEAM-10124
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-ideas
>            Reporter: Reza ardeshir rokni
>            Priority: P2
>   Original Estimate: 1,344h
>          Time Spent: 9h 20m
>  Remaining Estimate: 1,334h 40m
>
> There are two important Source IO's that allow for dealing with text files 
> FileIO and TextIO. When the requirements go beyond the scope of TextIO we ask 
> the end user to make use of FileIO and go it on their own.
> We want to correct this experience by creating a more feature rich TextIO 
> which can return along with each line of data contextual information about 
> the line. For example the file that it came from, and the ordinal position of 
> the line within the file.
> Another area that we would like to deal with is more formal support for CSV 
> files by allowing compliance to RFC4180 files. Specifically the RFC allows 
> for line breaks (CRLF) to be used within fields within double quotes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to