001    /**
002     * Licensed to the Apache Software Foundation (ASF) under one
003     * or more contributor license agreements.  See the NOTICE file
004     * distributed with this work for additional information
005     * regarding copyright ownership.  The ASF licenses this file
006     * to you under the Apache License, Version 2.0 (the
007     * "License"); you may not use this file except in compliance
008     * with the License.  You may obtain a copy of the License at
009     *
010     *     http://www.apache.org/licenses/LICENSE-2.0
011     *
012     * Unless required by applicable law or agreed to in writing, software
013     * distributed under the License is distributed on an "AS IS" BASIS,
014     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015     * See the License for the specific language governing permissions and
016     * limitations under the License.
017     */
018    
019    package org.apache.hadoop.mapred.lib.aggregate;
020    
021    import org.apache.hadoop.classification.InterfaceAudience;
022    import org.apache.hadoop.classification.InterfaceStability;
023    import org.apache.hadoop.mapred.JobConf;
024    
025    /**
026     * This class implements a wrapper for a user defined value aggregator descriptor.
027     * It servs two functions: One is to create an object of ValueAggregatorDescriptor from the
028     * name of a user defined class that may be dynamically loaded. The other is to
029     * deligate inviokations of generateKeyValPairs function to the created object.
030     * 
031     * @deprecated Use 
032     * {@link org.apache.hadoop.mapreduce.lib.aggregate.UserDefinedValueAggregatorDescriptor}
033     * instead
034     */
035    @Deprecated
036    @InterfaceAudience.Public
037    @InterfaceStability.Stable
038    public class UserDefinedValueAggregatorDescriptor extends org.apache.hadoop.
039        mapreduce.lib.aggregate.UserDefinedValueAggregatorDescriptor
040        implements ValueAggregatorDescriptor {
041    
042      /**
043       * Create an instance of the given class
044       * @param className the name of the class
045       * @return a dynamically created instance of the given class 
046       */
047      public static Object createInstance(String className) {
048        return org.apache.hadoop.mapreduce.lib.aggregate.
049          UserDefinedValueAggregatorDescriptor.createInstance(className);
050      }
051    
052      /**
053       * 
054       * @param className the class name of the user defined descriptor class
055       * @param job a configure object used for decriptor configuration
056       */
057      public UserDefinedValueAggregatorDescriptor(String className, JobConf job) {
058        super(className, job);
059        ((ValueAggregatorDescriptor)theAggregatorDescriptor).configure(job);
060      }
061    
062      /**
063       *  Do nothing.
064       */
065      public void configure(JobConf job) {
066    
067      }
068    
069    }