i++;
}
Path[] srcs = new Path[argv.length-1-i];
for (int j=0 ; i < argv.length-1 ;)
srcs[j++] = new Path(argv[i++]);
DataTransferThrottler throttler =
rate > 0L ? new DataTransferThrottler(rate) : null;
copyFromLocal(srcs, argv[i++], validate, throttler);
} else if ("-moveFromLocal".equals(cmd)) {
Path[] srcs = new Path[argv.length-2];
for (int j=0 ; i < argv.length-1 ;)
srcs[j++] = new Path(argv[i++]);
moveFromLocal(srcs, argv[i++]);
} else if ("-get".equals(cmd) || "-copyToLocal".equals(cmd)) {
long rate = -1L;
if (argv[i].equals("-rate")) {
i++;
rate = Long.parseLong(argv[i]);
if (rate <= 0L) {
throw new IllegalArgumentException(
"IO Throttler bandwidth must be positive. The input rate is invalid: " +
rate);
}
i++;
}
DataTransferThrottler throttler =
rate > 0L ? new DataTransferThrottler(rate) : null;
copyToLocal(argv, i, throttler);
} else if ("-getmerge".equals(cmd)) {
if (argv.length>i+2)
copyMergeToLocal(argv[i++], new Path(argv[i++]), Boolean.parseBoolean(argv[i++]));
else