Skip to content

Commit

Permalink
fixed integer parameter parsing. Fixes #2
Browse files Browse the repository at this point in the history
enforces a minimum of Java 11, as documented
  • Loading branch information
radu-gheorghe committed Jan 5, 2023
1 parent fefafac commit 2587bf7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ java -jar solr-reindexer.jar\
-sourceCollection my_collection_v1\
-targetCollection my_collection_v2\
-uniqueKey id\
-sourceZkAddress localhost:9983,localhost:2181\
localhost:9983,localhost:2181\
-targetZkAddress zoo1:2181,zoo2:2181\
-skipFields _version_,text\
-retries 7\
Expand All @@ -26,8 +26,11 @@ The rest are:
- `rows`: we reindex one page at a time. Typically, the best performance is around 1MB per batch. Default is 1000 rows per page/batch

## Contributing
Feel free to clone the repository, import it as a Gradle project, and add features. Some that might be useful:
- support different source and target clusters
Feel free to clone the repository, import it as a Gradle project, and add features.

To build the uber-jar, use `gradle jar`.

Tentative roadmap:
- authentication support
- multi-threading writes using a queue
- using multiple parallel cursors (e.g. one per shard)
Expand Down
8 changes: 7 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ plugins {
}

group 'org.sematext'
version '1.1'
version '1.2'

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/sematext/solr/reindexer/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static void setIntegerParam(String paramName, int defaultValue) {
int paramValue = defaultValue;
String paramStringValue = cmd.getOptionValue(paramName);
if (paramStringValue != null) {
paramValue = Integer.parseInt(paramName);
paramValue = Integer.parseInt(paramStringValue);
}
context.intParams.put(paramName, paramValue);
}
Expand Down

0 comments on commit 2587bf7

Please sign in to comment.