Search in sources :

Example 1 with NNJobRunner

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();
}
Also used : NNJobRunner(org.locationtech.geowave.analytic.mapreduce.nn.NNJobRunner) ParameterEnum(org.locationtech.geowave.analytic.param.ParameterEnum) SequenceFileOutputFormatConfiguration(org.locationtech.geowave.analytic.mapreduce.SequenceFileOutputFormatConfiguration) GeoWaveInputFormatConfiguration(org.locationtech.geowave.analytic.mapreduce.GeoWaveInputFormatConfiguration) OrthodromicDistancePartitioner(org.locationtech.geowave.analytic.partitioner.OrthodromicDistancePartitioner) PersistableStore(org.locationtech.geowave.analytic.store.PersistableStore) PropertyManagement(org.locationtech.geowave.analytic.PropertyManagement)

Aggregations

PropertyManagement (org.locationtech.geowave.analytic.PropertyManagement)1 GeoWaveInputFormatConfiguration (org.locationtech.geowave.analytic.mapreduce.GeoWaveInputFormatConfiguration)1 SequenceFileOutputFormatConfiguration (org.locationtech.geowave.analytic.mapreduce.SequenceFileOutputFormatConfiguration)1 NNJobRunner (org.locationtech.geowave.analytic.mapreduce.nn.NNJobRunner)1 ParameterEnum (org.locationtech.geowave.analytic.param.ParameterEnum)1 OrthodromicDistancePartitioner (org.locationtech.geowave.analytic.partitioner.OrthodromicDistancePartitioner)1 PersistableStore (org.locationtech.geowave.analytic.store.PersistableStore)1