Examples of reduce()


Examples of org.allspice.parser.Translation.reduce()

  public Object reduce(Rule rule, Parser parser,ParserState state,PositionRange range) throws SyntaxError {
    Translation t = rules.get(rule) ;
    if (t == null) {
      return rule.rhs.isEmpty() ? null : state.reductions.head.o ;
    }
    return t.reduce(range, parser, state) ;
  }
 
  /**
   * @param r
   * @param t
View Full Code Here

Examples of org.apache.accumulo.core.iterators.Combiner.reduce()

    GlobalIndexUidCombiner.setLossyness(setting, true);
    comb.init(null, setting.getOptions(), null);
    Logger.getLogger(GlobalIndexUidCombiner.class).setLevel(Level.OFF);
    Value val = new Value(UUID.randomUUID().toString().getBytes());
    values.add(val);
    Value result = comb.reduce(new Key(), values.iterator());
    Uid.List resultList = Uid.List.parseFrom(result.get());
    assertTrue(resultList.getIGNORE() == false);
    assertTrue(resultList.getUIDCount() == 0);
    assertTrue(resultList.getCOUNT() == 0);
  }
View Full Code Here

Examples of org.apache.giraph.comm.aggregators.OwnerAggregatorServerData.reduce()

      try {
        boolean sent = requestProcessor.sendReducedValue(entry.getKey(),
            entry.getValue().getCurrentValue());
        if (!sent) {
          // If it's my aggregator, add it directly
          ownerGlobalCommData.reduce(entry.getKey(),
              entry.getValue().getCurrentValue());
        }
      } catch (IOException e) {
        throw new IllegalStateException("finishSuperstep: " +
            "IOException occurred while sending aggregator " +
View Full Code Here

Examples of org.apache.hadoop.mapred.Reducer.reduce()

    try {
      CombineValuesIterator values = new CombineValuesIterator(
          kvIter, comparator, keyClass, valClass, job, Reporter.NULL,
          inCounter);
      while (values.more()) {
        combiner.reduce(values.getKey(), values, combineCollector,
                        Reporter.NULL);
        values.nextKey();
      }
    } finally {
      combiner.close();
View Full Code Here

Examples of org.apache.hadoop.mapred.Reducer.reduce()

    try {
      CombineValuesIterator values = new CombineValuesIterator(
          kvIter, comparator, keyClass, valClass, job, Reporter.NULL,
          inCounter);
      while (values.more()) {
        combiner.reduce(values.getKey(), values, combineCollector,
                        Reporter.NULL);
        values.nextKey();
      }
    } finally {
      combiner.close();
View Full Code Here

Examples of org.apache.hadoop.mapred.Reducer.reduce()

    try {
      CombineValuesIterator values = new CombineValuesIterator(
          kvIter, comparator, keyClass, valClass, job, Reporter.NULL,
          inCounter);
      while (values.more()) {
        combiner.reduce(values.getKey(), values, combineCollector,
                        Reporter.NULL);
        values.nextKey();
      }
    } finally {
      combiner.close();
View Full Code Here

Examples of org.apache.hadoop.mapred.Reducer.reduce()

    };
   
    CombinerValuesIterator values = new CombinerValuesIterator(rawIter, keyClass, valClass, comparator);
   
    while (values.moveToNext()) {
      combiner.reduce(values.getKey(), values.getValues().iterator(), collector, reporter);
    }
  }
 
  private final class CombinerValuesIterator<KEY,VALUE> extends ValuesIterator<KEY, VALUE> {
    public CombinerValuesIterator(TezRawKeyValueIterator rawIter,
View Full Code Here

Examples of org.apache.hadoop.mapred.Reducer.reduce()

              input, reporter, reduceInputValueCounter);

      values.informReduceProgress();
      while (values.more()) {
        reduceInputKeyCounter.increment(1);
        reducer.reduce(values.getKey(), values, collector, reporter);
        values.informReduceProgress();
      }

      // Set progress to 1.0f if there was no exception,
      reporter.setProgress(1.0f);
View Full Code Here

Examples of org.apache.lucene.util.automaton.Automaton.reduce()

      if (Character.isLetter(i)) {
        initial.addTransition(new Transition(i, i, accept));
      }
    }
    Automaton single = new Automaton(initial);
    single.reduce();
    Automaton repeat = BasicOperations.repeat(single);
    jvmLetter = new CharacterRunAutomaton(repeat);
  }
 
  public void testLetterAscii() throws Exception {
View Full Code Here

Examples of org.apache.lucene.util.automaton.Automaton.reduce()

     
      if (random().nextBoolean()) {
        if (VERBOSE) {
          System.out.println("TEST: reduce the automaton");
        }
        a.reduce();
      }

      final CompiledAutomaton c = new CompiledAutomaton(a, true, false);

      final BytesRef[] acceptTermsArray = new BytesRef[acceptTerms.size()];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.