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

tsdb: Switch split16 to be a single file #370

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

pquentin
Copy link
Member

That way, it will be split in 16, but each part will start from beginning to end.

That way, it will be split in 16, but each part will start from
beginning to end.
@pquentin pquentin self-assigned this Jan 25, 2023
Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

Thanks @pquentin! I left a question for my own understanding.
LGTM

"source-file": "documents-split-15.json.bz2",
"document-count": 7289606,
"uncompressed-bytes": 8252803345
"source-file": "documents-split16.json.bz2",
Copy link
Member

Choose a reason for hiding this comment

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

Question: how does Rally know how to split this file into 16 parts? (and each part having the correct date range)

Copy link
Member Author

Choose a reason for hiding this comment

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

Splitting the file in 16 is the default behavior of Rally, provided we configure it to use 16 bulk indexing clients. I rearranged the original file to make sure that each of the 16 splits was starting from beginning to end. Given the previous split16 work, all I had to do was:

cat documents-split-0.json documents-split-1.json documents-split-2.json documents-split-3.json documents-split-4.json documents-split-5.json documents-split-6.json documents-split-7.json documents-split-8.json documents-split-9.json documents-split-10.json documents-split-11.json documents-split-12.json documents-split-13.json documents-split-14.json documents-split-15.json > documents-split16.json

Does that make sense?

Copy link
Member

Choose a reason for hiding this comment

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

I see, and each of the documents-split-N.json files has an equal size, so that Rally knows exactly how to split the documents-split16.json file?

Copy link
Member Author

@pquentin pquentin Jan 25, 2023

Choose a reason for hiding this comment

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

Yes, each bulk indexing client will split and mmap its own part of file independently based on its id (from 0 to 15) and the number of lines (which is why we have to provide document-count).

Copy link
Member

Choose a reason for hiding this comment

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

👍

@pquentin pquentin merged commit 27f3554 into elastic:master Jan 25, 2023
@pquentin pquentin deleted the single-file-split16 branch January 25, 2023 13:33
pquentin added a commit that referenced this pull request Feb 1, 2023
That way, it will be split in 16, but each part will start from
beginning to end.
pquentin added a commit that referenced this pull request Feb 1, 2023
That way, it will be split in 16, but each part will start from
beginning to end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants