Package org.apache.hadoop.mrunit.internal.mapred

Examples of org.apache.hadoop.mrunit.internal.mapred.MockReporter


      preRunChecks(myMapper);
      initDistributedCache();
      final OutputCollectable<K2, V2> outputCollectable = mockOutputCreator
          .createMapredOutputCollectable(getConfiguration(),
              getOutputSerializationConfiguration());
      final MockReporter reporter = new MockReporter(
          MockReporter.ReporterType.Mapper, getCounters(),
          getMapInputPath());

      ReflectionUtils.setConf(myMapper, new JobConf(getConfiguration()));
View Full Code Here


      preRunChecks(myReducer);
      initDistributedCache();
      final OutputCollectable<K2, V2> outputCollectable = mockOutputCreator
          .createMapredOutputCollectable(getConfiguration(),
              getOutputSerializationConfiguration());
      final MockReporter reporter = new MockReporter(
          MockReporter.ReporterType.Reducer, getCounters());

      ReflectionUtils.setConf(myReducer, new JobConf(getConfiguration()));

      for (Pair<K1, List<V1>> kv : inputs) {
View Full Code Here

  public final ExpectedSuppliedException thrown = ExpectedSuppliedException
      .none();

  @Test
  public void testGetInputSplitForMapper() {
    final InputSplit split = new MockReporter(MockReporter.ReporterType.Mapper,
        null, new Path("/")).getInputSplit();
    assertTrue(null != split);
  }
View Full Code Here

  // if the reducer tries to grab the input split.
  @Test
  public void testGetInputSplitForReducer() {
    thrown.expectMessage(UnsupportedOperationException.class,
        "Reducer cannot call getInputSplit()");
    new MockReporter(MockReporter.ReporterType.Reducer, null, null).getInputSplit();
  }
View Full Code Here

      preRunChecks(myMapper);
      initDistributedCache();
      final OutputCollectable<K2, V2> outputCollectable = mockOutputCreator
          .createMapredOutputCollectable(getConfiguration(),
              getOutputSerializationConfiguration());
      final MockReporter reporter = new MockReporter(
          MockReporter.ReporterType.Mapper, getCounters(),
          getMapInputPath());

      ReflectionUtils.setConf(myMapper, new JobConf(getConfiguration()));
View Full Code Here

      preRunChecks(myReducer);
      initDistributedCache();
      final OutputCollectable<K2, V2> outputCollectable = mockOutputCreator
          .createMapredOutputCollectable(getConfiguration(),
              getOutputSerializationConfiguration());
      final MockReporter reporter = new MockReporter(
          MockReporter.ReporterType.Reducer, getCounters());

      ReflectionUtils.setConf(myReducer, new JobConf(getConfiguration()));

      for (Pair<K1, List<V1>> kv : inputs) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mrunit.internal.mapred.MockReporter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.