use of org.locationtech.geowave.core.cli.parser.OperationParser in project geowave by locationtech.
the class HelpCommandTest method testPrepare.
@Test
public void testPrepare() {
final String[] args = { "help" };
final OperationRegistry registry = OperationRegistry.getInstance();
final OperationParser parser = new OperationParser(registry);
final CommandLineOperationParams params = parser.parse(GeoWaveTopLevelSection.class, args);
final HelpCommand helpcommand = new HelpCommand();
helpcommand.prepare(params);
assertEquals(false, params.isValidate());
assertEquals(true, params.isAllowUnknown());
}
use of org.locationtech.geowave.core.cli.parser.OperationParser in project geowave by locationtech.
the class GeoWaveDedupeJobRunner method main.
public static void main(final String[] args) throws Exception {
final ConfigOptions opts = new ConfigOptions();
final MainParameterHolder holder = new MainParameterHolder();
final OperationParser parser = new OperationParser();
parser.addAdditionalObject(opts);
parser.addAdditionalObject(holder);
// Second round to get everything else.
final CommandLineOperationParams params = parser.parse(args);
// Set the datastore plugin
if (holder.getMainParameter().size() == 0) {
throw new ParameterException("Must specify datastore name as first argument.");
}
// Load the params for config file.
opts.prepare(params);
final StoreLoader loader = new StoreLoader(holder.getMainParameter().get(0));
loader.loadFromConfig((File) params.getContext().get(ConfigOptions.PROPERTIES_FILE_CONTEXT), params.getConsole());
final int res = ToolRunner.run(new Configuration(), new GeoWaveDedupeJobRunner(loader.getDataStorePlugin()), args);
System.exit(res);
}
use of org.locationtech.geowave.core.cli.parser.OperationParser in project geowave by locationtech.
the class RasterTileResizeJobRunner method main.
public static void main(final String[] args) throws Exception {
final ConfigOptions opts = new ConfigOptions();
final OperationParser parser = new OperationParser();
parser.addAdditionalObject(opts);
final ResizeMRCommand command = new ResizeMRCommand();
final CommandLineOperationParams params = parser.parse(command, args);
opts.prepare(params);
final int res = ToolRunner.run(new Configuration(), command.createRunner(params), args);
System.exit(res);
}
use of org.locationtech.geowave.core.cli.parser.OperationParser in project geowave by locationtech.
the class KDEJobRunner method main.
public static void main(final String[] args) throws Exception {
final ConfigOptions opts = new ConfigOptions();
final OperationParser parser = new OperationParser();
parser.addAdditionalObject(opts);
final KdeCommand command = new KdeCommand();
final CommandLineOperationParams params = parser.parse(command, args);
opts.prepare(params);
final int res = ToolRunner.run(new Configuration(), command.createRunner(params), args);
System.exit(res);
}
use of org.locationtech.geowave.core.cli.parser.OperationParser in project geowave by locationtech.
the class ComparisonStatsJobRunner method main.
public static void main(final String[] args) throws Exception {
final ConfigOptions opts = new ConfigOptions();
final ComparisonCommandLineOptions comparisonOptions = new ComparisonCommandLineOptions();
final OperationParser parser = new OperationParser();
parser.addAdditionalObject(opts);
parser.addAdditionalObject(comparisonOptions);
final KdeCommand kdeCommand = new KdeCommand();
final CommandLineOperationParams params = parser.parse(kdeCommand, args);
// Load the params for config file.
opts.prepare(params);
final File configFile = (File) params.getContext().get(ConfigOptions.PROPERTIES_FILE_CONTEXT);
// Don't care about output, but this will set the datastore options.
kdeCommand.createRunner(params);
final ComparisonStatsJobRunner runner = new ComparisonStatsJobRunner(comparisonOptions, kdeCommand.getKdeOptions(), kdeCommand.getInputStoreOptions(), kdeCommand.getOutputStoreOptions(), configFile, null);
final int res = ToolRunner.run(new Configuration(), runner, args);
System.exit(res);
}
Aggregations