Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: print import rows count after finished #1401

Merged
merged 4 commits into from
Mar 10, 2022
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -209,16 +209,20 @@ public void Load() {
reader.enableCheckHeader(tableMetaData);
try {
CSVRecord record;
int lines = 0;
while ((record = reader.next()) != null) {
// integer gets added at the start of iteration for each line.
lines++;
Map<Integer, List<Tablet.Dimension>> dims = buildDimensions(record, keyIndexMap, tableMetaData.getPartitionNum());

// distribute the row to the bulk load generators for each MemTable(tid, pid)
for (Integer pid : dims.keySet()) {
// Note: NS pid is int
// no need to calc dims twice, pass it to BulkLoadGenerator
generators.get(pid).feed(new BulkLoadGenerator.FeedItem(dims, tsIdxSet, record));
}
}
System.out.println("Total read rows: " + lines);
// after while loop is finished, print out number of lines gone through.
} catch (Exception e) {
logger.error("feeding failed, {}", e.getMessage());
}
Expand Down