Examples of partition()


Examples of io.s4.dispatcher.partitioner.VariableKeyPartitioner.partition()

                                                      event,
                                                      eventEmitter.getNodeCount());
                } else {
                    if (partitioner instanceof VariableKeyPartitioner) {
                        VariableKeyPartitioner vp = (VariableKeyPartitioner) partitioner;
                        pInfoList = vp.partition(streamName,
                                                 compoundKeyNames,
                                                 event,
                                                 eventEmitter.getNodeCount());
                    }
                }
View Full Code Here

Examples of org.apache.accumulo.core.util.LocalityGroupUtil.Partitioner.partition()

   
    for (int i = 0; i < partitioned.length; i++) {
      partitioned[i] = new ArrayList<Mutation>();
    }
   
    p1.partition(mutations, partitioned);
   
    m1 = new Mutation("r1");
    m1.put("cf1", "cq1", "v1");
   
    m2 = new Mutation("r2");
View Full Code Here

Examples of org.apache.hadoop.examples.pi.math.Summation.partition()

        final Summation sigma = SummationWritable.read(DistSum.class, conf);
        final int nParts = conf.getInt(N_PARTS, 0);
 
        //create splits
        final List<InputSplit> splits = new ArrayList<InputSplit>(nParts);
        final Summation[] parts = sigma.partition(nParts);
        for(int i = 0; i < parts.length; ++i) {
          splits.add(new SummationSplit(parts[i]));
          //LOG.info("parts[" + i + "] = " + parts[i]);
        }
        return splits;
View Full Code Here

Examples of org.apache.kafka.common.PartitionInfo.partition()

            List<RecordBatch> ready = new ArrayList<RecordBatch>();
            /* to make starvation less likely this loop doesn't start at 0 */
            int start = drainIndex = drainIndex % parts.size();
            do {
                PartitionInfo part = parts.get(drainIndex);
                Deque<RecordBatch> deque = dequeFor(new TopicPartition(part.topic(), part.partition()));
                if (deque != null) {
                    synchronized (deque) {
                        RecordBatch first = deque.peekFirst();
                        if (first != null) {
                            if (size + first.records.sizeInBytes() > maxSize && !ready.isEmpty()) {
View Full Code Here

Examples of org.apache.mahout.df.mapreduce.partial.TreeID.partition()

      trees.add(value.getTree());

      int[] predictions = value.getPredictions();
      for (int id = 0; id < predictions.length; id++) {
        callback.prediction(key.treeId(), firstIds[key.partition()] + id,
            predictions[id]);
      }
    }
   
    return new DecisionForest(trees);
View Full Code Here

Examples of org.apache.mahout.df.mapreduce.partial.TreeID.partition()

        }

        TreeID k = output.getKeys()[current];

        // the tree should receive the partition's index
        assertEquals(partition, k.partition());

        // make sure all the trees of the other partitions are handled in the
        // correct order
        assertEquals(index, k.treeId());
View Full Code Here

Examples of org.apache.mahout.df.mapreduce.partial.TreeID.partition()

      trees.add(value.getTree());

      int[] predictions = value.getPredictions();
      for (int id = 0; id < predictions.length; id++) {
        callback.prediction(key.treeId(), firstIds[key.partition()] + id,
            predictions[id]);
      }
    }
   
    return new DecisionForest(trees);
View Full Code Here

Examples of org.apache.mahout.df.mapreduce.partial.TreeID.partition()

        }

        TreeID k = output.getKeys()[current];

        // the tree should receive the partition's index
        assertEquals(partition, k.partition());

        // make sure all the trees of the other partitions are handled in the
        // correct order
        assertEquals(index, k.treeId());
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.layout.FactorList.partition()

          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (BankHead head : heads) {
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.layout.FactorList.partition()

          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (BankHead head : heads) {
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.