Skip to content

Commit

Permalink
Fix mode option in cluster fork lift
Browse files Browse the repository at this point in the history
  • Loading branch information
singhsiddharth committed Apr 21, 2015
1 parent 9e21ccb commit 9de1042
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/java/voldemort/utils/ClusterForkLiftTool.java
Expand Up @@ -613,8 +613,10 @@ private static OptionParser getParser() {
parser.accepts("mode",
"Determines if a thorough global resolution needs to be done, by comparing all replicas. [Default: "
+ ForkLiftTaskMode.primary_resolution.toString()
+ " Fetch from primary alone ]");

+ " Fetch from primary alone ]")
.withOptionalArg()
.describedAs("mode")
.ofType(String.class);
parser.accepts(OVERWRITE_OPTION, OVERWRITE_WARNING_MESSAGE)
.withOptionalArg()
.describedAs("overwriteExistingValue")
Expand All @@ -624,6 +626,7 @@ private static OptionParser getParser() {
return parser;
}


/**
* @param args
*/
Expand Down Expand Up @@ -674,13 +677,12 @@ public static void main(String[] args) throws Exception {
progressOps = (Integer) options.valueOf("progress-period-ops");
}

ForkLiftTaskMode mode;
mode = ForkLiftTaskMode.primary_resolution;
ForkLiftTaskMode mode = ForkLiftTaskMode.primary_resolution;

if(options.has("mode")) {
mode = Utils.getEnumFromString(ForkLiftTaskMode.class, (String) options.valueOf("mode"));
mode = ForkLiftTaskMode.valueOf((String) options.valueOf("mode"));
if(mode == null)
mode = ForkLiftTaskMode.primary_resolution;

}

Boolean overwrite = false;
Expand Down

0 comments on commit 9de1042

Please sign in to comment.