Skip to content

Commit

Permalink
fixed host and port args
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Jun 3, 2019
1 parent e8e35ca commit 30b42dc
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ buildNumber.properties
/.factorypath
/.project
.DS_Store
/.asciidoctor/
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

<groupId>com.redislabs</groupId>
<artifactId>riot</artifactId>
<version>0.2.3</version>
<version>0.2.4</version>
<packaging>jar</packaging>
<name>RIOT</name>
<description>Redis Input/Output Tool</description>

<properties>
<start-class>com.redislabs.riot.RiotApplication</start-class>
<!-- <spring.profiles.active>default</spring.profiles.active> -->
<spring.profiles.active>default</spring.profiles.active>
</properties>

<scm>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/redislabs/riot/cli/AbstractCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public enum RedisDriver {
private int chunkSize = JobBuilder.DEFAULT_CHUNK_SIZE;
@Option(names = "--sleep", description = "Sleep duration in milliseconds between each read.")
private Long sleep;
@Option(names = { "-s", "--host" }, description = "Redis server host. (default: localhost).")
@Option(names = "--host", description = "Redis server host. (default: localhost).")
private InetAddress host;
@Getter
@Option(names = { "-h", "--port" }, description = "Redis server port. (default: ${DEFAULT-VALUE}).")
@Option(names = "--port", description = "Redis server port. (default: ${DEFAULT-VALUE}).")
private int port = RedisURI.DEFAULT_REDIS_PORT;
@Option(names = "--command-timeout", description = "Redis command timeout in seconds for synchronous command execution (default: ${DEFAULT-VALUE}).")
private long commandTimeout = RedisURI.DEFAULT_TIMEOUT;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/redislabs/riot/cli/in/ImportCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import picocli.CommandLine.Command;

@Component
@Command(name = "import", description = "Import data into Redis", subcommands = { DelimitedImportSubCommand.class,
@Command(name = "import", description = "Import into Redis", subcommands = { DelimitedImportSubCommand.class,
FixedLengthImportSubCommand.class, JsonImportSubCommand.class, DatabaseImportSubCommand.class,
GeneratorImportSubCommand.class, SimpleGeneratorImportSubCommand.class })
public class ImportCommand extends AbstractCommand<Map<String, Object>, Map<String, Object>> {
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/redislabs/riot/cli/out/ExportCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.redislabs.riot.cli.out;

import java.util.Map;

import org.springframework.stereotype.Component;

import com.redislabs.riot.cli.AbstractCommand;

import picocli.CommandLine.Command;

@Component
@Command(name = "export", description = "Export from Redis", subcommands = { })
public class ExportCommand extends AbstractCommand<Map<String, Object>, Map<String, Object>> {

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,28 @@
import picocli.CommandLine.Option;

@Command(name = "stream", description = "Stream data structure")
public class StreamImportSubSubCommand extends AbstractSingleRedisImportSubSubCommand {
public class StreamImportSubSubCommand extends AbstractRedisImportSubSubCommand {

@Option(names = "--keyspace", required = true, description = "Redis keyspace prefix.")
private String keyspace;
@Option(names = "--keys", arity = "1..*", description = "Key fields.")
private String[] keys = new String[0];
@Option(names = "--approximate-trimming", description = "Apply efficient trimming for capped streams using the ~ flag.")
private boolean approximateTrimming;
@Option(names = "--maxlen", description = "Limit stream to maxlen entries.")
private Long maxlen;
@Option(names = "--id", description = "Field used for stream entry IDs.")
private String idField;

@Override
protected String getKeyspace() {
return keyspace;
}

@Override
protected String[] getKeys() {
return keys;
}

@Override
protected AbstractRedisItemWriter redisItemWriter() {
Expand Down

0 comments on commit 30b42dc

Please sign in to comment.