Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion backfill-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ dependencies {
implementation "com.datastax.oss:dsbulk-batcher-reactor:${dsbulkVersion}"
implementation "com.google.guava:guava:${guavaVersion}"

implementation "info.picocli:picocli:4.6.3"
implementation "info.picocli:picocli:4.7.1"
implementation "org.slf4j:slf4j-api:1.7.36"
implementation "ch.qos.logback:logback-classic:1.2.11"
implementation "org.apache.cassandra:cassandra-all:${cassandra4Version}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.concurrent.Callable;

@Command(
name = "BackfillCLI",
name = "backfill",
description =
"A tool for back-filling the CDC data topic with historical data from that source Cassandra table.",
versionProvider = VersionProvider.class,
sortOptions = false,
abbreviateSynopsis = true,
usageHelpWidth = 100)
public class BackfillCLI {
public class BackfillCLI implements Callable<Integer> {

@Option(
names = {"-h", "--help"},
Expand All @@ -50,20 +50,17 @@ public class BackfillCLI {
description = "Displays version info.")
boolean versionInfoRequested;

@ArgGroup(exclusive = false, multiplicity = "1")
BackfillSettings settings;

public static void main(String[] args) {
LoggingUtils.configureLogging(LoggingUtils.MIGRATOR_CONFIGURATION_FILE);
CommandLine commandLine = new CommandLine(new BackfillCLI());
int exitCode = commandLine.execute(args);
int exitCode = new CommandLine(new BackfillCLI()).execute(args);
System.exit(exitCode);
}

@Command(
name = "backfill",
optionListHeading = "Available options:%n",
abbreviateSynopsis = true,
usageHelpWidth = 100)
private int backfill(
@ArgGroup(exclusive = false, multiplicity = "1") BackfillSettings settings) throws URISyntaxException, IOException {
@Override
public Integer call() {
// Bootstrap the backfill dependencies
final BackfillFactory factory = new BackfillFactory(settings);
final TableExporter exporter = factory.newTableExporter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
*/
public class BackfillSettings {

@CommandLine.Option(
names = {"-h", "--help"},
usageHelp = true,
description = "Displays this help message.")
boolean usageHelpRequested;

@CommandLine.Option(
names = {"-d", "--data-dir"},
paramLabel = "PATH",
Expand Down
Loading