Skip to content

Commit 30b42dc

Browse files
committed
fixed host and port args
1 parent e8e35ca commit 30b42dc

File tree

6 files changed

+36
-6
lines changed

6 files changed

+36
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ buildNumber.properties
1616
/.factorypath
1717
/.project
1818
.DS_Store
19+
/.asciidoctor/

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313
<groupId>com.redislabs</groupId>
1414
<artifactId>riot</artifactId>
15-
<version>0.2.3</version>
15+
<version>0.2.4</version>
1616
<packaging>jar</packaging>
1717
<name>RIOT</name>
1818
<description>Redis Input/Output Tool</description>
1919

2020
<properties>
2121
<start-class>com.redislabs.riot.RiotApplication</start-class>
22-
<!-- <spring.profiles.active>default</spring.profiles.active> -->
22+
<spring.profiles.active>default</spring.profiles.active>
2323
</properties>
2424

2525
<scm>

src/main/java/com/redislabs/riot/cli/AbstractCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ public enum RedisDriver {
3636
private int chunkSize = JobBuilder.DEFAULT_CHUNK_SIZE;
3737
@Option(names = "--sleep", description = "Sleep duration in milliseconds between each read.")
3838
private Long sleep;
39-
@Option(names = { "-s", "--host" }, description = "Redis server host. (default: localhost).")
39+
@Option(names = "--host", description = "Redis server host. (default: localhost).")
4040
private InetAddress host;
4141
@Getter
42-
@Option(names = { "-h", "--port" }, description = "Redis server port. (default: ${DEFAULT-VALUE}).")
42+
@Option(names = "--port", description = "Redis server port. (default: ${DEFAULT-VALUE}).")
4343
private int port = RedisURI.DEFAULT_REDIS_PORT;
4444
@Option(names = "--command-timeout", description = "Redis command timeout in seconds for synchronous command execution (default: ${DEFAULT-VALUE}).")
4545
private long commandTimeout = RedisURI.DEFAULT_TIMEOUT;

src/main/java/com/redislabs/riot/cli/in/ImportCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import picocli.CommandLine.Command;
1313

1414
@Component
15-
@Command(name = "import", description = "Import data into Redis", subcommands = { DelimitedImportSubCommand.class,
15+
@Command(name = "import", description = "Import into Redis", subcommands = { DelimitedImportSubCommand.class,
1616
FixedLengthImportSubCommand.class, JsonImportSubCommand.class, DatabaseImportSubCommand.class,
1717
GeneratorImportSubCommand.class, SimpleGeneratorImportSubCommand.class })
1818
public class ImportCommand extends AbstractCommand<Map<String, Object>, Map<String, Object>> {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.redislabs.riot.cli.out;
2+
3+
import java.util.Map;
4+
5+
import org.springframework.stereotype.Component;
6+
7+
import com.redislabs.riot.cli.AbstractCommand;
8+
9+
import picocli.CommandLine.Command;
10+
11+
@Component
12+
@Command(name = "export", description = "Export from Redis", subcommands = { })
13+
public class ExportCommand extends AbstractCommand<Map<String, Object>, Map<String, Object>> {
14+
15+
}

src/main/java/com/redislabs/riot/cli/redis/StreamImportSubSubCommand.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,28 @@
77
import picocli.CommandLine.Option;
88

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

12+
@Option(names = "--keyspace", required = true, description = "Redis keyspace prefix.")
13+
private String keyspace;
14+
@Option(names = "--keys", arity = "1..*", description = "Key fields.")
15+
private String[] keys = new String[0];
1216
@Option(names = "--approximate-trimming", description = "Apply efficient trimming for capped streams using the ~ flag.")
1317
private boolean approximateTrimming;
1418
@Option(names = "--maxlen", description = "Limit stream to maxlen entries.")
1519
private Long maxlen;
1620
@Option(names = "--id", description = "Field used for stream entry IDs.")
1721
private String idField;
22+
23+
@Override
24+
protected String getKeyspace() {
25+
return keyspace;
26+
}
27+
28+
@Override
29+
protected String[] getKeys() {
30+
return keys;
31+
}
1832

1933
@Override
2034
protected AbstractRedisItemWriter redisItemWriter() {

0 commit comments

Comments
 (0)