PageRenderTime 16ms CodeModel.GetById 10ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/java/org/apache/hadoop/hive/ql/io/HiveOutputFormat.java

#
Java | 65 lines | 14 code | 6 blank | 45 comment | 0 complexity | 12fc84f3d47e59419ca69420143fc848 MD5 | raw file
 1/**
 2 * Licensed to the Apache Software Foundation (ASF) under one
 3 * or more contributor license agreements.  See the NOTICE file
 4 * distributed with this work for additional information
 5 * regarding copyright ownership.  The ASF licenses this file
 6 * to you under the Apache License, Version 2.0 (the
 7 * "License"); you may not use this file except in compliance
 8 * with the License.  You may obtain a copy of the License at
 9 *
10 *     http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19package org.apache.hadoop.hive.ql.io;
20
21import java.io.IOException;
22import java.util.Properties;
23
24import org.apache.hadoop.fs.Path;
25import org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter;
26import org.apache.hadoop.io.Writable;
27import org.apache.hadoop.io.WritableComparable;
28import org.apache.hadoop.mapred.JobConf;
29import org.apache.hadoop.util.Progressable;
30
31/**
32 * <code>HiveOutputFormat</code> describes the output-specification for Hive's
33 * operators. It has a method
34 * {@link #getHiveRecordWriter(JobConf, Path, Class, boolean, Properties, Progressable)}
35 * , with various parameters used to create the final out file and get some
36 * specific settings.
37 * 
38 * @see org.apache.hadoop.mapred.OutputFormat
39 * @see RecordWriter
40 * @see JobConf
41 */
42public interface HiveOutputFormat<K extends WritableComparable, V extends Writable> {
43
44  /**
45   * create the final out file and get some specific settings.
46   * 
47   * @param jc
48   *          the job configuration file
49   * @param finalOutPath
50   *          the final output file to be created
51   * @param valueClass
52   *          the value class used for create
53   * @param isCompressed
54   *          whether the content is compressed or not
55   * @param tableProperties
56   *          the table properties of this file's corresponding table
57   * @param progress
58   *          progress used for status report
59   * @return the RecordWriter for the output file
60   */
61  RecordWriter getHiveRecordWriter(JobConf jc, Path finalOutPath,
62      final Class<? extends Writable> valueClass, boolean isCompressed,
63      Properties tableProperties, Progressable progress) throws IOException;
64
65}