Repository navigation
Conversation
- Clarify that Kafka input accepts skipped_line but does not apply it. - Recommend preprocessing the topic or using FILE/HDFS for line filtering. - Update both English and Chinese guides.
94c6d6f to
0536c41
Compare
bitflicker64
left a comment
There was a problem hiding this comment.
Blocking: no. Summary: The note matches KafkaReader, which hands each message to the parser and never reads skippedLine, but both pages already state this in the Kafka skipped_line bullet, so the note duplicates it above the page intro.
| search_boost: 1.6 | ||
| description: "Bulk import graph data into HugeGraph with Loader from files, HDFS, relational databases, Kafka, and other HugeGraph graphs." | ||
| --- | ||
| > **Kafka and `skipped_line`:** HugeGraph Loader accepts `skipped_line` for |
There was a problem hiding this comment.
Minor: the skipped_line bullet under 3.3.2.4 Kafka input source already documents this limitation on both pages, and this note renders above the page intro instead of below the Kafka options. Remove the note from the English and Chinese pages, or move the FILE/HDFS suggestion into the existing skipped_line bullet.
imbajin
left a comment
There was a problem hiding this comment.
Score: 8.0/10 · Confidence: medium
Blocking: no
Summary
The existing inline concern remains: the note duplicates the Kafka option description and sits above the introduction. Consolidating the FILE/HDFS suggestion in that option would keep the guidance together.
Evidence
KafkaSource declares skipped_line and KafkaReader passes each message to the parser without applying it; FileLineFetcher applies the file filter. Both language pages already document the Kafka limitation in their Kafka options.
Validation notes
Source review only; no live Kafka/HDFS test or Hugo build was run.
|
Thanks, agreed. #501 already covers this in the Kafka |
bitflicker64
left a comment
There was a problem hiding this comment.
Blocking: no. Score: 9/10. Summary: The FILE/HDFS alternative in both Kafka skipped_line bullets matches hugegraph-loader master, where LocalFileReader and HDFSFileReader read CSV, TEXT and JSON through FileLineFetcher, which applies skipped_line, and the earlier duplicate-note comment is resolved at this head.
imbajin
left a comment
There was a problem hiding this comment.
Score: 7.5/10 · Confidence: high
Blocking: yes
Summary
The new FILE/HDFS recommendation overstates where skipped_line is applied: ORC and Parquet rows are not filtered and may be imported unexpectedly.
Evidence
LocalFileReader and HDFSFileReader select dedicated ORC/Parquet fetchers; their fetch methods return rows without applying skippedLine. The earlier duplicate-note concern is resolved in this revision.
Validation notes
Source review against toolchain master only; no live Kafka, HDFS, ORC or Parquet import test or Hugo build was run.
| - extra_date_formats: a customized list of another date formats, empty by default, optional; each item in the list is an alternate date format to the date_format specified date format; | ||
| - time_zone: set which time zone the date data is in, default is GMT+8, optional; | ||
| - skipped_line: current master `KafkaReader` does not implement this filter. Kafka messages go directly to the parser, so configuring this field does not skip blank or comment messages; preprocess them upstream or in the consumer to avoid parse failures; | ||
| - skipped_line: current master `KafkaReader` does not implement this filter. Kafka messages go directly to the parser, so configuring this field does not skip blank or comment messages; preprocess them upstream or in the consumer to avoid parse failures, or export the messages to files and load them through a `FILE`/`HDFS` input source, which applies `skipped_line`; |
There was a problem hiding this comment.
FILE and HDFS also support ORC and Parquet, but their readers select OrcFileLineFetcher or ParquetFileLineFetcher, whose fetch() returns rows without checking skipped_line. A user exporting messages to either format could therefore import records they expected to skip. Please limit this advice to line-oriented file inputs and reflect the same qualification in the Chinese guide.
|
Thanks @imbajin, you are right: 5593f02 now limits the |
imbajin
left a comment
There was a problem hiding this comment.
Score: 7.5/10 · Confidence: high
Blocking: yes
Summary
The suggested CSV/TEXT workaround can fail or use a comment as the header when the exported file starts with a blank or comment message.
Evidence
FileLineFetcher reads the first physical line as the header before its fetch loop applies skipped_line; configuring an explicit header bypasses that discovery.
Validation notes
Source inspection against the Loader checkout; no live import or Hugo build was run.
| - extra_date_formats: a customized list of another date formats, empty by default, optional; each item in the list is an alternate date format to the date_format specified date format; | ||
| - time_zone: set which time zone the date data is in, default is GMT+8, optional; | ||
| - skipped_line: current master `KafkaReader` does not implement this filter. Kafka messages go directly to the parser, so configuring this field does not skip blank or comment messages; preprocess them upstream or in the consumer to avoid parse failures; | ||
| - skipped_line: current master `KafkaReader` does not implement this filter. Kafka messages go directly to the parser, so configuring this field does not skip blank or comment messages; preprocess them upstream or in the consumer to avoid parse failures, or export the messages to line-oriented files (CSV, TEXT, or JSON; not ORC or Parquet, whose readers do not check `skipped_line`) and load them through a `FILE`/`HDFS` input source; |
There was a problem hiding this comment.
When header is omitted for CSV or TEXT, FileLineFetcher.readHeader() reads the first physical line before skipped_line is applied. An exported file beginning with a comment can therefore use that comment as its header; a blank first line can cause header discovery to fail for a single-file input. Please advise configuring an explicit header or placing a valid header before lines to be skipped, in both language guides. This follows from source inspection; I did not run a live import.
|
Thanks @imbajin, confirmed in
|
imbajin
left a comment
There was a problem hiding this comment.
Score: 9.0/10 · Confidence: medium
Blocking: no
Summary
The bilingual guidance now qualifies the file formats and CSV/TEXT header requirement; the earlier review concerns are addressed.
Evidence
FileLineFetcher applies skipped_line during fetch and reads the first physical line for header discovery beforehand when a header is needed. The ORC and Parquet fetchers use separate paths without this filter.
Validation notes
Source review against the local Loader checkout only; no live Kafka, FILE or HDFS import or Hugo build was run.
bitflicker64
left a comment
There was a problem hiding this comment.
Blocking: no. Score: 9/10. Summary: Both Kafka skipped_line bullets match hugegraph-loader master, where FileLineFetcher filters CSV, TEXT and JSON lines for FILE/HDFS while the ORC and Parquet fetchers skip that check, and readHeader() reads the first line before the filter, so the earlier format and header concerns are resolved.
Purpose of the PR
skipped_lineapplies to file-based input sources (FILE/HDFS) and is not applied when reading from aKAFKAsource.Main Changes
skipped_linerow in the English and Chinese Loader guides to note that when reading fromKAFKA, line filtering should be done before publishing to the topic or by loading from aFILE/HDFSsource.Context
KafkaSourceinherits@JsonProperty("skipped_line"), whileKafkaReaderdoes not evaluateskipped_line. Folding the note directly into the existingskipped_linebullet keeps the parameter table concise across both languages.Verification
content/en/docs/quickstart/toolchain/hugegraph-loader.mdandcontent/cn/docs/quickstart/toolchain/hugegraph-loader.md.