@Before
 public void setUp() throws Exception {
   MyMapper mapper = new MyMapper();
   MyReducer reducer = new MyReducer();
   mapDriver = MapDriver.newMapDriver(mapper);
   reduceDriver = ReduceDriver.newReduceDriver(reducer);
   mapReduceDriver = MapReduceDriver.newMapReduceDriver(mapper, reducer);
 }
Esempio n. 2
0
 @Before
 public void setUp() {
   IpMapper mapper = new IpMapper();
   IpReducer reducer = new IpReducer();
   mapDriver = MapDriver.newMapDriver(mapper);
   reduceDriver = ReduceDriver.newReduceDriver(reducer);
   mapReduceDriver = MapReduceDriver.newMapReduceDriver(mapper, reducer);
 }
  @Before
  public void setup() {

    TrigramMapper mapper = new TrigramMapper();
    TrigramReducer reducer = new TrigramReducer();

    mapDriver = MapDriver.newMapDriver(mapper);
    reduceDriver = ReduceDriver.newReduceDriver(reducer);
  }
  @Before
  public void setup() throws FileNotFoundException {

    TitleWordCountMapper mapper = new TitleWordCountMapper();
    TitleWordCountReducer reducer = new TitleWordCountReducer();

    mapDriver = MapDriver.newMapDriver(mapper);
    reduceDriver = ReduceDriver.newReduceDriver(reducer);
  }
Esempio n. 5
0
  @Before
  public void setUp() throws Exception {
    PymkMapper mapper = new PymkMapper();
    mapDriver = MapDriver.newMapDriver(mapper);

    PymkReducer reducer = new PymkReducer();
    reducerDriver = ReduceDriver.newReduceDriver(reducer);

    mapRedDriver = MapReduceDriver.newMapReduceDriver(mapper, reducer);
  }
Esempio n. 6
0
  @Before
  public void setUp() throws IOException {

    mapDriver = MapDriver.newMapDriver(nnMapper);
    reduceDriver = ReduceDriver.newReduceDriver(nnReducer);

    mapDriver
        .getConfiguration()
        .set(
            GeoWaveConfiguratorBase.enumToConfKey(
                NNMapReduce.class, PartitionParameters.Partition.DISTANCE_THRESHOLDS),
            "10,10");

    reduceDriver
        .getConfiguration()
        .setDouble(
            GeoWaveConfiguratorBase.enumToConfKey(
                NNMapReduce.class, PartitionParameters.Partition.MAX_DISTANCE),
            10);

    ftype =
        AnalyticFeature.createGeometryFeatureAdapter(
                "centroid",
                new String[] {"extra1"},
                BasicFeatureTypes.DEFAULT_NAMESPACE,
                ClusteringUtils.CLUSTERING_CRS)
            .getType();

    reduceDriver
        .getConfiguration()
        .setClass(
            GeoWaveConfiguratorBase.enumToConfKey(
                DBScanMapReduce.class, HullParameters.Hull.PROJECTION_CLASS),
            SimpleFeatureProjection.class,
            Projection.class);

    JobContextAdapterStore.addDataAdapter(
        mapDriver.getConfiguration(), new FeatureDataAdapter(ftype));

    JobContextAdapterStore.addDataAdapter(
        reduceDriver.getConfiguration(), new FeatureDataAdapter(ftype));

    serializations();
  }