Adding javadocs.
Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/98f7e323 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/98f7e323 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/98f7e323 Branch: refs/heads/0.1.5 Commit: 98f7e32387ffdeaf1814049a6e9c685c939f4852 Parents: 588d667 Author: Aaron McCurry <[email protected]> Authored: Wed May 15 14:12:19 2013 -0400 Committer: Aaron McCurry <[email protected]> Committed: Wed May 15 14:12:19 2013 -0400 ---------------------------------------------------------------------- .../blur/mapreduce/lib/DefaultBlurReducer.java | 50 +++++++++++++++ 1 files changed, 50 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/98f7e323/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/DefaultBlurReducer.java ---------------------------------------------------------------------- diff --git a/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/DefaultBlurReducer.java b/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/DefaultBlurReducer.java index 3e283dd..c89ca6b 100644 --- a/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/DefaultBlurReducer.java +++ b/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/DefaultBlurReducer.java @@ -1,11 +1,61 @@ package org.apache.blur.mapreduce.lib; +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import java.io.IOException; import org.apache.blur.mapreduce.BlurMutate; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Reducer; +/** + * This class is to be used in conjunction with {@link BlurOutputFormat} + * .</br></br> + * + * Here is a basic example of how to use both the {@link BlurOutputFormat} and + * the {@link DefaultBlurReducer} together to build indexes.</br></br> + * + * Once this job has successfully completed the indexes will be imported by the + * running shard servers and be placed online. This is a polling mechicism in + * the shard servers and by default they poll every 10 seconds. + * + * + * </br></br> + * + * Job job = new Job(conf, "blur index");</br> + * job.setJarByClass(BlurOutputFormatTest.class);</br> + * job.setMapperClass(CsvBlurMapper.class);</br> + * job.setReducerClass(DefaultBlurReducer.class);</br> + * job.setNumReduceTasks(1);</br> + * job.setInputFormatClass(TrackingTextInputFormat.class);</br> + * job.setOutputKeyClass(Text.class); + * </br>job.setOutputValueClass(BlurMutate.class);</br> + * job.setOutputFormatClass(BlurOutputFormat.class);</br> </br> + * FileInputFormat.addInputPath(job, new Path(TEST_ROOT_DIR + "/in"));</br> + * CsvBlurMapper.addColumns(job, "cf1", "col");</br> </br> TableDescriptor + * tableDescriptor = new TableDescriptor();</br> + * tableDescriptor.setShardCount(1) + * ;</br>tableDescriptor.setAnalyzerDefinition(new + * AnalyzerDefinition());</br>tableDescriptor.setTableUri(new Path(TEST_ROOT_DIR + * + "/out").toString());</br>BlurOutputFormat.setTableDescriptor(job, + * tableDescriptor);</br> + * + * + */ public class DefaultBlurReducer extends Reducer<Text, BlurMutate, Text, BlurMutate> { @Override
