/** * The task output a record with a partition number attached. */ public void partitionedOutput(int reduce, K key, V value) throws IOException { PipesPartitioner.setNextPartition(reduce); collector.collect(key, value); }
/** * The task output a record with a partition number attached. */ public void partitionedOutput(int reduce, K key, V value) throws IOException { PipesPartitioner.setNextPartition(reduce); collector.collect(key, value); }
/** * The task output a record with a partition number attached. */ public void partitionedOutput(int reduce, K key, V value) throws IOException { PipesPartitioner.setNextPartition(reduce); collector.collect(key, value); }
/** * The task output a record with a partition number attached. */ public void partitionedOutput(int reduce, K key, V value) throws IOException { PipesPartitioner.setNextPartition(reduce); collector.collect(key, value); }
/** * The task output a record with a partition number attached. */ public void partitionedOutput(int reduce, K key, V value) throws IOException { PipesPartitioner.setNextPartition(reduce); collector.collect(key, value); }
/** * The task output a record with a partition number attached. */ public void partitionedOutput(int reduce, K key, V value) throws IOException { PipesPartitioner.setNextPartition(reduce); collector.collect(key, value); }
/** * The task output a record with a partition number attached. */ public void partitionedOutput(int reduce, K key, V value) throws IOException { PipesPartitioner.setNextPartition(reduce); collector.collect(key, value); }
/** * test PipesPartitioner * test set and get data from PipesPartitioner */ @Test public void testPipesPartitioner() { PipesPartitioner<IntWritable, Text> partitioner = new PipesPartitioner<IntWritable, Text>(); JobConf configuration = new JobConf(); Submitter.getJavaPartitioner(configuration); partitioner.configure(new JobConf()); IntWritable iw = new IntWritable(4); // the cache empty assertEquals(0, partitioner.getPartition(iw, new Text("test"), 2)); // set data into cache PipesPartitioner.setNextPartition(3); // get data from cache assertEquals(3, partitioner.getPartition(iw, new Text("test"), 2)); }