diff --git a/connectors/riot-file/src/main/java/com/redis/riot/file/FileImportCommand.java b/connectors/riot-file/src/main/java/com/redis/riot/file/FileImportCommand.java index b9f239f87..bdcccaffb 100644 --- a/connectors/riot-file/src/main/java/com/redis/riot/file/FileImportCommand.java +++ b/connectors/riot-file/src/main/java/com/redis/riot/file/FileImportCommand.java @@ -42,7 +42,7 @@ import picocli.CommandLine.Command; import picocli.CommandLine.Parameters; -@Command(name = "import", description = "Import delimited, fixed-width, JSON, or XML files into Redis.") +@Command(name = "import", description = "Import CSV/JSON/XML files into Redis.") public class FileImportCommand extends AbstractImportCommand { private static final Logger log = Logger.getLogger(FileImportCommand.class.getName()); diff --git a/connectors/riot-gen/src/main/java/com/redis/riot/gen/GeneratorOptions.java b/connectors/riot-gen/src/main/java/com/redis/riot/gen/GeneratorOptions.java index 96c607b97..6f7d25e12 100644 --- a/connectors/riot-gen/src/main/java/com/redis/riot/gen/GeneratorOptions.java +++ b/connectors/riot-gen/src/main/java/com/redis/riot/gen/GeneratorOptions.java @@ -8,11 +8,11 @@ public class GeneratorOptions { - @Option(names = "--start", description = "Start index (default: ${DEFAULT-VALUE})", paramLabel = "") + @Option(names = "--start", description = "Start index (default: ${DEFAULT-VALUE}).", paramLabel = "") protected int start = 1; - @Option(names = "--count", description = "Number of items to generate (default: ${DEFAULT-VALUE})", paramLabel = "") + @Option(names = "--count", description = "Number of items to generate (default: ${DEFAULT-VALUE}).", paramLabel = "") protected int count = 1000; - @Option(names = "--sleep", description = "Duration in ms to sleep before each item generation (default: ${DEFAULT-VALUE})", paramLabel = "") + @Option(names = "--sleep", description = "Duration in ms to sleep before each item generation.", paramLabel = "") private Optional sleep = Optional.empty(); public int getStart() { diff --git a/core/riot-core/src/main/java/com/redis/riot/RedisOptions.java b/core/riot-core/src/main/java/com/redis/riot/RedisOptions.java index 53ebd5c3a..4aaeb1c48 100644 --- a/core/riot-core/src/main/java/com/redis/riot/RedisOptions.java +++ b/core/riot-core/src/main/java/com/redis/riot/RedisOptions.java @@ -40,9 +40,9 @@ public class RedisOptions { private Optional password = Optional.empty(); @Option(names = { "-u", "--uri" }, description = "Server URI.", paramLabel = "") private RedisURI uri; - @Option(names = "--timeout", description = "Redis command timeout (default: ${DEFAULT-VALUE}).", paramLabel = "") + @Option(names = "--timeout", description = "Redis command timeout.", paramLabel = "") private Optional timeout = Optional.empty(); - @Option(names = { "-n", "--db" }, description = "Database number (default: ${DEFAULT-VALUE}).", paramLabel = "") + @Option(names = { "-n", "--db" }, description = "Database number.", paramLabel = "") private Optional database = Optional.empty(); @Option(names = { "-c", "--cluster" }, description = "Enable cluster mode.") private boolean cluster; @@ -163,6 +163,7 @@ public void setCluster(boolean cluster) { this.cluster = cluster; } + @SuppressWarnings("deprecation") public RedisURI uri() { RedisURI redisURI = uri == null ? RedisURI.create(host, port) : uri; insecure.ifPresent(b -> redisURI.setVerifyPeer(!b)); diff --git a/core/riot-core/src/main/java/com/redis/riot/RiotApp.java b/core/riot-core/src/main/java/com/redis/riot/RiotApp.java index 380975943..1ac74875b 100644 --- a/core/riot-core/src/main/java/com/redis/riot/RiotApp.java +++ b/core/riot-core/src/main/java/com/redis/riot/RiotApp.java @@ -29,12 +29,12 @@ public class RiotApp { @Option(names = { "-V", "--version" }, versionHelp = true, description = "Print version information and exit.") private boolean versionRequested; - @ArgGroup(heading = "Redis connection options%n", exclusive = false) - private RedisOptions redisOptions = new RedisOptions(); - @ArgGroup(heading = "Logging options%n", exclusive = false) private LoggingOptions loggingOptions = new LoggingOptions(); + @ArgGroup(heading = "Redis connection options%n", exclusive = false) + private RedisOptions redisOptions = new RedisOptions(); + public RedisOptions getRedisOptions() { return redisOptions; } diff --git a/core/riot-core/src/main/java/com/redis/riot/TransferOptions.java b/core/riot-core/src/main/java/com/redis/riot/TransferOptions.java index 78cdcbef1..3b8bda1a1 100644 --- a/core/riot-core/src/main/java/com/redis/riot/TransferOptions.java +++ b/core/riot-core/src/main/java/com/redis/riot/TransferOptions.java @@ -15,7 +15,7 @@ public enum SkipPolicy { private int chunkSize = 50; @Option(names = "--skip-policy", description = "Policy to determine if some processing should be skipped: ${COMPLETION-CANDIDATES} (default: ${DEFAULT-VALUE})", paramLabel = "") private SkipPolicy skipPolicy = SkipPolicy.LIMIT; - @Option(names = "--skip-limit", description = "For LIMIT policy, max number of failed items to skip before considering the transfer has failed (default: ${DEFAULT-VALUE})", paramLabel = "") + @Option(names = "--skip-limit", description = "LIMIT skip policy: max number of failed items before considering the transfer has failed (default: ${DEFAULT-VALUE})", paramLabel = "") private int skipLimit = 3; public int getThreads() {