-
Notifications
You must be signed in to change notification settings - Fork 111
feat(loader): update loading logic & enhance failure case #704
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
Merged
Merged
Changes from 13 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
1463d64
Create auto-pr-review.yml (#1)
imbajin 528f12e
Merge branch 'apache:master' into master
imbajin 3503b08
Merge pull request #2 from apache/master
imbajin 9683b47
Merge pull request #6 from apache/master
imbajin d3fa860
[feat] Adjusted several default parameters and descriptions in the Lo…
kenssa4eedfd cd92e05
[feat] Adjusted several default parameters and descriptions in the Lo…
kenssa4eedfd 80d1544
[feat] Adjusted descriptions in the Loader
kenssa4eedfd d37cb4e
[feat] Add validator for parallelThreads
kenssa4eedfd ca92b2a
[feat] Update the default value of parallelThreads
kenssa4eedfd 8a487f5
[feat] Update the default value of parallelThreads
kenssa4eedfd 0b965c6
[feat] Add validator for maxConnections and maxConnectionsPerRoute
kenssa4eedfd a432785
[feat] Update the default value of parallelThreads
kenssa4eedfd 171a988
[feat] Update the default value of parallelThreads
kenssa4eedfd f062624
[feat] Adjusted several default parameters and descriptions in the Lo…
kenssa4eedfd 866a4a0
[feat] Adjusted several default parameters and descriptions in the Lo…
kenssa4eedfd ceaed28
[feat] Adjusted several default parameters and descriptions in the Lo…
kenssa4eedfd e39f503
[feat] Adjusted several default parameters and descriptions in the Lo…
kenssa4eedfd eda716e
[feat] Add unit tests
kenssa4eedfd 71644b6
[feat] Add unit tests
kenssa4eedfd 78fa442
[feat] Add unit tests
kenssa4eedfd ee496dd
[feat] Add unit tests
kenssa4eedfd 0379118
[feat] Add unit tests
kenssa4eedfd 572cc94
[feat] Add unit tests
kenssa4eedfd a54eb64
Update loader-ci.yml
kenssa4eedfd 537445c
[feat] Add unit tests
kenssa4eedfd 6f663c7
Merge remote-tracking branch 'origin/loader-update' into loader-update
kenssa4eedfd 18e83cf
[feat] Add unit tests
kenssa4eedfd dddfa40
[feat] Add unit tests
kenssa4eedfd ed816e3
[feat] Add unit tests
kenssa4eedfd 1831893
[feat] Add unit tests
kenssa4eedfd 588adad
[feat] Add unit tests
kenssa4eedfd f60d5a1
[feat] Add unit tests
kenssa4eedfd 3706a3b
[feat] Add unit tests
kenssa4eedfd c328a01
[feat] Standardize log levels and streamline parameter descriptions.
kenssa4eedfd 146bdf4
Update required review count and collaborators
imbajin 1af9a32
Merge pull request #9 from hugegraph/imbajin-patch-1
imbajin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| name: "Auto PR Commenter" | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened] | ||
|
|
||
| jobs: | ||
| add-review-comment: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: write | ||
| steps: | ||
| - name: Add review comment | ||
| uses: peter-evans/create-or-update-comment@v4 | ||
| with: | ||
| issue-number: ${{ github.event.pull_request.number }} | ||
| body: | | ||
| @codecov-ai-reviewer review | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,6 +45,8 @@ public final class LoadOptions implements Cloneable { | |
| public static final String HTTPS_SCHEMA = "https"; | ||
| public static final String HTTP_SCHEMA = "http"; | ||
| private static final int CPUS = Runtime.getRuntime().availableProcessors(); | ||
| private static final int DEFAULT_MAX_CONNECTIONS = CPUS * 4; | ||
| private static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE = CPUS * 2; | ||
| private static final int MINIMUM_REQUIRED_ARGS = 3; | ||
|
|
||
| @Parameter(names = {"-f", "--file"}, required = true, arity = 1, | ||
|
|
@@ -156,7 +158,9 @@ public final class LoadOptions implements Cloneable { | |
|
|
||
| @Parameter(names = {"--batch-insert-threads"}, arity = 1, | ||
| validateWith = {PositiveValidator.class}, | ||
| description = "The number of threads to execute batch insert") | ||
| description = "The number of threads to execute batch insert. " + | ||
| "If max-conn/max-conn-per-route keep defaults, " + | ||
| "they may be auto-adjusted based on this value") | ||
| public int batchInsertThreads = CPUS; | ||
|
|
||
| @Parameter(names = {"--single-insert-threads"}, arity = 1, | ||
|
|
@@ -165,21 +169,30 @@ public final class LoadOptions implements Cloneable { | |
| public int singleInsertThreads = 8; | ||
|
|
||
| @Parameter(names = {"--max-conn"}, arity = 1, | ||
| description = "Max number of HTTP connections to server") | ||
| public int maxConnections = CPUS * 4; | ||
| validateWith = {PositiveValidator.class}, | ||
| description = "Max number of HTTP connections to server. " + | ||
| "If left as default and batch-insert-threads is " + | ||
| "set, this may be auto-adjusted") | ||
kenssa4eedfd marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| public int maxConnections = DEFAULT_MAX_CONNECTIONS; | ||
|
|
||
| @Parameter(names = {"--max-conn-per-route"}, arity = 1, | ||
| description = "Max number of HTTP connections to each route") | ||
| public int maxConnectionsPerRoute = CPUS * 2; | ||
| validateWith = {PositiveValidator.class}, | ||
| description = "Max number of HTTP connections to each route. " + | ||
| "If left as default and batch-insert-threads is " + | ||
| "set, this may be auto-adjusted") | ||
| public int maxConnectionsPerRoute = DEFAULT_MAX_CONNECTIONS_PER_ROUTE; | ||
|
|
||
| @Parameter(names = {"--batch-size"}, arity = 1, | ||
| validateWith = {PositiveValidator.class}, | ||
| description = "The number of lines in each submit") | ||
| public int batchSize = 500; | ||
|
|
||
kenssa4eedfd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| @Parameter(names = {"--parallel-count"}, arity = 1, | ||
| description = "The number of parallel read pipelines") | ||
| public int parallelCount = 1; | ||
| @Parameter(names = {"--parallel-count", "--parser-threads"}, arity = 1, | ||
kenssa4eedfd marked this conversation as resolved.
Show resolved
Hide resolved
imbajin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| validateWith = {PositiveValidator.class}, | ||
| description = "The number of parallel read pipelines. " + | ||
| "Default: auto max(2, cpu/2). " + | ||
| "Must be >= 1") | ||
|
||
| public int parallelThreads = Math.max(2, CPUS/2); | ||
|
|
||
| @Parameter(names = {"--start-file"}, arity = 1, | ||
| description = "start file index for partial loading") | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.