Skip to content

docs: add FILE/HDFS alternative to Kafka skipped_line bullet - #567

Open
n24q02m wants to merge 4 commits into
apache:masterfrom
n24q02m:docs/hg-3-1.8-audit
Open

n24q02m wants to merge 4 commits into
apache:masterfrom
n24q02m:docs/hg-3-1.8-audit

Conversation

@n24q02m

@n24q02m n24q02m commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Purpose of the PR

Main Changes

  • Update the skipped_line row in the English and Chinese Loader guides to note that when reading from KAFKA, line filtering should be done before publishing to the topic or by loading from a FILE/HDFS source.
  • Remove the duplicate standalone note below the Kafka input options table.

Context

KafkaSource inherits @JsonProperty("skipped_line"), while KafkaReader does not evaluate skipped_line. Folding the note directly into the existing skipped_line bullet keeps the parameter table concise across both languages.

Verification

  • Verified internal links and Markdown table formatting in content/en/docs/quickstart/toolchain/hugegraph-loader.md and content/cn/docs/quickstart/toolchain/hugegraph-loader.md.

- 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.
@n24q02m
n24q02m force-pushed the docs/hg-3-1.8-audit branch from 94c6d6f to 0536c41 Compare November 16, 2026 13:33

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@n24q02m n24q02m mentioned this pull request Nov 21, 2026
46 of 62 tasks
@n24q02m n24q02m changed the title docs: document Kafka skipped_line limitation docs: add FILE/HDFS alternative to Kafka skipped_line bullet Nov 21, 2026
@n24q02m

n24q02m commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, agreed. #501 already covers this in the Kafka skipped_line bullet on both pages, and the note rendered above the page intro, not under the Kafka options as I wrote in the description. I removed the note from both pages and moved the FILE/HDFS suggestion into the existing bullet, so the PR is now a one-line change per language. The title and description are updated to match.

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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`;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

⚠️ Qualify the file formats that apply this filter

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.

@n24q02m

n24q02m commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @imbajin, you are right: LocalFileReader and HDFSFileReader pick OrcFileLineFetcher or ParquetFileLineFetcher for ORC and Parquet, and neither fetch() checks skipped_line.

5593f02 now limits the FILE/HDFS suggestion in the Kafka skipped_line bullet to line-oriented files (CSV, TEXT or JSON) and says that ORC and Parquet readers do not check skipped_line. The Chinese guide has the same qualification. The diff is still one line per language.

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

⚠️ Qualify the CSV/TEXT header requirement

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.

@n24q02m

n24q02m commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @imbajin, confirmed in FileLineFetcher.readHeader() (when needReadHeader() is true for CSV/TEXT): it reads the first non-empty physical line via readLine() before fetch() applies skipped_line.

5fca8e37f adds the guidance in both the English and Chinese guides to configure an explicit header or place a valid header on the first line before any lines to skip when using FILE/HDFS with CSV or TEXT. The diff remains one line per language.

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants