use of org.locationtech.geowave.analytic.mapreduce.nn.NNJobRunner in project geowave by locationtech.
the class GeoWaveNNIT method runNN.
private void runNN(final QueryConstraints query) throws Exception {
final NNJobRunner jobRunner = new NNJobRunner();
// final int res = 1;
// GeoWaveMain.main(new String[] {
// "analytic",
// "nn",
// "--query.adapters",
// "testnn",
// "--query.index",
// new
// SpatialDimensionalityTypeProvider().createPrimaryIndex().getId().getString(),
// "-emn",
// Integer.toString(MIN_INPUT_SPLITS),
// "-emx",
// Integer.toString(MAX_INPUT_SPLITS),
// "-pmd",
// "0.2",
// "-pdt",
// "0.2,0.2",
// "-pc",
// OrthodromicDistancePartitioner.class.toString(),
// "-oop",
// hdfsBaseDirectory + "/t1/pairs",
// "-hdfsbase",
// hdfsBaseDirectory + "/t1",
// "-orc",
// "3",
// "-ofc",
// SequenceFileOutputFormatConfiguration.class.toString(),
// "-ifc",
// GeoWaveInputFormatConfiguration.class.toString(),
// "foo"
// });
final int res = jobRunner.run(MapReduceTestUtils.getConfiguration(), new PropertyManagement(new ParameterEnum[] { ExtractParameters.Extract.QUERY, ExtractParameters.Extract.MIN_INPUT_SPLIT, ExtractParameters.Extract.MAX_INPUT_SPLIT, PartitionParameters.Partition.MAX_DISTANCE, PartitionParameters.Partition.DISTANCE_THRESHOLDS, PartitionParameters.Partition.PARTITIONER_CLASS, StoreParam.INPUT_STORE, OutputParameters.Output.HDFS_OUTPUT_PATH, MapReduceParameters.MRConfig.HDFS_BASE_DIR, OutputParameters.Output.REDUCER_COUNT, OutputParameters.Output.OUTPUT_FORMAT, InputParameters.Input.INPUT_FORMAT }, new Object[] { QueryBuilder.newBuilder().constraints(query).build(), Integer.toString(MapReduceTestUtils.MIN_INPUT_SPLITS), Integer.toString(MapReduceTestUtils.MAX_INPUT_SPLITS), 0.2, "0.2,0.2", OrthodromicDistancePartitioner.class, new PersistableStore(dataStorePluginOptions), TestUtils.TEMP_DIR + File.separator + MapReduceTestEnvironment.HDFS_BASE_DIRECTORY + "/t1/pairs", TestUtils.TEMP_DIR + File.separator + MapReduceTestEnvironment.HDFS_BASE_DIRECTORY + "/t1", 3, SequenceFileOutputFormatConfiguration.class, GeoWaveInputFormatConfiguration.class }));
Assert.assertEquals(0, res);
Assert.assertTrue(readFile() > 0);
// for travis-ci to run, we want to limit the memory consumption
System.gc();
}
Aggregations