-
Couldn't load subscription status.
- Fork 40
Add deprecated Data Loader CLI arguments #3041
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
base: master
Are you sure you want to change the base?
Changes from all commits
cb6058f
c607435
5ba96ea
a2563dc
47524ad
7edeece
22e28d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,9 @@ | |
| public class ImportCommandOptions { | ||
|
|
||
| public static final String FILE_OPTION_NAME_LONG_FORMAT = "--file"; | ||
| public static final String MAX_THREADS_OPTION = "--max-threads"; | ||
| public static final String MAX_THREADS_OPTION_SHORT = "-mt"; | ||
| public static final String DEPRECATED_THREADS_OPTION = "--threads"; | ||
|
|
||
| @CommandLine.Option( | ||
| names = {"--mode", "-m"}, | ||
|
|
@@ -39,6 +42,15 @@ public class ImportCommandOptions { | |
| defaultValue = "16") | ||
| protected int maxThreads; | ||
|
|
||
| // Deprecated option - kept for backward compatibility | ||
| @CommandLine.Option( | ||
| names = {DEPRECATED_THREADS_OPTION}, | ||
| paramLabel = "<THREADS>", | ||
| description = "Deprecated: Use --max-threads instead", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a question, but why |
||
| hidden = true) | ||
| @Deprecated | ||
| protected Integer threadsDeprecated; | ||
|
|
||
| @CommandLine.Option( | ||
| names = {"--namespace", "-ns"}, | ||
| paramLabel = "<NAMESPACE>", | ||
|
|
@@ -158,4 +170,18 @@ public class ImportCommandOptions { | |
| description = "Maximum number of data chunks that can be kept at a time for processing", | ||
| defaultValue = "256") | ||
| protected int dataChunkQueueSize; | ||
|
|
||
| /** | ||
| * Applies deprecated option values if they are set. | ||
| * | ||
| * <p>This method is called AFTER validateDeprecatedOptions(), so we are guaranteed that both the | ||
| * deprecated and new options were not specified together. If we reach this point, only the | ||
| * deprecated option was provided by the user. | ||
| */ | ||
| public void applyDeprecatedOptions() { | ||
| // If the deprecated option is set, use its value | ||
| if (threadsDeprecated != null) { | ||
| maxThreads = threadsDeprecated; | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.